updateApplication method
Updates an application and creates a new version.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The unique identifier of the application you want to update.
Parameter currentApplicationVersion :
The current version of the application to update.
Parameter definition :
The application definition for this application. You can specify either
inline JSON or an S3 bucket location.
Parameter description :
The description of the application to update.
Implementation
Future<UpdateApplicationResponse> updateApplication({
required String applicationId,
required int currentApplicationVersion,
Definition? definition,
String? description,
}) async {
_s.validateNumRange(
'currentApplicationVersion',
currentApplicationVersion,
1,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
'currentApplicationVersion': currentApplicationVersion,
if (definition != null) 'definition': definition,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/applications/${Uri.encodeComponent(applicationId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateApplicationResponse.fromJson(response);
}