putPlatformProjectsByProjectAppsByAppEnvWithHttpInfo method
Replaces an app's environment variables.
Replaces an app's environment variables. It writes the app's whole environment set and answers the updated application. This is the one post-create write path for env, and it REPLACES rather than merges: a variable absent from the body is gone, and a secret dropped from the set leaves the app's Secret on its next deploy. Keys must match ^[A-Za-z_][A-Za-z0-9_]*$. A value marked secret: true is sealed into KMS and blanked in the database, so plaintext is never persisted — and the write fails 503 if KMS is unavailable rather than storing one in the clear. The rule worth knowing: this does not restart anything. Once the app has been deployed the secret sync is re-declared immediately so the operator re-materialises the Secret, but RUNNING pods keep the environment they started with until their next deploy or restart. Requires a validated principal; 403 without one.
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> putPlatformProjectsByProjectAppsByAppEnvWithHttpInfo(String project, String app, SetEnvReq setEnvReq,) async {
// ignore: prefer_const_declarations
final path = r'/v1/platform/projects/{project}/apps/{app}/env'
.replaceAll('{project}', project)
.replaceAll('{app}', app);
// ignore: prefer_final_locals
Object? postBody = setEnvReq;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}