createApplication method
An application in AppConfig is a logical unit of code that provides capabilities for your customers. For example, an application can be a microservice that runs on Amazon EC2 instances, a mobile application installed by your users, a serverless application using Amazon API Gateway and AWS Lambda, or any system you run on behalf of others.
May throw BadRequestException. May throw InternalServerException.
Parameter name
:
A name for the application.
Parameter description
:
A description of the application.
Parameter tags
:
Metadata to assign to the application. Tags help organize and categorize
your AppConfig resources. Each tag consists of a key and an optional
value, both of which you define.
Implementation
Future<Application> createApplication({
required String name,
String? description,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
64,
isRequired: true,
);
_s.validateStringLength(
'description',
description,
0,
1024,
);
final $payload = <String, dynamic>{
'Name': name,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/applications',
exceptionFnMap: _exceptionFns,
);
return Application.fromJson(response);
}