AWS Elastic Beanstalk

2016/12/01 - AWS Elastic Beanstalk - 3 updated api methods

Changes  Integrates AWS CodeBuild into ElasticBeanstalk.

CreateApplicationVersion (updated) Link ¶
Changes (request, response)
Request
{'BuildConfiguration': {'ArtifactName': 'string',
                        'CodeBuildServiceRole': 'string',
                        'ComputeType': 'BUILD_GENERAL1_SMALL | '
                                       'BUILD_GENERAL1_MEDIUM | '
                                       'BUILD_GENERAL1_LARGE',
                        'Image': 'string',
                        'TimeoutInMinutes': 'integer'},
 'SourceBuildInformation': {'SourceRepository': ['S3'], 'SourceType': ['Zip']}}
Response
{'ApplicationVersion': {'BuildArn': 'string',
                        'SourceBuildInformation': {'SourceRepository': ['S3'],
                                                   'SourceType': ['Zip']},
                        'Status': ['Building']}}

Creates an application version for the specified application.

Note

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.

See also: AWS API Documentation

Request Syntax

client.create_application_version(
    ApplicationName='string',
    VersionLabel='string',
    Description='string',
    SourceBuildInformation={
        'SourceType': 'Git'|'Zip',
        'SourceRepository': 'CodeCommit'|'S3',
        'SourceLocation': 'string'
    },
    SourceBundle={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    BuildConfiguration={
        'ArtifactName': 'string',
        'CodeBuildServiceRole': 'string',
        'ComputeType': 'BUILD_GENERAL1_SMALL'|'BUILD_GENERAL1_MEDIUM'|'BUILD_GENERAL1_LARGE',
        'Image': 'string',
        'TimeoutInMinutes': 123
    },
    AutoCreateApplication=True|False,
    Process=True|False
)
type ApplicationName

string

param ApplicationName

[REQUIRED]

The name of the application. If no application is found with this name, and AutoCreateApplication is false , returns an InvalidParameterValue error.

type VersionLabel

string

param VersionLabel

[REQUIRED]

A label identifying this version.

Constraint: Must be unique per application. If an application version already exists with this label for the specified application, AWS Elastic Beanstalk returns an InvalidParameterValue error.

type Description

string

param Description

Describes this version.

type SourceBuildInformation

dict

param SourceBuildInformation

Specify a commit in an AWS CodeCommit Git repository to use as the source code for the application version.

Specify a commit in an AWS CodeCommit repository or a source bundle in S3 (with SourceBundle ), but not both. If neither SourceBundle nor SourceBuildInformation are provided, Elastic Beanstalk uses a sample application.

  • SourceType (string) -- [REQUIRED]

    The type of repository, such as Git .

  • SourceRepository (string) -- [REQUIRED]

    Location where the repository is stored, such as CodeCommit .

  • SourceLocation (string) -- [REQUIRED]

    The repository name and commit ID, separated by a forward slash. For example, my-repo/265cfa0cf6af46153527f55d6503ec030551f57a .

type SourceBundle

dict

param SourceBundle

The Amazon S3 bucket and key that identify the location of the source bundle for this version.

Specify a source bundle in S3 or a commit in an AWS CodeCommit repository (with SourceBuildInformation ), but not both. If neither SourceBundle nor SourceBuildInformation are provided, Elastic Beanstalk uses a sample application.

  • S3Bucket (string) --

    The Amazon S3 bucket where the data is located.

  • S3Key (string) --

    The Amazon S3 key where the data is located.

type BuildConfiguration

dict

param BuildConfiguration
  • ArtifactName (string) --

  • CodeBuildServiceRole (string) -- [REQUIRED]

  • ComputeType (string) --

  • Image (string) -- [REQUIRED]

  • TimeoutInMinutes (integer) --

type AutoCreateApplication

boolean

param AutoCreateApplication

Set to true to create an application with the specified name if it doesn't already exist.

type Process

boolean

param Process

Preprocesses and validates the environment manifest and configuration files in the source bundle. Validating configuration files can identify issues prior to deploying the application version to an environment.

rtype

dict

returns

Response Syntax

{
    'ApplicationVersion': {
        'ApplicationName': 'string',
        'Description': 'string',
        'VersionLabel': 'string',
        'SourceBuildInformation': {
            'SourceType': 'Git'|'Zip',
            'SourceRepository': 'CodeCommit'|'S3',
            'SourceLocation': 'string'
        },
        'BuildArn': 'string',
        'SourceBundle': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        '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.

      • 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 AWS CodeCommit, the location of the source code for the application version.

        • SourceType (string) --

          The type of repository, such as Git .

        • SourceRepository (string) --

          Location where the repository is stored, such as CodeCommit .

        • SourceLocation (string) --

          The repository name and commit ID, separated by a forward slash. For example, my-repo/265cfa0cf6af46153527f55d6503ec030551f57a .

      • BuildArn (string) --

      • 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.

      • 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.

DescribeApplicationVersions (updated) Link ¶
Changes (response)
{'ApplicationVersions': {'BuildArn': 'string',
                         'SourceBuildInformation': {'SourceRepository': ['S3'],
                                                    'SourceType': ['Zip']},
                         'Status': ['Building']}}

Retrieve a list of application versions.

See also: AWS API Documentation

Request Syntax

client.describe_application_versions(
    ApplicationName='string',
    VersionLabels=[
        'string',
    ],
    MaxRecords=123,
    NextToken='string'
)
type ApplicationName

string

param ApplicationName

Specify an application name to show only application versions for that application.

type VersionLabels

list

param VersionLabels

Specify a version label to show a specific application version.

  • (string) --

type MaxRecords

integer

param MaxRecords

Specify a maximum number of application versions to paginate in the request.

type NextToken

string

param NextToken

Specify a next token to retrieve the next page in a paginated request.

rtype

dict

returns

Response Syntax

{
    'ApplicationVersions': [
        {
            'ApplicationName': 'string',
            'Description': 'string',
            'VersionLabel': 'string',
            'SourceBuildInformation': {
                'SourceType': 'Git'|'Zip',
                'SourceRepository': 'CodeCommit'|'S3',
                'SourceLocation': 'string'
            },
            'BuildArn': 'string',
            'SourceBundle': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'DateCreated': datetime(2015, 1, 1),
            'DateUpdated': datetime(2015, 1, 1),
            'Status': 'Processed'|'Unprocessed'|'Failed'|'Processing'|'Building'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Result message wrapping a list of application version descriptions.

    • ApplicationVersions (list) --

      List of ApplicationVersionDescription objects sorted in order of creation.

      • (dict) --

        Describes the properties of an 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 AWS CodeCommit, the location of the source code for the application version.

          • SourceType (string) --

            The type of repository, such as Git .

          • SourceRepository (string) --

            Location where the repository is stored, such as CodeCommit .

          • SourceLocation (string) --

            The repository name and commit ID, separated by a forward slash. For example, my-repo/265cfa0cf6af46153527f55d6503ec030551f57a .

        • BuildArn (string) --

        • 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.

        • 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.

    • NextToken (string) --

      For a paginated request, the token that you can pass in a subsequent request to get the next page.

UpdateApplicationVersion (updated) Link ¶
Changes (response)
{'ApplicationVersion': {'BuildArn': 'string',
                        'SourceBuildInformation': {'SourceRepository': ['S3'],
                                                   'SourceType': ['Zip']},
                        'Status': ['Building']}}

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

client.update_application_version(
    ApplicationName='string',
    VersionLabel='string',
    Description='string'
)
type ApplicationName

string

param ApplicationName

[REQUIRED]

The name of the application associated with this version.

If no application is found with this name, UpdateApplication returns an InvalidParameterValue error.

type VersionLabel

string

param VersionLabel

[REQUIRED]

The name of the version to update.

If no application version is found with this label, UpdateApplication returns an InvalidParameterValue error.

type Description

string

param Description

A new description for this version.

rtype

dict

returns

Response Syntax

{
    'ApplicationVersion': {
        'ApplicationName': 'string',
        'Description': 'string',
        'VersionLabel': 'string',
        'SourceBuildInformation': {
            'SourceType': 'Git'|'Zip',
            'SourceRepository': 'CodeCommit'|'S3',
            'SourceLocation': 'string'
        },
        'BuildArn': 'string',
        'SourceBundle': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        '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.

      • 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 AWS CodeCommit, the location of the source code for the application version.

        • SourceType (string) --

          The type of repository, such as Git .

        • SourceRepository (string) --

          Location where the repository is stored, such as CodeCommit .

        • SourceLocation (string) --

          The repository name and commit ID, separated by a forward slash. For example, my-repo/265cfa0cf6af46153527f55d6503ec030551f57a .

      • BuildArn (string) --

      • 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.

      • 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.