ElasticBeanstalk / Client / update_application_version
update_application_version¶
- ElasticBeanstalk.Client.update_application_version(**kwargs)¶
Updates the specified application version to have the specified properties.
Note
If a property (for example,
description) is not provided, the value remains unchanged. To clear properties, specify an empty string.See also: AWS API Documentation
Request Syntax
response = client.update_application_version( ApplicationName='string', VersionLabel='string', Description='string' )
- Parameters:
ApplicationName (string) –
[REQUIRED]
The name of the application associated with this version.
If no application is found with this name,
UpdateApplicationreturns anInvalidParameterValueerror.VersionLabel (string) –
[REQUIRED]
The name of the version to update.
If no application version is found with this label,
UpdateApplicationreturns anInvalidParameterValueerror.Description (string) – A new description for this version.
- Return type:
dict
- Returns:
Response Syntax
{ 'ApplicationVersion': { 'ApplicationVersionArn': 'string', 'ApplicationName': 'string', 'Description': 'string', 'VersionLabel': 'string', 'SourceBuildInformation': { 'SourceType': 'Git'|'Zip', 'SourceRepository': 'CodeCommit'|'S3', 'SourceLocation': 'string' }, 'BuildArn': 'string', 'SourceBundle': { 'S3Bucket': 'string', 'S3Key': 'string' }, 'ImageSource': { 'Uri': 'string' }, 'ImageBuildConfiguration': { 'Type': 'docker'|'buildpack', 'DockerfileLocation': 'string', 'Buildpack': 'string', 'Architecture': 'amd64'|'arm64', 'CodeBuildServiceRole': 'string', 'ComputeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE', 'TimeoutInMinutes': 123 }, 'Process': True|False, 'DateCreated': datetime(2015, 1, 1), 'DateUpdated': datetime(2015, 1, 1), 'Status': 'Processed'|'Unprocessed'|'Failed'|'Processing'|'Building' } }
Response Structure
(dict) –
Result message wrapping a single description of an application version.
ApplicationVersion (dict) –
The ApplicationVersionDescription of the application version.
ApplicationVersionArn (string) –
The Amazon Resource Name (ARN) of the application version.
ApplicationName (string) –
The name of the application to which the application version belongs.
Description (string) –
The description of the application version.
VersionLabel (string) –
A unique identifier for the application version.
SourceBuildInformation (dict) –
If the version’s source code was retrieved from CodeCommit, the location of the source code for the application version.
SourceType (string) –
The type of repository.
GitZip
SourceRepository (string) –
Location where the repository is stored.
CodeCommitS3
SourceLocation (string) –
The location of the source code, as a formatted string, depending on the value of
SourceRepositoryFor
CodeCommit, the format is the repository name and commit ID, separated by a forward slash. For example,my-git-repo/265cfa0cf6af46153527f55d6503ec030551f57a.For
S3, the format is the S3 bucket name and object key, separated by a forward slash. For example,my-s3-bucket/Folders/my-source-file.
BuildArn (string) –
Reference to the artifact from the CodeBuild build.
SourceBundle (dict) –
The storage location of the application version’s source bundle in Amazon S3.
S3Bucket (string) –
The Amazon S3 bucket where the data is located.
S3Key (string) –
The Amazon S3 key where the data is located.
ImageSource (dict) –
The location of the container image for the application version.
For an application version created from an image you provide, this is that image. For one that Elastic Beanstalk builds from your source bundle, Elastic Beanstalk fills this in with the image it pushed after the build succeeds.
Uri (string) –
The URI of the container image, including the registry, the repository, and the image tag or digest. For example,
111122223333.dkr.ecr.us-east-1.amazonaws.com/my-repository:latest.
ImageBuildConfiguration (dict) –
The settings that Elastic Beanstalk uses to build a container image from the source bundle of the application version. Not present for an application version created from an image you provide.
Type (string) –
How Elastic Beanstalk builds the container image. Elastic Beanstalk rejects a
Buildthat doesn’t specify it.Valid values:
docker– Elastic Beanstalk builds the image from a Dockerfile in your source bundle. Specify the Dockerfile withDockerfileLocation.buildpack– Elastic Beanstalk builds the image with a Cloud Native Buildpacks builder. Specify the builder withBuildpack.
DockerfileLocation (string) –
The path to the Dockerfile within the source bundle, relative to the root of the source bundle. For example,
backend/Dockerfile.Elastic Beanstalk uses this member only when
Typeisdocker. If you don’t specify it, Elastic Beanstalk uses the Dockerfile at the root of the source bundle.Buildpack (string) –
The Cloud Native Buildpacks builder image that Elastic Beanstalk uses to build the container image. For example,
paketobuildpacks/builder-jammy-base.This member is required when
Typeisbuildpack. Elastic Beanstalk doesn’t provide a default builder.Architecture (string) –
The processor architecture that Elastic Beanstalk builds the container image for. The architecture must match the architecture of the instances in the environment that you deploy the application version to.
Valid values:
amd64– x86-64 instances. This is the default.arm64– Amazon Web Services Graviton instances.
CodeBuildServiceRole (string) –
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that CodeBuild assumes to run the build in your Amazon Web Services account. Elastic Beanstalk rejects a
Buildthat doesn’t specify this role.ComputeType (string) –
The size of the compute resources that run the build. If you don’t specify it, Elastic Beanstalk uses
BUILD_GENERAL1_MEDIUM.Valid values:
BUILD_GENERAL1_SMALL– Use up to 3 GB memory and 2 vCPUs for builds.BUILD_GENERAL1_MEDIUM– Use up to 7 GB memory and 4 vCPUs for builds.BUILD_GENERAL1_LARGE– Use up to 15 GB memory and 8 vCPUs for builds.
TimeoutInMinutes (integer) –
How long, in minutes from 5 to 480 (8 hours), Elastic Beanstalk waits before stopping a build that hasn’t completed. The default is 60 minutes.
Process (boolean) –
Indicates whether Elastic Beanstalk pre-processed and validated the environment manifest (
env.yaml) and configuration files (*.configfiles in the.ebextensionsfolder) in the source bundle of the application version.DateCreated (datetime) –
The creation date of the application version.
DateUpdated (datetime) –
The last modified date of the application version.
Status (string) –
The processing status of the application version. Reflects the state of the application version during its creation. Many of the values are only applicable if you specified
Truefor theProcessparameter of theCreateApplicationVersionaction. The following list describes the possible values.Unprocessed– Application version wasn’t pre-processed or validated. Elastic Beanstalk will validate configuration files during deployment of the application version to an environment.Processing– Elastic Beanstalk is currently processing the application version.Building– Application version is currently undergoing an CodeBuild build.Processed– Elastic Beanstalk was successfully pre-processed and validated.Failed– Either the CodeBuild build failed or configuration files didn’t pass validation. This application version isn’t usable.
Examples
The following operation updates the description of an application version named 22a0-stage-150819_185942:
response = client.update_application_version( ApplicationName='my-app', Description='new description', VersionLabel='22a0-stage-150819_185942', ) print(response)
Expected Output:
{ 'ApplicationVersion': { 'ApplicationName': 'my-app', 'DateCreated': datetime(2015, 8, 19, 18, 59, 17, 2, 231, 0), 'DateUpdated': datetime(2015, 8, 20, 22, 53, 28, 3, 232, 0), 'Description': 'new description', 'SourceBundle': { 'S3Bucket': 'elasticbeanstalk-us-west-2-0123456789012', 'S3Key': 'my-app/22a0-stage-150819_185942.war', }, 'VersionLabel': '22a0-stage-150819_185942', }, 'ResponseMetadata': { '...': '...', }, }