describeEndpoints method

Future<DescribeEndpointsResponse> describeEndpoints({
  1. int? maxResults,
  2. DescribeEndpointsMode? mode,
  3. String? nextToken,
})

Send an request with an empty body to the regional API endpoint to get your account API endpoint.

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.

Parameter maxResults : Optional. Max number of endpoints, up to twenty, that will be returned at one time.

Parameter mode : Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to return your endpoints if any exist, or to create an endpoint for you and return it if one doesn't already exist. Specify GET_ONLY to return your endpoints if any exist, or an empty list if none exist.

Parameter nextToken : Use this string, provided with the response to a previous request, to request the next batch of endpoints.

Implementation

Future<DescribeEndpointsResponse> describeEndpoints({
  int? maxResults,
  DescribeEndpointsMode? mode,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (mode != null) 'mode': mode.toValue(),
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2017-08-29/endpoints',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeEndpointsResponse.fromJson(response);
}