getOutpostSupportedInstanceTypes method

Future<GetOutpostSupportedInstanceTypesOutput> getOutpostSupportedInstanceTypes({
  1. required String outpostIdentifier,
  2. String? assetId,
  3. int? maxResults,
  4. String? nextToken,
  5. String? orderId,
})

Gets the instance types that an Outpost can support in InstanceTypeCapacity. This will generally include instance types that are not currently configured and therefore cannot be launched with the current Outpost capacity configuration.

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

Parameter outpostIdentifier : The ID or ARN of the Outpost.

Parameter assetId : The ID of the Outpost asset. An Outpost asset can be a single server within an Outposts rack or an Outposts server configuration.

Parameter orderId : The ID for the Amazon Web Services Outposts order.

Implementation

Future<GetOutpostSupportedInstanceTypesOutput>
    getOutpostSupportedInstanceTypes({
  required String outpostIdentifier,
  String? assetId,
  int? maxResults,
  String? nextToken,
  String? orderId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (assetId != null) 'AssetId': [assetId],
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (orderId != null) 'OrderId': [orderId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/outposts/${Uri.encodeComponent(outpostIdentifier)}/supportedInstanceTypes',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetOutpostSupportedInstanceTypesOutput.fromJson(response);
}