listApplicationSnapshots method

Future<ListApplicationSnapshotsResponse> listApplicationSnapshots({
  1. required String applicationName,
  2. int? limit,
  3. String? nextToken,
})

Lists information about the current application snapshots.

May throw InvalidArgumentException. May throw UnsupportedOperationException.

Parameter applicationName : The name of an existing application.

Parameter limit : The maximum number of application snapshots to list.

Parameter nextToken : Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

Implementation

Future<ListApplicationSnapshotsResponse> listApplicationSnapshots({
  required String applicationName,
  int? limit,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    128,
    isRequired: true,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    512,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'KinesisAnalytics_20180523.ListApplicationSnapshots'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListApplicationSnapshotsResponse.fromJson(jsonResponse.body);
}