createApplication method
Creates an application with the given name and description.
May throw AuthorizationErrorException. May throw InvalidParameterException. May throw InvalidParameterValueException. May throw ServerInternalErrorException. May throw HomeRegionNotSetException.
Parameter name
:
Name of the application to be created.
Parameter description
:
Description of the application to be created.
Implementation
Future<CreateApplicationResponse> createApplication({
required String name,
String? description,
}) async {
ArgumentError.checkNotNull(name, 'name');
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,
},
);
return CreateApplicationResponse.fromJson(jsonResponse.body);
}