listServicePrincipalNames method

Future<ListServicePrincipalNamesResponse> listServicePrincipalNames({
  1. required String directoryRegistrationArn,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the service principal names that the connector uses to authenticate with Active Directory.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter directoryRegistrationArn : The Amazon Resource Name (ARN) that was returned when you called CreateDirectoryRegistration.

Parameter maxResults : Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

Parameter nextToken : Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

Implementation

Future<ListServicePrincipalNamesResponse> listServicePrincipalNames({
  required String directoryRegistrationArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/directoryRegistrations/${Uri.encodeComponent(directoryRegistrationArn)}/servicePrincipalNames',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListServicePrincipalNamesResponse.fromJson(response);
}