listEntities method
Provides the list of entities of a given type.
May throw InternalServiceException. May throw AccessDeniedException. May throw ValidationException. May throw ResourceNotFoundException. May throw ThrottlingException.
Parameter catalog
:
The catalog related to the request. Fixed value:
AWSMarketplace
Parameter entityType
:
The type of entities to retrieve.
Parameter filterList
:
An array of filter objects. Each filter object contains two attributes,
filterName
and filterValues
.
Parameter maxResults
:
Specifies the upper limit of the elements on a single page. If a value
isn't provided, the default value is 20.
Parameter nextToken
:
The value of the next token, if it exists. Null if there are no more
results.
Parameter sort
:
An object that contains two attributes, SortBy
and
SortOrder
.
Implementation
Future<ListEntitiesResponse> listEntities({
required String catalog,
required String entityType,
List<Filter>? filterList,
int? maxResults,
String? nextToken,
Sort? sort,
}) async {
ArgumentError.checkNotNull(catalog, 'catalog');
_s.validateStringLength(
'catalog',
catalog,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(entityType, 'entityType');
_s.validateStringLength(
'entityType',
entityType,
1,
255,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
20,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final $payload = <String, dynamic>{
'Catalog': catalog,
'EntityType': entityType,
if (filterList != null) 'FilterList': filterList,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sort != null) 'Sort': sort,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListEntities',
exceptionFnMap: _exceptionFns,
);
return ListEntitiesResponse.fromJson(response);
}