postPlatformProjectsByProjectAppsByAppStart method

Future<AppView?> postPlatformProjectsByProjectAppsByAppStart(
  1. String project,
  2. String app
)

Starts a stopped app back up.

Starts a stopped app back up. It scales the app's Service back to its configured replica count and marks it live, answering the updated application. It does not redeploy: the image already on the Service CR is what comes back. The billing watermark is reset to now as part of starting, so the org is charged for THIS live span and never for the gap the app spent stopped. An app with no Service CR is 404, an unreachable cluster is 503, and a cluster that refuses the scale is 502. Requires a validated principal; 403 without one.

Parameters:

  • String project (required): Project is the project the application lives under, from the path.

  • String app (required): App is the application's slug, from the path.

Implementation

Future<AppView?> postPlatformProjectsByProjectAppsByAppStart(String project, String app,) async {
  final response = await postPlatformProjectsByProjectAppsByAppStartWithHttpInfo(project, app,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AppView',) as AppView;

  }
  return null;
}