updateApplication method

Future<UpdateApplicationResult> updateApplication({
  1. required String name,
  2. String? appBlockArn,
  3. List<ApplicationAttribute>? attributesToDelete,
  4. String? description,
  5. String? displayName,
  6. S3Location? iconS3Location,
  7. String? launchParameters,
  8. String? launchPath,
  9. String? workingDirectory,
})

Updates the specified application.

May throw ConcurrentModificationException. May throw OperationNotPermittedException. May throw ResourceNotFoundException.

Parameter name : The name of the application. This name is visible to users when display name is not specified.

Parameter appBlockArn : The ARN of the app block.

Parameter attributesToDelete : The attributes to delete for an application.

Parameter description : The description of the application.

Parameter displayName : The display name of the application. This name is visible to users in the application catalog.

Parameter iconS3Location : The icon S3 location of the application.

Parameter launchParameters : The launch parameters of the application.

Parameter launchPath : The launch path of the application.

Parameter workingDirectory : The working directory of the application.

Implementation

Future<UpdateApplicationResult> updateApplication({
  required String name,
  String? appBlockArn,
  List<ApplicationAttribute>? attributesToDelete,
  String? description,
  String? displayName,
  S3Location? iconS3Location,
  String? launchParameters,
  String? launchPath,
  String? workingDirectory,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.UpdateApplication'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      if (appBlockArn != null) 'AppBlockArn': appBlockArn,
      if (attributesToDelete != null)
        'AttributesToDelete': attributesToDelete.map((e) => e.value).toList(),
      if (description != null) 'Description': description,
      if (displayName != null) 'DisplayName': displayName,
      if (iconS3Location != null) 'IconS3Location': iconS3Location,
      if (launchParameters != null) 'LaunchParameters': launchParameters,
      if (launchPath != null) 'LaunchPath': launchPath,
      if (workingDirectory != null) 'WorkingDirectory': workingDirectory,
    },
  );

  return UpdateApplicationResult.fromJson(jsonResponse.body);
}