Skip to content

update_application async

update_application(
    application_name: ApplicationName,
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    description: Optional[Description] = None,
) -> ApplicationDescriptionMessage

Updates the specified application to have the specified properties.

If a property (for example, description) is not provided, the value remains unchanged. To clear these properties, specify an empty string.

Parameters:

  • application_name (ApplicationName) –

    The name of the application to update. If no such application is found, UpdateApplication returns an InvalidParameterValue error.

  • description (Optional[Description], default: None ) –

    A new description for the application.

    Default: If not specified, Elastic Beanstalk does not update the description.

Raises:

Examples:

To change an application's description The following operation updates the description of an application named my-app:

>>> await client.update_application(application_name='my-app', description='my Elastic Beanstalk application')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
async def update_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,
) -> "capo_elastic_beanstalk.types.application_description_message.ApplicationDescriptionMessage":
    """<p>Updates the specified application to have the specified properties.</p> <note> <p>If a property (for example, <code>description</code>) is not provided, the value remains unchanged. To clear these properties, specify an empty string.</p> </note>

    Args:
        application_name: <p>The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error. </p>
        description: <p>A new description for the application.</p> <p>Default: If not specified, Elastic Beanstalk does not update the description.</p>

    Raises:
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To change an application's description
        The following operation updates the description of an application named my-app:

        >>> await client.update_application(application_name='my-app', description='my Elastic Beanstalk application')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_beanstalk.types.update_application_message.UpdateApplicationMessage]",
    ) -> AsyncOperationResponse[
        "capo_elastic_beanstalk.types.application_description_message.ApplicationDescriptionMessage"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application

        (
            output,
            http_response,
        ) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application.async_update_application(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateApplication")
    )
    input_: capo_elastic_beanstalk.types.update_application_message.UpdateApplicationMessage = {
        "application_name": application_name
    }
    if description is not None:
        input_["description"] = description

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output