updateApp method
Updates the specified application.
May throw UnauthorizedOperationException. May throw InvalidParameterException. May throw MissingRequiredParameterException. May throw InternalError. May throw OperationNotPermittedException.
Parameter appId
:
The ID of the application.
Parameter description
:
The new description of the application.
Parameter name
:
The new name of the application.
Parameter roleName
:
The name of the service role in the customer's account used by AWS SMS.
Parameter serverGroups
:
The server groups in the application to update.
Parameter tags
:
The tags to associate with the application.
Implementation
Future<UpdateAppResponse> updateApp({
String? appId,
String? description,
String? name,
String? roleName,
List<ServerGroup>? serverGroups,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSServerMigrationService_V2016_10_24.UpdateApp'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (appId != null) 'appId': appId,
if (description != null) 'description': description,
if (name != null) 'name': name,
if (roleName != null) 'roleName': roleName,
if (serverGroups != null) 'serverGroups': serverGroups,
if (tags != null) 'tags': tags,
},
);
return UpdateAppResponse.fromJson(jsonResponse.body);
}