createApplication method
Creates an application with the given name and description.
May throw AuthorizationErrorException.
May throw HomeRegionNotSetException.
May throw InvalidParameterException.
May throw InvalidParameterValueException.
May throw ServerInternalErrorException.
Parameter name :
The name of the application to be created.
Parameter description :
The description of the application to be created.
Parameter wave :
The name of the migration wave of the application to be created.
Implementation
Future<CreateApplicationResponse> createApplication({
required String name,
String? description,
String? wave,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSPoseidonService_V2015_11_01.CreateApplication'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
if (description != null) 'description': description,
if (wave != null) 'wave': wave,
},
);
return CreateApplicationResponse.fromJson(jsonResponse.body);
}