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:
>>> client.update_application(application_name='my-app', description='my Elastic Beanstalk application')
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
| def update_application(
self,
application_name: "capo_elastic_beanstalk.types.application_name.ApplicationName",
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = 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:
>>> client.update_application(application_name='my-app', description='my Elastic Beanstalk application')
"""
def _handler(
req: "OperationRequest[capo_elastic_beanstalk.types.update_application_message.UpdateApplicationMessage]",
) -> OperationResponse[
"capo_elastic_beanstalk.types.application_description_message.ApplicationDescriptionMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application
output, http_response = (
capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application.update_application(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|