createApplicationSnapshot method

Future<void> createApplicationSnapshot({
  1. required String applicationName,
  2. required String snapshotName,
})

Creates a snapshot of the application's state data.

May throw ResourceInUseException. May throw ResourceNotFoundException. May throw LimitExceededException. May throw InvalidArgumentException. May throw UnsupportedOperationException. May throw InvalidRequestException. May throw InvalidApplicationConfigurationException.

Parameter applicationName : The name of an existing application

Parameter snapshotName : An identifier for the application snapshot.

Implementation

Future<void> createApplicationSnapshot({
  required String applicationName,
  required String snapshotName,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(snapshotName, 'snapshotName');
  _s.validateStringLength(
    'snapshotName',
    snapshotName,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'KinesisAnalytics_20180523.CreateApplicationSnapshot'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'SnapshotName': snapshotName,
    },
  );
}