startApplication method

Future<StartApplicationResponse> startApplication({
  1. required String applicationName,
  2. RunConfiguration? runConfiguration,
})

Starts the specified Managed Service for Apache Flink application. After creating an application, you must exclusively call this operation to start your application.

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

Parameter applicationName : The name of the application.

Parameter runConfiguration : Identifies the run configuration (start parameters) of a Managed Service for Apache Flink application.

Implementation

Future<StartApplicationResponse> startApplication({
  required String applicationName,
  RunConfiguration? runConfiguration,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'KinesisAnalytics_20180523.StartApplication'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      if (runConfiguration != null) 'RunConfiguration': runConfiguration,
    },
  );

  return StartApplicationResponse.fromJson(jsonResponse.body);
}