AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates an application version for the specified application. You can create an application version from a source bundle in Amazon S3, a commit in AWS CodeCommit, or the output of an AWS CodeBuild build as follows:

Specify a commit in an AWS CodeCommit repository with SourceBuildInformation.

Specify a build in an AWS CodeBuild with SourceBuildInformation and BuildConfiguration.

Specify a source bundle in S3 with SourceBundle

Omit both SourceBuildInformation and SourceBundle to use the default sample application.

Once you create an application version with a specified Amazon S3 bucket and key location, you cannot change that Amazon S3 location. If you change the Amazon S3 location, you receive an exception when you attempt to launch an environment from the application version.

Note:

For PCL this operation is only available in asynchronous form. Please refer to CreateApplicationVersionAsync.

Namespace: Amazon.ElasticBeanstalk
Assembly: AWSSDK.ElasticBeanstalk.dll
Version: 3.x.y.z

Syntax

C#
public virtual CreateApplicationVersionResponse CreateApplicationVersion(
         CreateApplicationVersionRequest request
)
Parameters
request
Type: Amazon.ElasticBeanstalk.Model.CreateApplicationVersionRequest

Container for the necessary parameters to execute the CreateApplicationVersion service method.

Return Value
The response from the CreateApplicationVersion service method, as returned by ElasticBeanstalk.

Exceptions

ExceptionCondition
CodeBuildNotInServiceRegionException AWS CodeBuild is not available in the specified region.
InsufficientPrivilegesException The specified account does not have sufficient privileges for one of more AWS services.
S3LocationNotInServiceRegionException The specified S3 bucket does not belong to the S3 region in which the service is running. The following regions are supported: IAD/us-east-1 PDX/us-west-2 DUB/eu-west-1
TooManyApplicationsException The specified account has reached its limit of applications.
TooManyApplicationVersionsException The specified account has reached its limit of application versions.

Examples

The following operation creates a new version (v1) of an application named my-app:

To create a new application


var response = client.CreateApplication(new CreateApplicationRequest 
{
    ApplicationName = "my-app",
    Description = "my application"
});

ApplicationDescription application = response.Application;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also