listCatalogItems method
Lists the items in the catalog.
Use filters to return specific results. If you specify multiple filters, the results include only the resources that match all of the specified filters. For a filter where you can specify multiple values, the results include items that match any of the values that you specify for the filter.
May throw AccessDeniedException.
May throw InternalServerException.
May throw NotFoundException.
May throw ValidationException.
Parameter eC2FamilyFilter :
Filters the results by EC2 family (for example, M5).
Parameter itemClassFilter :
Filters the results by item class.
Parameter supportedStorageFilter :
Filters the results by storage option.
Implementation
Future<ListCatalogItemsOutput> listCatalogItems({
List<String>? eC2FamilyFilter,
List<CatalogItemClass>? itemClassFilter,
int? maxResults,
String? nextToken,
List<SupportedStorageEnum>? supportedStorageFilter,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (eC2FamilyFilter != null) 'EC2FamilyFilter': eC2FamilyFilter,
if (itemClassFilter != null)
'ItemClassFilter': itemClassFilter.map((e) => e.value).toList(),
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (nextToken != null) 'NextToken': [nextToken],
if (supportedStorageFilter != null)
'SupportedStorageFilter':
supportedStorageFilter.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/catalog/items',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListCatalogItemsOutput.fromJson(response);
}