listSolutions method
Retrieves a list of Partner Solutions that the partner registered on Partner Central. This API is used to generate a list of solutions that an end user selects from for association with an opportunity.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
Specifies the catalog associated with the request. This field takes a
string value from a predefined list: AWS or
Sandbox. The catalog determines which environment the
solutions are listed in. Use AWS to list solutions in the
Amazon Web Services catalog, and Sandbox to list solutions in
a secure and isolated testing environment.
Parameter awsMarketplaceSolutionArn :
Filters results by AWS Marketplace solution ARN. You can provide up to 10
ARNs.
Parameter category :
Filters the solutions based on the category to which they belong. This
allows partners to search for solutions within specific categories, such
as Software, Consulting, or Managed
Services.
Parameter identifier :
Filters the solutions based on their unique identifier. Use this filter to
retrieve specific solutions by providing the solution's identifier for
accurate results.
Parameter maxResults :
The maximum number of results returned by a single call. This value must
be provided in the next call to retrieve the next set of results.
Default: 20
Parameter nextToken :
A pagination token used to retrieve the next set of results in subsequent
calls. This token is included in the response only if there are additional
result pages available.
Parameter sort :
Object that configures sorting done on the response. Default
Sort.SortBy is Identifier.
Parameter status :
Filters solutions based on their status. This filter helps partners manage
their solution portfolios effectively.
Implementation
Future<ListSolutionsResponse> listSolutions({
required String catalog,
List<String>? awsMarketplaceSolutionArn,
List<String>? category,
List<String>? identifier,
int? maxResults,
String? nextToken,
SolutionSort? sort,
List<SolutionStatus>? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.ListSolutions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
if (awsMarketplaceSolutionArn != null)
'AwsMarketplaceSolutionArn': awsMarketplaceSolutionArn,
if (category != null) 'Category': category,
if (identifier != null) 'Identifier': identifier,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sort != null) 'Sort': sort,
if (status != null) 'Status': status.map((e) => e.value).toList(),
},
);
return ListSolutionsResponse.fromJson(jsonResponse.body);
}