Creates an application that has one configuration template named default and no application versions.
Parameters:
-
application_name
(ApplicationName)
–
The name of the application. Must be unique within your account.
-
description
(Optional[Description], default:
None
)
–
Your description of the application.
-
resource_lifecycle_config
(Optional[ApplicationResourceLifecycleConfig], default:
None
)
–
Specifies an application resource lifecycle configuration to prevent your application from accumulating too many versions.
-
tags
(Optional[Tags], default:
None
)
–
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.
Raises:
Examples:
To create a new application
The following operation creates a new application named my-app:
>>> await client.create_application(application_name='my-app', description='my application')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
| async def create_application(
self,
application_name: "capo_elastic_beanstalk.types.application_name.ApplicationName",
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
description: Optional[
"capo_elastic_beanstalk.types.description.Description"
] = None,
resource_lifecycle_config: Optional[
"capo_elastic_beanstalk.types.application_resource_lifecycle_config.ApplicationResourceLifecycleConfig"
] = None,
tags: Optional["capo_elastic_beanstalk.types.tags.Tags"] = None,
) -> "capo_elastic_beanstalk.types.application_description_message.ApplicationDescriptionMessage":
"""<p>Creates an application that has one configuration template named <code>default</code> and no application versions.</p>
Args:
application_name: <p>The name of the application. Must be unique within your account.</p>
description: <p>Your description of the application.</p>
resource_lifecycle_config: <p>Specifies an application resource lifecycle configuration to prevent your application from accumulating too many versions.</p>
tags: <p>Specifies the tags applied to the application.</p> <p>Elastic Beanstalk applies these tags only to the application. Environments that you create in the application don't inherit the tags.</p>
Raises:
capo_elastic_beanstalk.errors.too_many_applications_exception.TooManyApplicationsException: <p>The specified account has reached its limit of applications.</p>
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To create a new application
The following operation creates a new application named my-app:
>>> await client.create_application(application_name='my-app', description='my application')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_beanstalk.types.create_application_message.CreateApplicationMessage]",
) -> AsyncOperationResponse[
"capo_elastic_beanstalk.types.application_description_message.ApplicationDescriptionMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.create_application
(
output,
http_response,
) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.create_application.async_create_application(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateApplication")
)
input_: capo_elastic_beanstalk.types.create_application_message.CreateApplicationMessage = {
"application_name": application_name
}
if description is not None:
input_["description"] = description
if resource_lifecycle_config is not None:
input_["resource_lifecycle_config"] = resource_lifecycle_config
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|