updateApplication method
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);
}