getOutpostInstanceTypes method

Future<GetOutpostInstanceTypesOutput> getOutpostInstanceTypes({
  1. required String outpostId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the instance types for the specified Outpost.

May throw ValidationException. May throw NotFoundException. May throw AccessDeniedException. May throw InternalServerException.

Implementation

Future<GetOutpostInstanceTypesOutput> getOutpostInstanceTypes({
  required String outpostId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(outpostId, 'outpostId');
  _s.validateStringLength(
    'outpostId',
    outpostId,
    1,
    180,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1005,
  );
  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: '/outposts/${Uri.encodeComponent(outpostId)}/instanceTypes',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetOutpostInstanceTypesOutput.fromJson(response);
}