ElasticBeanstalk / Client / delete_application_version

delete_application_version#

ElasticBeanstalk.Client.delete_application_version(**kwargs)#

Deletes the specified version from the specified application.

Note

You cannot delete an application version that is associated with a running environment.

See also: AWS API Documentation

Request Syntax

response = client.delete_application_version(
    ApplicationName='string',
    VersionLabel='string',
    DeleteSourceBundle=True|False
)
Parameters:
  • ApplicationName (string) –

    [REQUIRED]

    The name of the application to which the version belongs.

  • VersionLabel (string) –

    [REQUIRED]

    The label of the version to delete.

  • DeleteSourceBundle (boolean) – Set to true to delete the source bundle from your storage bucket. Otherwise, the application version is deleted only from Elastic Beanstalk and the source bundle remains in Amazon S3.

Returns:

None

Exceptions

Examples

The following operation deletes an application version named 22a0-stage-150819_182129 for an application named my-app:

response = client.delete_application_version(
    ApplicationName='my-app',
    DeleteSourceBundle=True,
    VersionLabel='22a0-stage-150819_182129',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}