getAnomalySubscriptions method
Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
May throw InvalidNextTokenException.
May throw LimitExceededException.
May throw UnknownSubscriptionException.
Parameter maxResults :
The number of entries a paginated response contains.
Parameter monitorArn :
Cost anomaly monitor ARNs.
Parameter nextPageToken :
The token to retrieve the next set of results. Amazon Web Services
provides the token when the response from a previous call has more results
than the maximum page size.
Parameter subscriptionArnList :
A list of cost anomaly subscription ARNs.
Implementation
Future<GetAnomalySubscriptionsResponse> getAnomalySubscriptions({
int? maxResults,
String? monitorArn,
String? nextPageToken,
List<String>? subscriptionArnList,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSInsightsIndexService.GetAnomalySubscriptions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (monitorArn != null) 'MonitorArn': monitorArn,
if (nextPageToken != null) 'NextPageToken': nextPageToken,
if (subscriptionArnList != null)
'SubscriptionArnList': subscriptionArnList,
},
);
return GetAnomalySubscriptionsResponse.fromJson(jsonResponse.body);
}