listBenefitApplications method

Future<ListBenefitApplicationsOutput> listBenefitApplications({
  1. required String catalog,
  2. List<String>? associatedResourceArns,
  3. List<AssociatedResource>? associatedResources,
  4. List<String>? benefitIdentifiers,
  5. List<FulfillmentType>? fulfillmentTypes,
  6. int? maxResults,
  7. String? nextToken,
  8. List<String>? programs,
  9. List<String>? stages,
  10. List<BenefitApplicationStatus>? status,
})

Retrieves a paginated list of benefit applications based on specified filter criteria.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : The catalog identifier to filter benefit applications by catalog.

Parameter associatedResourceArns : Filter benefit applications by specific AWS resource ARNs.

Parameter associatedResources : Filter benefit applications by associated AWS resources.

Parameter benefitIdentifiers : Filter benefit applications by specific benefit identifiers.

Parameter fulfillmentTypes : Filter benefit applications by specific fulfillment types.

Parameter maxResults : The maximum number of benefit applications to return in a single response.

Parameter nextToken : A pagination token to retrieve the next set of results from a previous request.

Parameter programs : Filter benefit applications by specific AWS partner programs.

Parameter stages : Filter benefit applications by their current processing stage.

Parameter status : Filter benefit applications by their current processing status.

Implementation

Future<ListBenefitApplicationsOutput> listBenefitApplications({
  required String catalog,
  List<String>? associatedResourceArns,
  List<AssociatedResource>? associatedResources,
  List<String>? benefitIdentifiers,
  List<FulfillmentType>? fulfillmentTypes,
  int? maxResults,
  String? nextToken,
  List<String>? programs,
  List<String>? stages,
  List<BenefitApplicationStatus>? status,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralBenefitsService.ListBenefitApplications'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      if (associatedResourceArns != null)
        'AssociatedResourceArns': associatedResourceArns,
      if (associatedResources != null)
        'AssociatedResources': associatedResources,
      if (benefitIdentifiers != null)
        'BenefitIdentifiers': benefitIdentifiers,
      if (fulfillmentTypes != null)
        'FulfillmentTypes': fulfillmentTypes.map((e) => e.value).toList(),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (programs != null) 'Programs': programs,
      if (stages != null) 'Stages': stages,
      if (status != null) 'Status': status.map((e) => e.value).toList(),
    },
  );

  return ListBenefitApplicationsOutput.fromJson(jsonResponse.body);
}