createApplication method
Future<ApplicationDescriptionMessage>
createApplication({
- required String applicationName,
- String? description,
- ApplicationResourceLifecycleConfig? resourceLifecycleConfig,
- List<
Tag> ? tags,
Creates an application that has one configuration template named
default
and no application versions.
May throw TooManyApplicationsException.
Parameter applicationName
:
The name of the application. Must be unique within your account.
Parameter description
:
Your description of the application.
Parameter resourceLifecycleConfig
:
Specifies an application resource lifecycle configuration to prevent your
application from accumulating too many versions.
Parameter tags
:
Specifies the tags applied to the application.
Elastic Beanstalk applies these tags only to the application. Environments that you create in the application don't inherit the tags.
Implementation
Future<ApplicationDescriptionMessage> createApplication({
required String applicationName,
String? description,
ApplicationResourceLifecycleConfig? resourceLifecycleConfig,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(applicationName, 'applicationName');
_s.validateStringLength(
'applicationName',
applicationName,
1,
100,
isRequired: true,
);
_s.validateStringLength(
'description',
description,
0,
200,
);
final $request = <String, dynamic>{};
$request['ApplicationName'] = applicationName;
description?.also((arg) => $request['Description'] = arg);
resourceLifecycleConfig
?.also((arg) => $request['ResourceLifecycleConfig'] = arg);
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateApplication',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateApplicationMessage'],
shapes: shapes,
resultWrapper: 'CreateApplicationResult',
);
return ApplicationDescriptionMessage.fromXml($result);
}