AWS CodeBuild
API Reference (API Version 2016-10-06)

Build

Information about a build.

Contents

Note

In the following list, the required parameters are described first.

arn

The Amazon Resource Name (ARN) of the build.

Type: String

Length Constraints: Minimum length of 1.

Required: No

artifacts

Information about the output artifacts for the build.

Type: BuildArtifacts object

Required: No

buildComplete

Whether the build is complete. True if complete; otherwise, false.

Type: Boolean

Required: No

buildStatus

The current status of the build. Valid values include:

  • FAILED: The build failed.

  • FAULT: The build faulted.

  • IN_PROGRESS: The build is still in progress.

  • STOPPED: The build stopped.

  • SUCCEEDED: The build succeeded.

  • TIMED_OUT: The build timed out.

Type: String

Valid Values: SUCCEEDED | FAILED | FAULT | TIMED_OUT | IN_PROGRESS | STOPPED

Required: No

cache

Information about the cache for the build.

Type: ProjectCache object

Required: No

currentPhase

The current build phase.

Type: String

Required: No

encryptionKey

The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.

This is expressed either as the Amazon Resource Name (ARN) of the CMK or, if specified, the CMK's alias (using the format alias/alias-name ).

Type: String

Length Constraints: Minimum length of 1.

Required: No

endTime

When the build process ended, expressed in Unix time format.

Type: Timestamp

Required: No

environment

Information about the build environment for this build.

Type: ProjectEnvironment object

Required: No

id

The unique ID for the build.

Type: String

Length Constraints: Minimum length of 1.

Required: No

initiator

The entity that started the build. Valid values include:

  • If AWS CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline).

  • If an AWS Identity and Access Management (IAM) user started the build, the user's name (for example, MyUserName).

  • If the Jenkins plugin for AWS CodeBuild started the build, the string CodeBuild-Jenkins-Plugin.

Type: String

Required: No

logs

Information about the build's logs in Amazon CloudWatch Logs.

Type: LogsLocation object

Required: No

networkInterface

Describes a network interface.

Type: NetworkInterface object

Required: No

phases

Information about all previous build phases that are complete and information about any current build phase that is not yet complete.

Type: Array of BuildPhase objects

Required: No

projectName

The name of the AWS CodeBuild project.

Type: String

Length Constraints: Minimum length of 1.

Required: No

queuedTimeoutInMinutes

The number of minutes a build is allowed to be queued before it times out.

Type: Integer

Required: No

resolvedSourceVersion

An identifier for the version of this build's source code.

  • For AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID.

  • For AWS CodePipeline, the source revision provided by AWS CodePipeline.

  • For Amazon Simple Storage Service (Amazon S3), this does not apply.

Type: String

Length Constraints: Minimum length of 1.

Required: No

secondaryArtifacts

An array of ProjectArtifacts objects.

Type: Array of BuildArtifacts objects

Array Members: Minimum number of 0 items. Maximum number of 12 items.

Required: No

secondarySources

An array of ProjectSource objects.

Type: Array of ProjectSource objects

Array Members: Minimum number of 0 items. Maximum number of 12 items.

Required: No

secondarySourceVersions

An array of ProjectSourceVersion objects. Each ProjectSourceVersion must be one of:

  • For AWS CodeCommit: the commit ID to use.

  • For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example, pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.

  • For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.

  • For Amazon Simple Storage Service (Amazon S3): the version ID of the object that represents the build input ZIP file to use.

Type: Array of ProjectSourceVersion objects

Array Members: Minimum number of 0 items. Maximum number of 12 items.

Required: No

serviceRole

The name of a service role used for this build.

Type: String

Length Constraints: Minimum length of 1.

Required: No

source

Information about the source code to be built.

Type: ProjectSource object

Required: No

sourceVersion

Any version identifier for the version of the source code to be built.

Type: String

Length Constraints: Minimum length of 1.

Required: No

startTime

When the build process started, expressed in Unix time format.

Type: Timestamp

Required: No

timeoutInMinutes

How long, in minutes, for AWS CodeBuild to wait before timing out this build if it does not get marked as completed.

Type: Integer

Required: No

vpcConfig

If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You must provide at least one security group and one subnet ID.

Type: VpcConfig object

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

On this page: