Skip to content

update_application_version

update_application_version(
    application_name: ApplicationName,
    version_label: VersionLabel,
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    description: Optional[Description] = None,
) -> ApplicationVersionDescriptionMessage

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:

>>> 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/elastic_beanstalk.py
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[ElasticBeanstalkClientConfig] = 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:

        >>> client.update_application_version(application_name='my-app', version_label='22a0-stage-150819_185942', description='new description')
    """

    def _handler(
        req: "OperationRequest[capo_elastic_beanstalk.types.update_application_version_message.UpdateApplicationVersionMessage]",
    ) -> OperationResponse[
        "capo_elastic_beanstalk.types.application_version_description_message.ApplicationVersionDescriptionMessage"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application_version

        output, http_response = (
            capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.update_application_version.update_application_version(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output