Updates the specified application version to have the specified properties.
If a property (for example, description) is not provided, the value remains unchanged. To clear properties, specify an empty string.
Parameters:
-
application_name
(ApplicationName)
–
The name of the application associated with this version.
If no application is found with this name, UpdateApplication returns an InvalidParameterValue error.
-
version_label
(VersionLabel)
–
The name of the version to update.
If no application version is found with this label, UpdateApplication returns an InvalidParameterValue error.
-
description
(Optional[Description], default:
None
)
–
A new description for this version.
Raises:
Examples:
To change an application version's description
The following operation updates the description of an application version named 22a0-stage-150819_185942:
>>> await client.update_application_version(application_name='my-app', version_label='22a0-stage-150819_185942', description='new description')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
| async def update_application_version(
self,
application_name: "capo_elastic_beanstalk.types.application_name.ApplicationName",
version_label: "capo_elastic_beanstalk.types.version_label.VersionLabel",
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
description: Optional[
"capo_elastic_beanstalk.types.description.Description"
] = None,
) -> "capo_elastic_beanstalk.types.application_version_description_message.ApplicationVersionDescriptionMessage":
"""<p>Updates the specified application version 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 properties, specify an empty string.</p> </note>
Args:
application_name: <p>The name of the application associated with this version.</p> <p> If no application is found with this name, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.</p>
version_label: <p>The name of the version to update.</p> <p>If no application version is found with this label, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error. </p>
description: <p>A new description for this version.</p>
Raises:
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To change an application version's description
The following operation updates the description of an application version named 22a0-stage-150819_185942:
>>> await client.update_application_version(application_name='my-app', version_label='22a0-stage-150819_185942', description='new description')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_beanstalk.types.update_application_version_message.UpdateApplicationVersionMessage]",
) -> AsyncOperationResponse[
"capo_elastic_beanstalk.types.application_version_description_message.ApplicationVersionDescriptionMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application_version
(
output,
http_response,
) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application_version.async_update_application_version(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateApplicationVersion")
)
input_: capo_elastic_beanstalk.types.update_application_version_message.UpdateApplicationVersionMessage = {
"application_name": application_name,
"version_label": version_label,
}
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
|