Class: AWS.CodeBuild

Inherits:
AWS.Service show all
Identifier:
codebuild
API Version:
2016-10-06
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Sending a Request Using CodeBuild

var codebuild = new AWS.CodeBuild();
codebuild.batchGetBuilds(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the CodeBuild object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var codebuild = new AWS.CodeBuild({apiVersion: '2016-10-06'});

You can also set the API version globally in AWS.config.apiVersions using the codebuild service identifier:

AWS.config.apiVersions = {
  codebuild: '2016-10-06',
  // other service API versions
};

var codebuild = new AWS.CodeBuild();

Version:

  • 2016-10-06

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.CodeBuild(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a CodeBuild object

var codebuild = new AWS.CodeBuild({apiVersion: '2016-10-06'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.CodeBuild.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.CodeBuild.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.CodeBuild.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

batchGetBuilds(params = {}, callback) ⇒ AWS.Request

Gets information about builds.

Service Reference:

Examples:

Calling the batchGetBuilds operation

var params = {
  ids: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codebuild.batchGetBuilds(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ids — (Array<String>)

      The IDs of the builds.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • builds — (Array<map>)

        Information about the requested builds.

        • id — (String)

          The unique ID for the build.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build.

        • startTime — (Date)

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

        • endTime — (Date)

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

        • currentPhase — (String)

          The current build phase.

        • buildStatus — (String)

          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.

          Possible values include:
          • "SUCCEEDED"
          • "FAILED"
          • "FAULT"
          • "TIMED_OUT"
          • "IN_PROGRESS"
          • "STOPPED"
        • sourceVersion — (String)

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

        • projectName — (String)

          The name of the build project.

        • phases — (Array<map>)

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

          • phaseType — (String)

            The name of the build phase. Valid values include:

            • BUILD: Core build activities typically occur in this build phase.

            • COMPLETED: The build has been completed.

            • DOWNLOAD_SOURCE: Source code is being downloaded in this build phase.

            • FINALIZING: The build process is completing in this build phase.

            • INSTALL: Installation activities typically occur in this build phase.

            • POST_BUILD: Post-build activities typically occur in this build phase.

            • PRE_BUILD: Pre-build activities typically occur in this build phase.

            • PROVISIONING: The build environment is being set up.

            • SUBMITTED: The build has been submitted.

            • UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output location.

            Possible values include:
            • "SUBMITTED"
            • "PROVISIONING"
            • "DOWNLOAD_SOURCE"
            • "INSTALL"
            • "PRE_BUILD"
            • "BUILD"
            • "POST_BUILD"
            • "UPLOAD_ARTIFACTS"
            • "FINALIZING"
            • "COMPLETED"
          • phaseStatus — (String)

            The current status of the build phase. Valid values include:

            • FAILED: The build phase failed.

            • FAULT: The build phase faulted.

            • IN_PROGRESS: The build phase is still in progress.

            • STOPPED: The build phase stopped.

            • SUCCEEDED: The build phase succeeded.

            • TIMED_OUT: The build phase timed out.

            Possible values include:
            • "SUCCEEDED"
            • "FAILED"
            • "FAULT"
            • "TIMED_OUT"
            • "IN_PROGRESS"
            • "STOPPED"
          • startTime — (Date)

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

          • endTime — (Date)

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

          • durationInSeconds — (Integer)

            How long, in seconds, between the starting and ending times of the build's phase.

          • contexts — (Array<map>)

            Additional information about a build phase, especially to help troubleshoot a failed build.

            • statusCode — (String)

              The status code for the context of the build phase.

            • message — (String)

              An explanation of the build phase's context. This explanation might include a command ID and an exit code.

        • source — (map)

          Information about the source code to be built.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the output artifacts for the build.

          • location — (String)

            Information about the location of the build artifacts.

          • sha256sum — (String)

            The SHA-256 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
          • md5sum — (String)

            The MD5 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
        • environment — (map)

          Information about the build environment for this build.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • logs — (map)

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

          • groupName — (String)

            The name of the Amazon CloudWatch Logs group for the build logs.

          • streamName — (String)

            The name of the Amazon CloudWatch Logs stream for the build logs.

          • deepLink — (String)

            The URL to an individual build log in Amazon CloudWatch Logs.

        • timeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build has finished. True if completed; otherwise, false.

        • initiator — (String)

          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.

      • buildsNotFound — (Array<String>)

        The IDs of builds for which information could not be found.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetProjects(params = {}, callback) ⇒ AWS.Request

Gets information about build projects.

Service Reference:

Examples:

Calling the batchGetProjects operation

var params = {
  names: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codebuild.batchGetProjects(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • names — (Array<String>)

      The names of the build projects.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • projects — (Array<map>)

        Information about the requested build projects.

        • name — (String)

          The name of the build project.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build project.

        • description — (String)

          A description that makes the build project easy to identify.

        • source — (map)

          Information about the build input source code for this build project.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the build output artifacts for the build project.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

            • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

            • NO_ARTIFACTS: The build project will not produce any build output.

            • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

            Possible values include:
            • "CODEPIPELINE"
            • "S3"
            • "NO_ARTIFACTS"
          • location — (String)

            Information about the build output artifact location, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output bucket.

          • path — (String)

            Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

            For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, then valid values include:

              • BUILD_ID: Include the build ID in the location of the build output artifact.

              • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

            Possible values include:
            • "NONE"
            • "BUILD_ID"
          • name — (String)

            Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output artifact object.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

          • packaging — (String)

            The type of build output artifact to create, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, valid values include:

              • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
        • environment — (map)

          Information about the build environment for this build project.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • serviceRole — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

        • timeoutInMinutes — (Integer)

          How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.

        • encryptionKey — (String)

          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 CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format alias/alias-name ).

        • tags — (Array<map>)

          The tags for this build project.

          These tags are available for use by AWS services that support AWS CodeBuild build project tags.

          • key — (String)

            The tag's key.

          • value — (String)

            The tag's value.

        • created — (Date)

          When the build project was created, expressed in Unix time format.

        • lastModified — (Date)

          When the build project's settings were last modified, expressed in Unix time format.

      • projectsNotFound — (Array<String>)

        The names of build projects for which information could not be found.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createProject(params = {}, callback) ⇒ AWS.Request

Creates a build project.

Service Reference:

Examples:

Calling the createProject operation

var params = {
  artifacts: { /* required */
    type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  environment: { /* required */
    computeType: BUILD_GENERAL1_SMALL | BUILD_GENERAL1_MEDIUM | BUILD_GENERAL1_LARGE, /* required */
    image: 'STRING_VALUE', /* required */
    type: LINUX_CONTAINER, /* required */
    environmentVariables: [
      {
        name: 'STRING_VALUE', /* required */
        value: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    privilegedMode: true || false
  },
  name: 'STRING_VALUE', /* required */
  source: { /* required */
    type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET, /* required */
    auth: {
      type: OAUTH, /* required */
      resource: 'STRING_VALUE'
    },
    buildspec: 'STRING_VALUE',
    location: 'STRING_VALUE'
  },
  description: 'STRING_VALUE',
  encryptionKey: 'STRING_VALUE',
  serviceRole: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ],
  timeoutInMinutes: 0
};
codebuild.createProject(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the build project.

    • description — (String)

      A description that makes the build project easy to identify.

    • source — (map)

      Information about the build input source code for the build project.

      • typerequired — (String)

        The type of repository that contains the source code to be built. Valid values include:

        • CODECOMMIT: The source code is in an AWS CodeCommit repository.

        • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

        • GITHUB: The source code is in a GitHub repository.

        • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
      • location — (String)

        Information about the location of the source code to be built. Valid values include:

        • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

        • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

        • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

        • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

      • buildspec — (String)

        The build spec declaration to use for the builds in this build project.

        If this value is not specified, a build spec must be included along with the source code to be built.

      • auth — (map)

        Information about the authorization settings for AWS CodeBuild to access the source code to be built.

        This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

        • typerequired — (String)

          The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

          Possible values include:
          • "OAUTH"
        • resource — (String)

          The resource value that applies to the specified authorization type.

    • artifacts — (map)

      Information about the build output artifacts for the build project.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

        • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

        • NO_ARTIFACTS: The build project will not produce any build output.

        • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

        Possible values include:
        • "CODEPIPELINE"
        • "S3"
        • "NO_ARTIFACTS"
      • location — (String)

        Information about the build output artifact location, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output bucket.

      • path — (String)

        Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

        For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, then valid values include:

          • BUILD_ID: Include the build ID in the location of the build output artifact.

          • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

        Possible values include:
        • "NONE"
        • "BUILD_ID"
      • name — (String)

        Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output artifact object.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

      • packaging — (String)

        The type of build output artifact to create, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, valid values include:

          • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
    • environment — (map)

      Information about the build environment for the build project.

      • typerequired — (String)

        The type of build environment to use for related builds.

        Possible values include:
        • "LINUX_CONTAINER"
      • imagerequired — (String)

        The ID of the Docker image to use for this build project.

      • computeTyperequired — (String)

        Information about the compute resources the build project will use. Available values include:

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

        Possible values include:
        • "BUILD_GENERAL1_SMALL"
        • "BUILD_GENERAL1_MEDIUM"
        • "BUILD_GENERAL1_LARGE"
      • environmentVariables — (Array<map>)

        A set of environment variables to make available to builds for this build project.

        • namerequired — (String)

          The name or key of the environment variable.

        • valuerequired — (String)

          The value of the environment variable.

          We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

      • privilegedMode — (Boolean)

        If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

        - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

    • serviceRole — (String)

      The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

    • timeoutInMinutes — (Integer)

      How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any build that has not been marked as completed. The default is 60 minutes.

    • encryptionKey — (String)

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

      You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format alias/alias-name ).

    • tags — (Array<map>)

      A set of tags for this build project.

      These tags are available for use by AWS services that support AWS CodeBuild build project tags.

      • key — (String)

        The tag's key.

      • value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • project — (map)

        Information about the build project that was created.

        • name — (String)

          The name of the build project.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build project.

        • description — (String)

          A description that makes the build project easy to identify.

        • source — (map)

          Information about the build input source code for this build project.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the build output artifacts for the build project.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

            • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

            • NO_ARTIFACTS: The build project will not produce any build output.

            • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

            Possible values include:
            • "CODEPIPELINE"
            • "S3"
            • "NO_ARTIFACTS"
          • location — (String)

            Information about the build output artifact location, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output bucket.

          • path — (String)

            Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

            For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, then valid values include:

              • BUILD_ID: Include the build ID in the location of the build output artifact.

              • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

            Possible values include:
            • "NONE"
            • "BUILD_ID"
          • name — (String)

            Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output artifact object.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

          • packaging — (String)

            The type of build output artifact to create, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, valid values include:

              • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
        • environment — (map)

          Information about the build environment for this build project.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • serviceRole — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

        • timeoutInMinutes — (Integer)

          How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.

        • encryptionKey — (String)

          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 CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format alias/alias-name ).

        • tags — (Array<map>)

          The tags for this build project.

          These tags are available for use by AWS services that support AWS CodeBuild build project tags.

          • key — (String)

            The tag's key.

          • value — (String)

            The tag's value.

        • created — (Date)

          When the build project was created, expressed in Unix time format.

        • lastModified — (Date)

          When the build project's settings were last modified, expressed in Unix time format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteProject(params = {}, callback) ⇒ AWS.Request

Deletes a build project.

Service Reference:

Examples:

Calling the deleteProject operation

var params = {
  name: 'STRING_VALUE' /* required */
};
codebuild.deleteProject(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the build project.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBuilds(params = {}, callback) ⇒ AWS.Request

Gets a list of build IDs, with each build ID representing a single build.

Service Reference:

Examples:

Calling the listBuilds operation

var params = {
  nextToken: 'STRING_VALUE',
  sortOrder: ASCENDING | DESCENDING
};
codebuild.listBuilds(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • sortOrder — (String)

      The order to list build IDs. Valid values include:

      • ASCENDING: List the build IDs in ascending order by build ID.

      • DESCENDING: List the build IDs in descending order by build ID.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • nextToken — (String)

      During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A list of build IDs, with each build ID representing a single build.

      • nextToken — (String)

        If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBuildsForProject(params = {}, callback) ⇒ AWS.Request

Gets a list of build IDs for the specified build project, with each build ID representing a single build.

Service Reference:

Examples:

Calling the listBuildsForProject operation

var params = {
  projectName: 'STRING_VALUE', /* required */
  nextToken: 'STRING_VALUE',
  sortOrder: ASCENDING | DESCENDING
};
codebuild.listBuildsForProject(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • projectName — (String)

      The name of the build project.

    • sortOrder — (String)

      The order to list build IDs. Valid values include:

      • ASCENDING: List the build IDs in ascending order by build ID.

      • DESCENDING: List the build IDs in descending order by build ID.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • nextToken — (String)

      During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A list of build IDs for the specified build project, with each build ID representing a single build.

      • nextToken — (String)

        If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCuratedEnvironmentImages(params = {}, callback) ⇒ AWS.Request

Gets information about Docker images that are managed by AWS CodeBuild.

Service Reference:

Examples:

Calling the listCuratedEnvironmentImages operation

var params = {
};
codebuild.listCuratedEnvironmentImages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • platforms — (Array<map>)

        Information about supported platforms for Docker images that are managed by AWS CodeBuild.

        • platform — (String)

          The platform's name.

          Possible values include:
          • "DEBIAN"
          • "AMAZON_LINUX"
          • "UBUNTU"
        • languages — (Array<map>)

          The list of programming languages that are available for the specified platform.

          • language — (String)

            The programming language for the Docker images.

            Possible values include:
            • "JAVA"
            • "PYTHON"
            • "NODE_JS"
            • "RUBY"
            • "GOLANG"
            • "DOCKER"
            • "ANDROID"
            • "DOTNET"
            • "BASE"
          • images — (Array<map>)

            The list of Docker images that are related by the specified programming language.

            • name — (String)

              The name of the Docker image.

            • description — (String)

              The description of the Docker image.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listProjects(params = {}, callback) ⇒ AWS.Request

Gets a list of build project names, with each build project name representing a single build project.

Service Reference:

Examples:

Calling the listProjects operation

var params = {
  nextToken: 'STRING_VALUE',
  sortBy: NAME | CREATED_TIME | LAST_MODIFIED_TIME,
  sortOrder: ASCENDING | DESCENDING
};
codebuild.listProjects(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • sortBy — (String)

      The criterion to be used to list build project names. Valid values include:

      • CREATED_TIME: List the build project names based on when each build project was created.

      • LAST_MODIFIED_TIME: List the build project names based on when information about each build project was last changed.

      • NAME: List the build project names based on each build project's name.

      Use sortOrder to specify in what order to list the build project names based on the preceding criteria.

      Possible values include:
      • "NAME"
      • "CREATED_TIME"
      • "LAST_MODIFIED_TIME"
    • sortOrder — (String)

      The order in which to list build projects. Valid values include:

      • ASCENDING: List the build project names in ascending order.

      • DESCENDING: List the build project names in descending order.

      Use sortBy to specify the criterion to be used to list build project names.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • nextToken — (String)

      During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

        If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

      • projects — (Array<String>)

        The list of build project names, with each build project name representing a single build project.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startBuild(params = {}, callback) ⇒ AWS.Request

Starts running a build.

Service Reference:

Examples:

Calling the startBuild operation

var params = {
  projectName: 'STRING_VALUE', /* required */
  artifactsOverride: {
    type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  buildspecOverride: 'STRING_VALUE',
  environmentVariablesOverride: [
    {
      name: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  sourceVersion: 'STRING_VALUE',
  timeoutInMinutesOverride: 0
};
codebuild.startBuild(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • projectName — (String)

      The name of the build project to start running a build.

    • sourceVersion — (String)

      A version of the build input to be built, for this build only. If not specified, the latest version will be used. If specified, must be one of:

      • For AWS CodeCommit or GitHub: the commit ID to use.

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

    • artifactsOverride — (map)

      Build output artifact settings that override, for this build only, the latest ones already defined in the build project.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

        • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

        • NO_ARTIFACTS: The build project will not produce any build output.

        • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

        Possible values include:
        • "CODEPIPELINE"
        • "S3"
        • "NO_ARTIFACTS"
      • location — (String)

        Information about the build output artifact location, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output bucket.

      • path — (String)

        Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

        For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, then valid values include:

          • BUILD_ID: Include the build ID in the location of the build output artifact.

          • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

        Possible values include:
        • "NONE"
        • "BUILD_ID"
      • name — (String)

        Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output artifact object.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

      • packaging — (String)

        The type of build output artifact to create, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, valid values include:

          • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
    • environmentVariablesOverride — (Array<map>)

      A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.

      • namerequired — (String)

        The name or key of the environment variable.

      • valuerequired — (String)

        The value of the environment variable.

        We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

    • buildspecOverride — (String)

      A build spec declaration that overrides, for this build only, the latest one already defined in the build project.

    • timeoutInMinutesOverride — (Integer)

      The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, for this build only, the latest setting already defined in the build project.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • build — (map)

        Information about the build to be run.

        • id — (String)

          The unique ID for the build.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build.

        • startTime — (Date)

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

        • endTime — (Date)

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

        • currentPhase — (String)

          The current build phase.

        • buildStatus — (String)

          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.

          Possible values include:
          • "SUCCEEDED"
          • "FAILED"
          • "FAULT"
          • "TIMED_OUT"
          • "IN_PROGRESS"
          • "STOPPED"
        • sourceVersion — (String)

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

        • projectName — (String)

          The name of the build project.

        • phases — (Array<map>)

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

          • phaseType — (String)

            The name of the build phase. Valid values include:

            • BUILD: Core build activities typically occur in this build phase.

            • COMPLETED: The build has been completed.

            • DOWNLOAD_SOURCE: Source code is being downloaded in this build phase.

            • FINALIZING: The build process is completing in this build phase.

            • INSTALL: Installation activities typically occur in this build phase.

            • POST_BUILD: Post-build activities typically occur in this build phase.

            • PRE_BUILD: Pre-build activities typically occur in this build phase.

            • PROVISIONING: The build environment is being set up.

            • SUBMITTED: The build has been submitted.

            • UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output location.

            Possible values include:
            • "SUBMITTED"
            • "PROVISIONING"
            • "DOWNLOAD_SOURCE"
            • "INSTALL"
            • "PRE_BUILD"
            • "BUILD"
            • "POST_BUILD"
            • "UPLOAD_ARTIFACTS"
            • "FINALIZING"
            • "COMPLETED"
          • phaseStatus — (String)

            The current status of the build phase. Valid values include:

            • FAILED: The build phase failed.

            • FAULT: The build phase faulted.

            • IN_PROGRESS: The build phase is still in progress.

            • STOPPED: The build phase stopped.

            • SUCCEEDED: The build phase succeeded.

            • TIMED_OUT: The build phase timed out.

            Possible values include:
            • "SUCCEEDED"
            • "FAILED"
            • "FAULT"
            • "TIMED_OUT"
            • "IN_PROGRESS"
            • "STOPPED"
          • startTime — (Date)

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

          • endTime — (Date)

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

          • durationInSeconds — (Integer)

            How long, in seconds, between the starting and ending times of the build's phase.

          • contexts — (Array<map>)

            Additional information about a build phase, especially to help troubleshoot a failed build.

            • statusCode — (String)

              The status code for the context of the build phase.

            • message — (String)

              An explanation of the build phase's context. This explanation might include a command ID and an exit code.

        • source — (map)

          Information about the source code to be built.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the output artifacts for the build.

          • location — (String)

            Information about the location of the build artifacts.

          • sha256sum — (String)

            The SHA-256 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
          • md5sum — (String)

            The MD5 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
        • environment — (map)

          Information about the build environment for this build.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • logs — (map)

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

          • groupName — (String)

            The name of the Amazon CloudWatch Logs group for the build logs.

          • streamName — (String)

            The name of the Amazon CloudWatch Logs stream for the build logs.

          • deepLink — (String)

            The URL to an individual build log in Amazon CloudWatch Logs.

        • timeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build has finished. True if completed; otherwise, false.

        • initiator — (String)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopBuild(params = {}, callback) ⇒ AWS.Request

Attempts to stop running a build.

Service Reference:

Examples:

Calling the stopBuild operation

var params = {
  id: 'STRING_VALUE' /* required */
};
codebuild.stopBuild(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The ID of the build.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • build — (map)

        Information about the build.

        • id — (String)

          The unique ID for the build.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build.

        • startTime — (Date)

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

        • endTime — (Date)

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

        • currentPhase — (String)

          The current build phase.

        • buildStatus — (String)

          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.

          Possible values include:
          • "SUCCEEDED"
          • "FAILED"
          • "FAULT"
          • "TIMED_OUT"
          • "IN_PROGRESS"
          • "STOPPED"
        • sourceVersion — (String)

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

        • projectName — (String)

          The name of the build project.

        • phases — (Array<map>)

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

          • phaseType — (String)

            The name of the build phase. Valid values include:

            • BUILD: Core build activities typically occur in this build phase.

            • COMPLETED: The build has been completed.

            • DOWNLOAD_SOURCE: Source code is being downloaded in this build phase.

            • FINALIZING: The build process is completing in this build phase.

            • INSTALL: Installation activities typically occur in this build phase.

            • POST_BUILD: Post-build activities typically occur in this build phase.

            • PRE_BUILD: Pre-build activities typically occur in this build phase.

            • PROVISIONING: The build environment is being set up.

            • SUBMITTED: The build has been submitted.

            • UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output location.

            Possible values include:
            • "SUBMITTED"
            • "PROVISIONING"
            • "DOWNLOAD_SOURCE"
            • "INSTALL"
            • "PRE_BUILD"
            • "BUILD"
            • "POST_BUILD"
            • "UPLOAD_ARTIFACTS"
            • "FINALIZING"
            • "COMPLETED"
          • phaseStatus — (String)

            The current status of the build phase. Valid values include:

            • FAILED: The build phase failed.

            • FAULT: The build phase faulted.

            • IN_PROGRESS: The build phase is still in progress.

            • STOPPED: The build phase stopped.

            • SUCCEEDED: The build phase succeeded.

            • TIMED_OUT: The build phase timed out.

            Possible values include:
            • "SUCCEEDED"
            • "FAILED"
            • "FAULT"
            • "TIMED_OUT"
            • "IN_PROGRESS"
            • "STOPPED"
          • startTime — (Date)

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

          • endTime — (Date)

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

          • durationInSeconds — (Integer)

            How long, in seconds, between the starting and ending times of the build's phase.

          • contexts — (Array<map>)

            Additional information about a build phase, especially to help troubleshoot a failed build.

            • statusCode — (String)

              The status code for the context of the build phase.

            • message — (String)

              An explanation of the build phase's context. This explanation might include a command ID and an exit code.

        • source — (map)

          Information about the source code to be built.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the output artifacts for the build.

          • location — (String)

            Information about the location of the build artifacts.

          • sha256sum — (String)

            The SHA-256 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
          • md5sum — (String)

            The MD5 hash of the build artifact.

            You can use this hash along with a checksum tool to confirm both file integrity and authenticity.

            Note: This value is available only if the build project's packaging value is set to ZIP.
        • environment — (map)

          Information about the build environment for this build.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • logs — (map)

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

          • groupName — (String)

            The name of the Amazon CloudWatch Logs group for the build logs.

          • streamName — (String)

            The name of the Amazon CloudWatch Logs stream for the build logs.

          • deepLink — (String)

            The URL to an individual build log in Amazon CloudWatch Logs.

        • timeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build has finished. True if completed; otherwise, false.

        • initiator — (String)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateProject(params = {}, callback) ⇒ AWS.Request

Changes the settings of a build project.

Service Reference:

Examples:

Calling the updateProject operation

var params = {
  name: 'STRING_VALUE', /* required */
  artifacts: {
    type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  description: 'STRING_VALUE',
  encryptionKey: 'STRING_VALUE',
  environment: {
    computeType: BUILD_GENERAL1_SMALL | BUILD_GENERAL1_MEDIUM | BUILD_GENERAL1_LARGE, /* required */
    image: 'STRING_VALUE', /* required */
    type: LINUX_CONTAINER, /* required */
    environmentVariables: [
      {
        name: 'STRING_VALUE', /* required */
        value: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    privilegedMode: true || false
  },
  serviceRole: 'STRING_VALUE',
  source: {
    type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET, /* required */
    auth: {
      type: OAUTH, /* required */
      resource: 'STRING_VALUE'
    },
    buildspec: 'STRING_VALUE',
    location: 'STRING_VALUE'
  },
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ],
  timeoutInMinutes: 0
};
codebuild.updateProject(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the build project.

      Note: You cannot change a build project's name.
    • description — (String)

      A new or replacement description of the build project.

    • source — (map)

      Information to be changed about the build input source code for the build project.

      • typerequired — (String)

        The type of repository that contains the source code to be built. Valid values include:

        • CODECOMMIT: The source code is in an AWS CodeCommit repository.

        • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

        • GITHUB: The source code is in a GitHub repository.

        • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
      • location — (String)

        Information about the location of the source code to be built. Valid values include:

        • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

        • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

        • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

        • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

      • buildspec — (String)

        The build spec declaration to use for the builds in this build project.

        If this value is not specified, a build spec must be included along with the source code to be built.

      • auth — (map)

        Information about the authorization settings for AWS CodeBuild to access the source code to be built.

        This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

        • typerequired — (String)

          The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

          Possible values include:
          • "OAUTH"
        • resource — (String)

          The resource value that applies to the specified authorization type.

    • artifacts — (map)

      Information to be changed about the build output artifacts for the build project.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

        • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

        • NO_ARTIFACTS: The build project will not produce any build output.

        • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

        Possible values include:
        • "CODEPIPELINE"
        • "S3"
        • "NO_ARTIFACTS"
      • location — (String)

        Information about the build output artifact location, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output bucket.

      • path — (String)

        Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

        For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, then valid values include:

          • BUILD_ID: Include the build ID in the location of the build output artifact.

          • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

        Possible values include:
        • "NONE"
        • "BUILD_ID"
      • name — (String)

        Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, this is the name of the output artifact object.

        For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

      • packaging — (String)

        The type of build output artifact to create, as follows:

        • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

        • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

        • If type is set to S3, valid values include:

          • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
    • environment — (map)

      Information to be changed about the build environment for the build project.

      • typerequired — (String)

        The type of build environment to use for related builds.

        Possible values include:
        • "LINUX_CONTAINER"
      • imagerequired — (String)

        The ID of the Docker image to use for this build project.

      • computeTyperequired — (String)

        Information about the compute resources the build project will use. Available values include:

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

        Possible values include:
        • "BUILD_GENERAL1_SMALL"
        • "BUILD_GENERAL1_MEDIUM"
        • "BUILD_GENERAL1_LARGE"
      • environmentVariables — (Array<map>)

        A set of environment variables to make available to builds for this build project.

        • namerequired — (String)

          The name or key of the environment variable.

        • valuerequired — (String)

          The value of the environment variable.

          We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

      • privilegedMode — (Boolean)

        If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

        - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

    • serviceRole — (String)

      The replacement ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

    • timeoutInMinutes — (Integer)

      The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.

    • encryptionKey — (String)

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

      You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format alias/alias-name ).

    • tags — (Array<map>)

      The replacement set of tags for this build project.

      These tags are available for use by AWS services that support AWS CodeBuild build project tags.

      • key — (String)

        The tag's key.

      • value — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • project — (map)

        Information about the build project that was changed.

        • name — (String)

          The name of the build project.

        • arn — (String)

          The Amazon Resource Name (ARN) of the build project.

        • description — (String)

          A description that makes the build project easy to identify.

        • source — (map)

          Information about the build input source code for this build project.

          • typerequired — (String)

            The type of repository that contains the source code to be built. Valid values include:

            • CODECOMMIT: The source code is in an AWS CodeCommit repository.

            • CODEPIPELINE: The source code settings are specified in the source action of a pipeline in AWS CodePipeline.

            • GITHUB: The source code is in a GitHub repository.

            • S3: The source code is in an Amazon Simple Storage Service (Amazon S3) input bucket.

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
          • location — (String)

            Information about the location of the source code to be built. Valid values include:

            • For source code settings that are specified in the source action of a pipeline in AWS CodePipeline, location should not be specified. If it is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline uses the settings in a pipeline's source action instead of this value.

            • For source code in an AWS CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the build spec (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name ).

            • For source code in an Amazon Simple Storage Service (Amazon S3) input bucket, the path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip)

            • For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the build spec. Also, you must connect your AWS account to your GitHub account. To do this, use the AWS CodeBuild console to begin creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page that displays, for Organization access, choose Request access next to each repository you want to allow AWS CodeBuild to have access to. Then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project, and you may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to then use this connection, in the source object, set the auth object's type value to OAUTH.

          • buildspec — (String)

            The build spec declaration to use for the builds in this build project.

            If this value is not specified, a build spec must be included along with the source code to be built.

          • auth — (map)

            Information about the authorization settings for AWS CodeBuild to access the source code to be built.

            This information is for the AWS CodeBuild console's use only. Your code should not get or set this information directly (unless the build project's source type value is GITHUB).

            • typerequired — (String)

              The authorization type to use. The only valid value is OAUTH, which represents the OAuth authorization type.

              Possible values include:
              • "OAUTH"
            • resource — (String)

              The resource value that applies to the specified authorization type.

        • artifacts — (map)

          Information about the build output artifacts for the build project.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

            • CODEPIPELINE: The build project will have build output generated through AWS CodePipeline.

            • NO_ARTIFACTS: The build project will not produce any build output.

            • S3: The build project will store build output in Amazon Simple Storage Service (Amazon S3).

            Possible values include:
            • "CODEPIPELINE"
            • "S3"
            • "NO_ARTIFACTS"
          • location — (String)

            Information about the build output artifact location, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output locations instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output bucket.

          • path — (String)

            Along with namespaceType and name, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the path to the output artifact. If path is not specified, then path will not be used.

            For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, then the output artifact would be stored in the output bucket at MyArtifacts/MyArtifact.zip.

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild will use to determine the name and location to store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, then valid values include:

              • BUILD_ID: Include the build ID in the location of the build output artifact.

              • NONE: Do not include the build ID. This is the default if namespaceType is not specified.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

            Possible values include:
            • "NONE"
            • "BUILD_ID"
          • name — (String)

            Along with path and namespaceType, the pattern that AWS CodeBuild will use to name and store the output artifact, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output names instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, this is the name of the output artifact object.

            For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to MyArtifact.zip, then the output artifact would be stored in MyArtifacts/build-ID/MyArtifact.zip.

          • packaging — (String)

            The type of build output artifact to create, as follows:

            • If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this value if specified. This is because AWS CodePipeline manages its build output artifacts instead of AWS CodeBuild.

            • If type is set to NO_ARTIFACTS, then this value will be ignored if specified, because no build output will be produced.

            • If type is set to S3, valid values include:

              • NONE: AWS CodeBuild will create in the output bucket a folder containing the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
        • environment — (map)

          Information about the build environment for this build project.

          • typerequired — (String)

            The type of build environment to use for related builds.

            Possible values include:
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The ID of the Docker image to use for this build project.

          • computeTyperequired — (String)

            Information about the compute resources the build project will use. Available values include:

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

            Possible values include:
            • "BUILD_GENERAL1_SMALL"
            • "BUILD_GENERAL1_MEDIUM"
            • "BUILD_GENERAL1_LARGE"
          • environmentVariables — (Array<map>)

            A set of environment variables to make available to builds for this build project.

            • namerequired — (String)

              The name or key of the environment variable.

            • valuerequired — (String)

              The value of the environment variable.

              We strongly discourage using environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using tools such as the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

          • privilegedMode — (Boolean)

            If set to true, enables running the Docker daemon inside a Docker container; otherwise, false or not specified (the default). This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Note that you must also start the Docker daemon so that your builds can interact with it as needed. One way to do this is to initialize the Docker daemon in the install phase of your build spec by running the following build commands. (Do not run the following build commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=vfs& - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"

        • serviceRole — (String)

          The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

        • timeoutInMinutes — (Integer)

          How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.

        • encryptionKey — (String)

          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 CMK's Amazon Resource Name (ARN) or, if specified, the CMK's alias (using the format alias/alias-name ).

        • tags — (Array<map>)

          The tags for this build project.

          These tags are available for use by AWS services that support AWS CodeBuild build project tags.

          • key — (String)

            The tag's key.

          • value — (String)

            The tag's value.

        • created — (Date)

          When the build project was created, expressed in Unix time format.

        • lastModified — (Date)

          When the build project's settings were last modified, expressed in Unix time format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.