listWorkloadEstimates method
Lists all workload estimates for the account.
May throw DataUnavailableException.
Parameter createdAtFilter :
Filter workload estimates based on the creation date.
Parameter expiresAtFilter :
Filter workload estimates based on the expiration date.
Parameter filters :
Filters to apply to the list of workload estimates.
Parameter maxResults :
The maximum number of results to return per page.
Parameter nextToken :
A token to retrieve the next page of results.
Implementation
Future<ListWorkloadEstimatesResponse> listWorkloadEstimates({
FilterTimestamp? createdAtFilter,
FilterTimestamp? expiresAtFilter,
List<ListWorkloadEstimatesFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
25,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBCMPricingCalculator.ListWorkloadEstimates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (createdAtFilter != null) 'createdAtFilter': createdAtFilter,
if (expiresAtFilter != null) 'expiresAtFilter': expiresAtFilter,
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListWorkloadEstimatesResponse.fromJson(jsonResponse.body);
}