startApp method
Starts a custom app with the configuration specified in the simulation schema.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter domain :
The name of the domain of the app.
Parameter name :
The name of the app.
Parameter simulation :
The name of the simulation of the app.
Parameter clientToken :
A value that you provide to ensure that repeated calls to this API
operation using the same parameters complete only once. A
ClientToken is also known as an idempotency token. A
ClientToken expires after 24 hours.
Parameter description :
The description of the app.
Implementation
Future<StartAppOutput> startApp({
required String domain,
required String name,
required String simulation,
String? clientToken,
String? description,
LaunchOverrides? launchOverrides,
}) async {
final $payload = <String, dynamic>{
'Domain': domain,
'Name': name,
'Simulation': simulation,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (launchOverrides != null) 'LaunchOverrides': launchOverrides,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/startapp',
exceptionFnMap: _exceptionFns,
);
return StartAppOutput.fromJson(response);
}