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.

Service Description

AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. AWS CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for the most popular programming languages and build tools, such as Apache Maven, Gradle, and more. You can also fully customize build environments in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically to meet peak build requests. You pay only for the build time you consume. For more information about AWS CodeBuild, see the AWS CodeBuild User Guide.

AWS CodeBuild supports these operations:

  • BatchDeleteBuilds: Deletes one or more builds.

  • BatchGetProjects: Gets information about one or more build projects. A build project defines how AWS CodeBuild runs a build. This includes information such as where to get the source code to build, the build environment to use, the build commands to run, and where to store the build output. A build environment is a representation of operating system, programming language runtime, and tools that AWS CodeBuild uses to run a build. You can add tags to build projects to help manage your resources and costs.

  • CreateProject: Creates a build project.

  • CreateWebhook: For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.

  • UpdateWebhook: Changes the settings of an existing webhook.

  • DeleteProject: Deletes a build project.

  • DeleteWebhook: For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding the source code every time a code change is pushed to the repository.

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

  • UpdateProject: Changes the settings of an existing build project.

  • BatchGetBuilds: Gets information about one or more builds.

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

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

  • StartBuild: Starts running a build.

  • StopBuild: Attempts to stop running a build.

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

  • DeleteSourceCredentials: Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.

  • ImportSourceCredentials: Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

  • ListSourceCredentials: Returns a list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object includes the authentication type, token ARN, and type of source provider for one set of credentials.

Sending a Request Using CodeBuild

var codebuild = new AWS.CodeBuild();
codebuild.batchDeleteBuilds(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

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

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.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to 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

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

Deletes one or more builds.

Service Reference:

Examples:

Calling the batchDeleteBuilds operation

var params = {
  ids: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codebuild.batchDeleteBuilds(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 to delete.

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:

      • buildsDeleted — (Array<String>)

        The IDs of the builds that were successfully deleted.

      • buildsNotDeleted — (Array<map>)

        Information about any builds that could not be successfully deleted.

        • id — (String)

          The ID of the build that could not be successfully deleted.

        • statusCode — (String)

          Additional information about the build that could not be successfully deleted.

Returns:

  • (AWS.Request)

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

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

Gets information about builds.

Service Reference:

Examples:

To get information about builds


/* The following example gets information about builds with the specified build IDs. */

 var params = {
  ids: [
     "codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX", 
     "codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX"
  ]
 };
 codebuild.batchGetBuilds(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    builds: [
       {
      arn: "arn:aws:codebuild:us-east-1:123456789012:build/codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX", 
      artifacts: {
       location: "arn:aws:s3:::codebuild-123456789012-output-bucket/codebuild-demo-project"
      }, 
      buildComplete: true, 
      buildStatus: "SUCCEEDED", 
      currentPhase: "COMPLETED", 
      endTime: <Date Representation>, 
      environment: {
       type: "LINUX_CONTAINER", 
       computeType: "BUILD_GENERAL1_SMALL", 
       environmentVariables: [
       ], 
       image: "aws/codebuild/java:openjdk-8", 
       privilegedMode: false
      }, 
      id: "codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX", 
      initiator: "MyDemoUser", 
      logs: {
       deepLink: "https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEvent:group=/aws/codebuild/codebuild-demo-project;stream=9b0ac37f-d19e-4254-9079-f47e9a389eEX", 
       groupName: "/aws/codebuild/codebuild-demo-project", 
       streamName: "9b0ac37f-d19e-4254-9079-f47e9a389eEX"
      }, 
      phases: [
         {
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "SUBMITTED", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 72, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "PROVISIONING", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 46, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "DOWNLOAD_SOURCE", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "INSTALL", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "PRE_BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 9, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "POST_BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "UPLOAD_ARTIFACTS", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 2, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "FINALIZING", 
        startTime: <Date Representation>
       }, 
         {
        phaseType: "COMPLETED", 
        startTime: <Date Representation>
       }
      ], 
      projectName: "codebuild-demo-project", 
      source: {
       type: "S3", 
       buildspec: "", 
       location: "arn:aws:s3:::codebuild-123456789012-input-bucket/MessageUtil.zip"
      }, 
      startTime: <Date Representation>, 
      timeoutInMinutes: 60
     }, 
       {
      arn: "arn:aws:codebuild:us-east-1:123456789012:build/codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX", 
      artifacts: {
       location: "arn:aws:s3:::codebuild-123456789012-output-bucket/codebuild-demo-project"
      }, 
      buildComplete: true, 
      buildStatus: "SUCCEEDED", 
      currentPhase: "COMPLETED", 
      endTime: <Date Representation>, 
      environment: {
       type: "LINUX_CONTAINER", 
       computeType: "BUILD_GENERAL1_SMALL", 
       environmentVariables: [
       ], 
       image: "aws/codebuild/java:openjdk-8", 
       privilegedMode: false
      }, 
      id: "codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX", 
      initiator: "MyDemoUser", 
      logs: {
       deepLink: "https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEvent:group=/aws/codebuild/codebuild-demo-project;stream=b79a46f7-1473-4636-a23f-da9c45c208EX", 
       groupName: "/aws/codebuild/codebuild-demo-project", 
       streamName: "b79a46f7-1473-4636-a23f-da9c45c208EX"
      }, 
      phases: [
         {
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "SUBMITTED", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 71, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "PROVISIONING", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 45, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "DOWNLOAD_SOURCE", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "INSTALL", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "PRE_BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 9, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "POST_BUILD", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 0, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "UPLOAD_ARTIFACTS", 
        startTime: <Date Representation>
       }, 
         {
        contexts: [
        ], 
        durationInSeconds: 4, 
        endTime: <Date Representation>, 
        phaseStatus: "SUCCEEDED", 
        phaseType: "FINALIZING", 
        startTime: <Date Representation>
       }, 
         {
        phaseType: "COMPLETED", 
        startTime: <Date Representation>
       }
      ], 
      projectName: "codebuild-demo-project", 
      source: {
       type: "S3", 
       location: "arn:aws:s3:::codebuild-123456789012-input-bucket/MessageUtil.zip"
      }, 
      startTime: <Date Representation>, 
      timeoutInMinutes: 60
     }
    ]
   }
   */
 });

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.

        • resolvedSourceVersion — (String)

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

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

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

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

        • projectName — (String)

          The name of the AWS CodeBuild project.

        • phases — (Array<map>)

          Information about all previous build phases that are complete 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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

            • SUBMITTED: The build has been submitted.

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

            Possible values include:
            • "SUBMITTED"
            • "QUEUED"
            • "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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySourceVersions — (Array<map>)

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

          • For AWS CodeCommit: the commit ID to use.

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

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

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

          • sourceIdentifierrequired — (String)

            An identifier for a source in the build project.

          • sourceVersionrequired — (String)

            The source version for the corresponding source identifier. If specified, must be one of:

            • For AWS CodeCommit: the commit ID to use.

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

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

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

        • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • serviceRole — (String)

          The name of a service role used for this build.

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

          • s3DeepLink — (String)

            The URL to a build log in an S3 bucket.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about S3 logs for a build project.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

        • timeoutInMinutes — (Integer)

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

        • queuedTimeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build is complete. True if complete; 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.

        • vpcConfig — (map)

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

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • networkInterface — (map)

          Describes a network interface.

          • subnetId — (String)

            The ID of the subnet.

          • networkInterfaceId — (String)

            The ID of the network interface.

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

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

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • 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 has build output generated through AWS CodePipeline.

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

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

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build project.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • 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.

        • queuedTimeoutInMinutes — (Integer)

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

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

          You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, 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.

        • webhook — (map)

          Information about a webhook that connects repository events to a build project in AWS CodeBuild.

          • url — (String)

            The URL to the webhook.

          • payloadUrl — (String)

            The AWS CodeBuild endpoint where webhook events are sent.

          • secret — (String)

            The secret token of the associated repository.

            Note: A Bitbucket webhook does not support secret.
          • branchFilter — (String)

            A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

            Note: It is recommended that you use filterGroups instead of branchFilter.
          • filterGroups — (Array<Array<map>>)

            An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

            For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

            • typerequired — (String)

              The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

              EVENT

              A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

              Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
              ACTOR_ACCOUNT_ID

              A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

              HEAD_REF

              A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

              Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

              BASE_REF

              A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

              Note: Works with pull request events only.
              FILE_PATH

              A webhook triggers a build when the path of a changed file matches the regular expression pattern.

              Note: Works with GitHub and GitHub Enterprise push events only.
              Possible values include:
              • "EVENT"
              • "BASE_REF"
              • "HEAD_REF"
              • "ACTOR_ACCOUNT_ID"
              • "FILE_PATH"
            • patternrequired — (String)

              For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

              For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

            • excludeMatchedPattern — (Boolean)

              Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a build.

          • lastModifiedSecret — (Date)

            A timestamp that indicates the last time a repository's secret token was modified.

        • vpcConfig — (map)

          Information about the VPC configuration that AWS CodeBuild accesses.

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • badge — (map)

          Information about the build badge for the build project.

          • badgeEnabled — (Boolean)

            Set this to true to generate a publicly accessible URL for your project's build badge.

          • badgeRequestUrl — (String)

            The publicly-accessible URL through which you can access the build badge for your project.

            The publicly accessible URL through which you can access the build badge for your project.

        • logsConfig — (map)

          Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

      • 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 */
    artifactIdentifier: 'STRING_VALUE',
    encryptionDisabled: true || false,
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    overrideArtifactName: true || false,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  environment: { /* required */
    computeType: BUILD_GENERAL1_SMALL | BUILD_GENERAL1_MEDIUM | BUILD_GENERAL1_LARGE, /* required */
    image: 'STRING_VALUE', /* required */
    type: WINDOWS_CONTAINER | LINUX_CONTAINER, /* required */
    certificate: 'STRING_VALUE',
    environmentVariables: [
      {
        name: 'STRING_VALUE', /* required */
        value: 'STRING_VALUE', /* required */
        type: PLAINTEXT | PARAMETER_STORE
      },
      /* more items */
    ],
    imagePullCredentialsType: CODEBUILD | SERVICE_ROLE,
    privilegedMode: true || false,
    registryCredential: {
      credential: 'STRING_VALUE', /* required */
      credentialProvider: SECRETS_MANAGER /* required */
    }
  },
  name: 'STRING_VALUE', /* required */
  serviceRole: 'STRING_VALUE', /* required */
  source: { /* required */
    type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE, /* required */
    auth: {
      type: OAUTH, /* required */
      resource: 'STRING_VALUE'
    },
    buildspec: 'STRING_VALUE',
    gitCloneDepth: 'NUMBER_VALUE',
    gitSubmodulesConfig: {
      fetchSubmodules: true || false /* required */
    },
    insecureSsl: true || false,
    location: 'STRING_VALUE',
    reportBuildStatus: true || false,
    sourceIdentifier: 'STRING_VALUE'
  },
  badgeEnabled: true || false,
  cache: {
    type: NO_CACHE | S3 | LOCAL, /* required */
    location: 'STRING_VALUE',
    modes: [
      LOCAL_DOCKER_LAYER_CACHE | LOCAL_SOURCE_CACHE | LOCAL_CUSTOM_CACHE,
      /* more items */
    ]
  },
  description: 'STRING_VALUE',
  encryptionKey: 'STRING_VALUE',
  logsConfig: {
    cloudWatchLogs: {
      status: ENABLED | DISABLED, /* required */
      groupName: 'STRING_VALUE',
      streamName: 'STRING_VALUE'
    },
    s3Logs: {
      status: ENABLED | DISABLED, /* required */
      encryptionDisabled: true || false,
      location: 'STRING_VALUE'
    }
  },
  queuedTimeoutInMinutes: 'NUMBER_VALUE',
  secondaryArtifacts: [
    {
      type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
      artifactIdentifier: 'STRING_VALUE',
      encryptionDisabled: true || false,
      location: 'STRING_VALUE',
      name: 'STRING_VALUE',
      namespaceType: NONE | BUILD_ID,
      overrideArtifactName: true || false,
      packaging: NONE | ZIP,
      path: 'STRING_VALUE'
    },
    /* more items */
  ],
  secondarySources: [
    {
      type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE, /* required */
      auth: {
        type: OAUTH, /* required */
        resource: 'STRING_VALUE'
      },
      buildspec: 'STRING_VALUE',
      gitCloneDepth: 'NUMBER_VALUE',
      gitSubmodulesConfig: {
        fetchSubmodules: true || false /* required */
      },
      insecureSsl: true || false,
      location: 'STRING_VALUE',
      reportBuildStatus: true || false,
      sourceIdentifier: 'STRING_VALUE'
    },
    /* more items */
  ],
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ],
  timeoutInMinutes: 'NUMBER_VALUE',
  vpcConfig: {
    securityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    subnets: [
      'STRING_VALUE',
      /* more items */
    ],
    vpcId: 'STRING_VALUE'
  }
};
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:

        • BITBUCKET: The source code is in a Bitbucket repository.

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

        • NO_SOURCE: The project does not have input source code.

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

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
        • "GITHUB_ENTERPRISE"
        • "NO_SOURCE"
      • 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 ignores 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, one of the following.

          • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

          • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

        • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

      • gitCloneDepth — (Integer)

        Information about the Git clone depth for the build project.

      • gitSubmodulesConfig — (map)

        Information about the Git submodules configuration for the build project.

        • fetchSubmodulesrequired — (Boolean)

          Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

        • typerequired — (String)
          Note: This data type is deprecated and is no longer accurate or used.

          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.

      • reportBuildStatus — (Boolean)

        Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

      • insecureSsl — (Boolean)

        Enable this flag to ignore SSL warnings while connecting to the project source code.

      • sourceIdentifier — (String)

        An identifier for this project source.

    • secondarySources — (Array<map>)

      An array of ProjectSource objects.

      • typerequired — (String)

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

        • BITBUCKET: The source code is in a Bitbucket repository.

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

        • NO_SOURCE: The project does not have input source code.

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

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
        • "GITHUB_ENTERPRISE"
        • "NO_SOURCE"
      • 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 ignores 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, one of the following.

          • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

          • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

        • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

      • gitCloneDepth — (Integer)

        Information about the Git clone depth for the build project.

      • gitSubmodulesConfig — (map)

        Information about the Git submodules configuration for the build project.

        • fetchSubmodulesrequired — (Boolean)

          Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

        • typerequired — (String)
          Note: This data type is deprecated and is no longer accurate or used.

          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.

      • reportBuildStatus — (Boolean)

        Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

      • insecureSsl — (Boolean)

        Enable this flag to ignore SSL warnings while connecting to the project source code.

      • sourceIdentifier — (String)

        An identifier for this project source.

    • 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 has build output generated through AWS CodePipeline.

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • secondaryArtifacts — (Array<map>)

      An array of ProjectArtifacts objects.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

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

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • cache — (map)

      Stores recently used information so that it can be quickly accessed at a later time.

      • typerequired — (String)

        The type of cache used by the build project. Valid values include:

        • NO_CACHE: The build project does not use any cache.

        • S3: The build project reads and writes from and to S3.

        • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

        Possible values include:
        • "NO_CACHE"
        • "S3"
        • "LOCAL"
      • location — (String)

        Information about the cache location:

        • NO_CACHE or LOCAL: This value is ignored.

        • S3: This is the S3 bucket name/prefix.

      • modes — (Array<String>)

        If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

        • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

        • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

          Note:
          • You can use a Docker layer cache in the Linux enviornment only.
          • The privileged flag must be set so that your project has the required Docker permissions.
          • You should consider the security implications before you use a Docker layer cache.
        • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

          • Only directories can be specified for caching. You cannot specify individual files.

          • Symlinks are used to reference cached directories.

          • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

    • 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:
        • "WINDOWS_CONTAINER"
        • "LINUX_CONTAINER"
      • imagerequired — (String)

        The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

        • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

        • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

      • computeTyperequired — (String)

        Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

        • type — (String)

          The type of environment variable. Valid values include:

          • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

          • PLAINTEXT: An environment variable in plaintext format.

          Possible values include:
          • "PLAINTEXT"
          • "PARAMETER_STORE"
      • privilegedMode — (Boolean)

        Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

        If the operating system's base image is Ubuntu Linux:

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

        If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

      • certificate — (String)

        The certificate to use with this build project.

      • registryCredential — (map)

        The credentials for access to a private registry.

        • credentialrequired — (String)

          The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

          Note: The credential can use the name of the credentials only if they exist in your current region.
        • credentialProviderrequired — (String)

          The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

          Possible values include:
          • "SECRETS_MANAGER"
      • imagePullCredentialsType — (String)

        The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

        • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

        • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

        When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

        Possible values include:
        • "CODEBUILD"
        • "SERVICE_ROLE"
    • 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 it times out any build that has not been marked as completed. The default is 60 minutes.

    • queuedTimeoutInMinutes — (Integer)

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

    • encryptionKey — (String)

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

      Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

      You can specify either the Amazon Resource Name (ARN) of the CMK 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.

    • vpcConfig — (map)

      VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.

      • vpcId — (String)

        The ID of the Amazon VPC.

      • subnets — (Array<String>)

        A list of one or more subnet IDs in your Amazon VPC.

      • securityGroupIds — (Array<String>)

        A list of one or more security groups IDs in your Amazon VPC.

    • badgeEnabled — (Boolean)

      Set this to true to generate a publicly accessible URL for your project's build badge.

    • logsConfig — (map)

      Information about logs for the build project. These can be logs in Amazon CloudWatch Logs, logs uploaded to a specified S3 bucket, or both.

      • cloudWatchLogs — (map)

        Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

        • statusrequired — (String)

          The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

          • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

          • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • groupName — (String)

          The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

        • streamName — (String)

          The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

      • s3Logs — (map)

        Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

        • statusrequired — (String)

          The current status of the S3 build logs. Valid values are:

          • ENABLED: S3 build logs are enabled for this build project.

          • DISABLED: S3 build logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • location — (String)

          The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

        • encryptionDisabled — (Boolean)

          Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

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:

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • 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 has build output generated through AWS CodePipeline.

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

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

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build project.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • 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.

        • queuedTimeoutInMinutes — (Integer)

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

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

          You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, 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.

        • webhook — (map)

          Information about a webhook that connects repository events to a build project in AWS CodeBuild.

          • url — (String)

            The URL to the webhook.

          • payloadUrl — (String)

            The AWS CodeBuild endpoint where webhook events are sent.

          • secret — (String)

            The secret token of the associated repository.

            Note: A Bitbucket webhook does not support secret.
          • branchFilter — (String)

            A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

            Note: It is recommended that you use filterGroups instead of branchFilter.
          • filterGroups — (Array<Array<map>>)

            An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

            For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

            • typerequired — (String)

              The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

              EVENT

              A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

              Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
              ACTOR_ACCOUNT_ID

              A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

              HEAD_REF

              A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

              Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

              BASE_REF

              A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

              Note: Works with pull request events only.
              FILE_PATH

              A webhook triggers a build when the path of a changed file matches the regular expression pattern.

              Note: Works with GitHub and GitHub Enterprise push events only.
              Possible values include:
              • "EVENT"
              • "BASE_REF"
              • "HEAD_REF"
              • "ACTOR_ACCOUNT_ID"
              • "FILE_PATH"
            • patternrequired — (String)

              For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

              For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

            • excludeMatchedPattern — (Boolean)

              Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a build.

          • lastModifiedSecret — (Date)

            A timestamp that indicates the last time a repository's secret token was modified.

        • vpcConfig — (map)

          Information about the VPC configuration that AWS CodeBuild accesses.

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • badge — (map)

          Information about the build badge for the build project.

          • badgeEnabled — (Boolean)

            Set this to true to generate a publicly accessible URL for your project's build badge.

          • badgeRequestUrl — (String)

            The publicly-accessible URL through which you can access the build badge for your project.

            The publicly accessible URL through which you can access the build badge for your project.

        • logsConfig — (map)

          Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

Returns:

  • (AWS.Request)

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

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

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.

If you enable webhooks for an AWS CodeBuild project, and the project is used as a build step in AWS CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through AWS CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using AWS CodePipeline, we recommend that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings.

Service Reference:

Examples:

Calling the createWebhook operation

var params = {
  projectName: 'STRING_VALUE', /* required */
  branchFilter: 'STRING_VALUE',
  filterGroups: [
    [
      {
        pattern: 'STRING_VALUE', /* required */
        type: EVENT | BASE_REF | HEAD_REF | ACTOR_ACCOUNT_ID | FILE_PATH, /* required */
        excludeMatchedPattern: true || false
      },
      /* more items */
    ],
    /* more items */
  ]
};
codebuild.createWebhook(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 AWS CodeBuild project.

    • branchFilter — (String)

      A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

      Note: It is recommended that you use filterGroups instead of branchFilter.
    • filterGroups — (Array<Array<map>>)

      An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

      For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

      • typerequired — (String)

        The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

        EVENT

        A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

        Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
        ACTOR_ACCOUNT_ID

        A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

        HEAD_REF

        A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

        Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

        BASE_REF

        A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

        Note: Works with pull request events only.
        FILE_PATH

        A webhook triggers a build when the path of a changed file matches the regular expression pattern.

        Note: Works with GitHub and GitHub Enterprise push events only.
        Possible values include:
        • "EVENT"
        • "BASE_REF"
        • "HEAD_REF"
        • "ACTOR_ACCOUNT_ID"
        • "FILE_PATH"
      • patternrequired — (String)

        For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

        For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

      • excludeMatchedPattern — (Boolean)

        Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a 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:

      • webhook — (map)

        Information about a webhook that connects repository events to a build project in AWS CodeBuild.

        • url — (String)

          The URL to the webhook.

        • payloadUrl — (String)

          The AWS CodeBuild endpoint where webhook events are sent.

        • secret — (String)

          The secret token of the associated repository.

          Note: A Bitbucket webhook does not support secret.
        • branchFilter — (String)

          A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

          Note: It is recommended that you use filterGroups instead of branchFilter.
        • filterGroups — (Array<Array<map>>)

          An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

          For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

          • typerequired — (String)

            The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

            EVENT

            A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

            Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
            ACTOR_ACCOUNT_ID

            A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

            HEAD_REF

            A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

            Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

            BASE_REF

            A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

            Note: Works with pull request events only.
            FILE_PATH

            A webhook triggers a build when the path of a changed file matches the regular expression pattern.

            Note: Works with GitHub and GitHub Enterprise push events only.
            Possible values include:
            • "EVENT"
            • "BASE_REF"
            • "HEAD_REF"
            • "ACTOR_ACCOUNT_ID"
            • "FILE_PATH"
          • patternrequired — (String)

            For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

            For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

          • excludeMatchedPattern — (Boolean)

            Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a build.

        • lastModifiedSecret — (Date)

          A timestamp that indicates the last time a repository's secret token was modified.

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.

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

Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.

Service Reference:

Examples:

Calling the deleteSourceCredentials operation

var params = {
  arn: 'STRING_VALUE' /* required */
};
codebuild.deleteSourceCredentials(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: {})
    • arn — (String)

      The Amazon Resource Name (ARN) of the token.

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:

      • arn — (String)

        The Amazon Resource Name (ARN) of the token.

Returns:

  • (AWS.Request)

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

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

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding the source code every time a code change is pushed to the repository.

Service Reference:

Examples:

Calling the deleteWebhook operation

var params = {
  projectName: 'STRING_VALUE' /* required */
};
codebuild.deleteWebhook(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 AWS CodeBuild 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.

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

Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

Service Reference:

Examples:

Calling the importSourceCredentials operation

var params = {
  authType: OAUTH | BASIC_AUTH | PERSONAL_ACCESS_TOKEN, /* required */
  serverType: GITHUB | BITBUCKET | GITHUB_ENTERPRISE, /* required */
  token: 'STRING_VALUE', /* required */
  username: 'STRING_VALUE'
};
codebuild.importSourceCredentials(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: {})
    • username — (String)

      The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

    • token — (String)

      For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

    • serverType — (String)

      The source provider used for this project.

      Possible values include:
      • "GITHUB"
      • "BITBUCKET"
      • "GITHUB_ENTERPRISE"
    • authType — (String)

      The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the AWS CodeBuild console.

      Possible values include:
      • "OAUTH"
      • "BASIC_AUTH"
      • "PERSONAL_ACCESS_TOKEN"

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:

      • arn — (String)

        The Amazon Resource Name (ARN) of the token.

Returns:

  • (AWS.Request)

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

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

Resets the cache for a project.

Service Reference:

Examples:

Calling the invalidateProjectCache operation

var params = {
  projectName: 'STRING_VALUE' /* required */
};
codebuild.invalidateProjectCache(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 AWS CodeBuild build project that the cache is reset for.

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 AWS CodeBuild 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"
          • "WINDOWS_SERVER"
        • 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"
            • "PHP"
          • 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.

            • versions — (Array<String>)

              A list of environment image versions.

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 based on when each build project was created.

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

      • NAME: List 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 in ascending order.

      • DESCENDING: List 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.

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

Returns a list of SourceCredentialsInfo objects.

Service Reference:

Examples:

Calling the listSourceCredentials operation

var params = {
};
codebuild.listSourceCredentials(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:

      • sourceCredentialsInfos — (Array<map>)

        A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object includes the authentication type, token ARN, and type of source provider for one set of credentials.

        • arn — (String)

          The Amazon Resource Name (ARN) of the token.

        • serverType — (String)

          The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

          Possible values include:
          • "GITHUB"
          • "BITBUCKET"
          • "GITHUB_ENTERPRISE"
        • authType — (String)

          The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

          Possible values include:
          • "OAUTH"
          • "BASIC_AUTH"
          • "PERSONAL_ACCESS_TOKEN"

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 */
    artifactIdentifier: 'STRING_VALUE',
    encryptionDisabled: true || false,
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    overrideArtifactName: true || false,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  buildspecOverride: 'STRING_VALUE',
  cacheOverride: {
    type: NO_CACHE | S3 | LOCAL, /* required */
    location: 'STRING_VALUE',
    modes: [
      LOCAL_DOCKER_LAYER_CACHE | LOCAL_SOURCE_CACHE | LOCAL_CUSTOM_CACHE,
      /* more items */
    ]
  },
  certificateOverride: 'STRING_VALUE',
  computeTypeOverride: BUILD_GENERAL1_SMALL | BUILD_GENERAL1_MEDIUM | BUILD_GENERAL1_LARGE,
  environmentTypeOverride: WINDOWS_CONTAINER | LINUX_CONTAINER,
  environmentVariablesOverride: [
    {
      name: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE', /* required */
      type: PLAINTEXT | PARAMETER_STORE
    },
    /* more items */
  ],
  gitCloneDepthOverride: 'NUMBER_VALUE',
  gitSubmodulesConfigOverride: {
    fetchSubmodules: true || false /* required */
  },
  idempotencyToken: 'STRING_VALUE',
  imageOverride: 'STRING_VALUE',
  imagePullCredentialsTypeOverride: CODEBUILD | SERVICE_ROLE,
  insecureSslOverride: true || false,
  logsConfigOverride: {
    cloudWatchLogs: {
      status: ENABLED | DISABLED, /* required */
      groupName: 'STRING_VALUE',
      streamName: 'STRING_VALUE'
    },
    s3Logs: {
      status: ENABLED | DISABLED, /* required */
      encryptionDisabled: true || false,
      location: 'STRING_VALUE'
    }
  },
  privilegedModeOverride: true || false,
  queuedTimeoutInMinutesOverride: 'NUMBER_VALUE',
  registryCredentialOverride: {
    credential: 'STRING_VALUE', /* required */
    credentialProvider: SECRETS_MANAGER /* required */
  },
  reportBuildStatusOverride: true || false,
  secondaryArtifactsOverride: [
    {
      type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
      artifactIdentifier: 'STRING_VALUE',
      encryptionDisabled: true || false,
      location: 'STRING_VALUE',
      name: 'STRING_VALUE',
      namespaceType: NONE | BUILD_ID,
      overrideArtifactName: true || false,
      packaging: NONE | ZIP,
      path: 'STRING_VALUE'
    },
    /* more items */
  ],
  secondarySourcesOverride: [
    {
      type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE, /* required */
      auth: {
        type: OAUTH, /* required */
        resource: 'STRING_VALUE'
      },
      buildspec: 'STRING_VALUE',
      gitCloneDepth: 'NUMBER_VALUE',
      gitSubmodulesConfig: {
        fetchSubmodules: true || false /* required */
      },
      insecureSsl: true || false,
      location: 'STRING_VALUE',
      reportBuildStatus: true || false,
      sourceIdentifier: 'STRING_VALUE'
    },
    /* more items */
  ],
  secondarySourcesVersionOverride: [
    {
      sourceIdentifier: 'STRING_VALUE', /* required */
      sourceVersion: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  serviceRoleOverride: 'STRING_VALUE',
  sourceAuthOverride: {
    type: OAUTH, /* required */
    resource: 'STRING_VALUE'
  },
  sourceLocationOverride: 'STRING_VALUE',
  sourceTypeOverride: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE,
  sourceVersion: 'STRING_VALUE',
  timeoutInMinutesOverride: 'NUMBER_VALUE'
};
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 AWS CodeBuild build project to start running a build.

    • secondarySourcesOverride — (Array<map>)

      An array of ProjectSource objects.

      • typerequired — (String)

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

        • BITBUCKET: The source code is in a Bitbucket repository.

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

        • NO_SOURCE: The project does not have input source code.

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

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
        • "GITHUB_ENTERPRISE"
        • "NO_SOURCE"
      • 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 ignores 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, one of the following.

          • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

          • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

        • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

      • gitCloneDepth — (Integer)

        Information about the Git clone depth for the build project.

      • gitSubmodulesConfig — (map)

        Information about the Git submodules configuration for the build project.

        • fetchSubmodulesrequired — (Boolean)

          Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

        • typerequired — (String)
          Note: This data type is deprecated and is no longer accurate or used.

          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.

      • reportBuildStatus — (Boolean)

        Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

      • insecureSsl — (Boolean)

        Enable this flag to ignore SSL warnings while connecting to the project source code.

      • sourceIdentifier — (String)

        An identifier for this project source.

    • secondarySourcesVersionOverride — (Array<map>)

      An array of ProjectSourceVersion objects that specify one or more versions of the project's secondary sources to be used for this build only.

      • sourceIdentifierrequired — (String)

        An identifier for a source in the build project.

      • sourceVersionrequired — (String)

        The source version for the corresponding source identifier. If specified, must be one of:

        • For AWS CodeCommit: the commit ID to use.

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

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

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

    • sourceVersion — (String)

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

      • For AWS CodeCommit: the commit ID to use.

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

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

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

    • 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 has build output generated through AWS CodePipeline.

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • secondaryArtifactsOverride — (Array<map>)

      An array of ProjectArtifacts objects.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

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

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

      • type — (String)

        The type of environment variable. Valid values include:

        • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

        • PLAINTEXT: An environment variable in plaintext format.

        Possible values include:
        • "PLAINTEXT"
        • "PARAMETER_STORE"
    • sourceTypeOverride — (String)

      A source input type, for this build, that overrides the source input defined in the build project.

      Possible values include:
      • "CODECOMMIT"
      • "CODEPIPELINE"
      • "GITHUB"
      • "S3"
      • "BITBUCKET"
      • "GITHUB_ENTERPRISE"
      • "NO_SOURCE"
    • sourceLocationOverride — (String)

      A location that overrides, for this build, the source location for the one defined in the build project.

    • sourceAuthOverride — (map)

      An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket or GitHub.

      • typerequired — (String)
        Note: This data type is deprecated and is no longer accurate or used.

        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.

    • gitCloneDepthOverride — (Integer)

      The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.

    • gitSubmodulesConfigOverride — (map)

      Information about the Git submodules configuration for this build of an AWS CodeBuild build project.

      • fetchSubmodulesrequired — (Boolean)

        Set to true to fetch Git submodules for your AWS CodeBuild build project.

    • buildspecOverride — (String)

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

    • insecureSslOverride — (Boolean)

      Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.

    • reportBuildStatusOverride — (Boolean)

      Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown.

    • environmentTypeOverride — (String)

      A container type for this build that overrides the one specified in the build project.

      Possible values include:
      • "WINDOWS_CONTAINER"
      • "LINUX_CONTAINER"
    • imageOverride — (String)

      The name of an image for this build that overrides the one specified in the build project.

    • computeTypeOverride — (String)

      The name of a compute type for this build that overrides the one specified in the build project.

      Possible values include:
      • "BUILD_GENERAL1_SMALL"
      • "BUILD_GENERAL1_MEDIUM"
      • "BUILD_GENERAL1_LARGE"
    • certificateOverride — (String)

      The name of a certificate for this build that overrides the one specified in the build project.

    • cacheOverride — (map)

      A ProjectCache object specified for this build that overrides the one defined in the build project.

      • typerequired — (String)

        The type of cache used by the build project. Valid values include:

        • NO_CACHE: The build project does not use any cache.

        • S3: The build project reads and writes from and to S3.

        • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

        Possible values include:
        • "NO_CACHE"
        • "S3"
        • "LOCAL"
      • location — (String)

        Information about the cache location:

        • NO_CACHE or LOCAL: This value is ignored.

        • S3: This is the S3 bucket name/prefix.

      • modes — (Array<String>)

        If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

        • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

        • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

          Note:
          • You can use a Docker layer cache in the Linux enviornment only.
          • The privileged flag must be set so that your project has the required Docker permissions.
          • You should consider the security implications before you use a Docker layer cache.
        • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

          • Only directories can be specified for caching. You cannot specify individual files.

          • Symlinks are used to reference cached directories.

          • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

    • serviceRoleOverride — (String)

      The name of a service role for this build that overrides the one specified in the build project.

    • privilegedModeOverride — (Boolean)

      Enable this flag to override privileged mode 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.

    • queuedTimeoutInMinutesOverride — (Integer)

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

    • idempotencyToken — (String)

      A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 12 hours. If you repeat the StartBuild request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.

    • logsConfigOverride — (map)

      Log settings for this build that override the log settings defined in the build project.

      • cloudWatchLogs — (map)

        Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

        • statusrequired — (String)

          The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

          • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

          • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • groupName — (String)

          The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

        • streamName — (String)

          The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

      • s3Logs — (map)

        Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

        • statusrequired — (String)

          The current status of the S3 build logs. Valid values are:

          • ENABLED: S3 build logs are enabled for this build project.

          • DISABLED: S3 build logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • location — (String)

          The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

        • encryptionDisabled — (Boolean)

          Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

    • registryCredentialOverride — (map)

      The credentials for access to a private registry.

      • credentialrequired — (String)

        The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

        Note: The credential can use the name of the credentials only if they exist in your current region.
      • credentialProviderrequired — (String)

        The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

        Possible values include:
        • "SECRETS_MANAGER"
    • imagePullCredentialsTypeOverride — (String)

      The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

      • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

      • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

      When using a cross-account or private registry image, you must use SERVICE_ROLE credentials. When using an AWS CodeBuild curated image, you must use CODEBUILD credentials.

      Possible values include:
      • "CODEBUILD"
      • "SERVICE_ROLE"

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.

        • resolvedSourceVersion — (String)

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

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

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

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

        • projectName — (String)

          The name of the AWS CodeBuild project.

        • phases — (Array<map>)

          Information about all previous build phases that are complete 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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

            • SUBMITTED: The build has been submitted.

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

            Possible values include:
            • "SUBMITTED"
            • "QUEUED"
            • "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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySourceVersions — (Array<map>)

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

          • For AWS CodeCommit: the commit ID to use.

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

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

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

          • sourceIdentifierrequired — (String)

            An identifier for a source in the build project.

          • sourceVersionrequired — (String)

            The source version for the corresponding source identifier. If specified, must be one of:

            • For AWS CodeCommit: the commit ID to use.

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

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

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

        • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • serviceRole — (String)

          The name of a service role used for this build.

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

          • s3DeepLink — (String)

            The URL to a build log in an S3 bucket.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about S3 logs for a build project.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

        • timeoutInMinutes — (Integer)

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

        • queuedTimeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build is complete. True if complete; 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.

        • vpcConfig — (map)

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

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • networkInterface — (map)

          Describes a network interface.

          • subnetId — (String)

            The ID of the subnet.

          • networkInterfaceId — (String)

            The ID of the network interface.

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

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

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.

        • resolvedSourceVersion — (String)

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

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

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

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

        • projectName — (String)

          The name of the AWS CodeBuild project.

        • phases — (Array<map>)

          Information about all previous build phases that are complete 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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

            • SUBMITTED: The build has been submitted.

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

            Possible values include:
            • "SUBMITTED"
            • "QUEUED"
            • "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.

            • QUEUED: The build has been submitted and is queued behind other submitted builds.

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySourceVersions — (Array<map>)

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

          • For AWS CodeCommit: the commit ID to use.

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

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

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

          • sourceIdentifierrequired — (String)

            An identifier for a source in the build project.

          • sourceVersionrequired — (String)

            The source version for the corresponding source identifier. If specified, must be one of:

            • For AWS CodeCommit: the commit ID to use.

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

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

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

        • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • 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 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 file integrity and authenticity.

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

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Information that tells you if encryption for build artifacts is disabled.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • serviceRole — (String)

          The name of a service role used for this build.

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

          • s3DeepLink — (String)

            The URL to a build log in an S3 bucket.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about S3 logs for a build project.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

        • timeoutInMinutes — (Integer)

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

        • queuedTimeoutInMinutes — (Integer)

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

        • buildComplete — (Boolean)

          Whether the build is complete. True if complete; 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.

        • vpcConfig — (map)

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

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • networkInterface — (map)

          Describes a network interface.

          • subnetId — (String)

            The ID of the subnet.

          • networkInterfaceId — (String)

            The ID of the network interface.

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

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

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 */
    artifactIdentifier: 'STRING_VALUE',
    encryptionDisabled: true || false,
    location: 'STRING_VALUE',
    name: 'STRING_VALUE',
    namespaceType: NONE | BUILD_ID,
    overrideArtifactName: true || false,
    packaging: NONE | ZIP,
    path: 'STRING_VALUE'
  },
  badgeEnabled: true || false,
  cache: {
    type: NO_CACHE | S3 | LOCAL, /* required */
    location: 'STRING_VALUE',
    modes: [
      LOCAL_DOCKER_LAYER_CACHE | LOCAL_SOURCE_CACHE | LOCAL_CUSTOM_CACHE,
      /* more items */
    ]
  },
  description: 'STRING_VALUE',
  encryptionKey: 'STRING_VALUE',
  environment: {
    computeType: BUILD_GENERAL1_SMALL | BUILD_GENERAL1_MEDIUM | BUILD_GENERAL1_LARGE, /* required */
    image: 'STRING_VALUE', /* required */
    type: WINDOWS_CONTAINER | LINUX_CONTAINER, /* required */
    certificate: 'STRING_VALUE',
    environmentVariables: [
      {
        name: 'STRING_VALUE', /* required */
        value: 'STRING_VALUE', /* required */
        type: PLAINTEXT | PARAMETER_STORE
      },
      /* more items */
    ],
    imagePullCredentialsType: CODEBUILD | SERVICE_ROLE,
    privilegedMode: true || false,
    registryCredential: {
      credential: 'STRING_VALUE', /* required */
      credentialProvider: SECRETS_MANAGER /* required */
    }
  },
  logsConfig: {
    cloudWatchLogs: {
      status: ENABLED | DISABLED, /* required */
      groupName: 'STRING_VALUE',
      streamName: 'STRING_VALUE'
    },
    s3Logs: {
      status: ENABLED | DISABLED, /* required */
      encryptionDisabled: true || false,
      location: 'STRING_VALUE'
    }
  },
  queuedTimeoutInMinutes: 'NUMBER_VALUE',
  secondaryArtifacts: [
    {
      type: CODEPIPELINE | S3 | NO_ARTIFACTS, /* required */
      artifactIdentifier: 'STRING_VALUE',
      encryptionDisabled: true || false,
      location: 'STRING_VALUE',
      name: 'STRING_VALUE',
      namespaceType: NONE | BUILD_ID,
      overrideArtifactName: true || false,
      packaging: NONE | ZIP,
      path: 'STRING_VALUE'
    },
    /* more items */
  ],
  secondarySources: [
    {
      type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE, /* required */
      auth: {
        type: OAUTH, /* required */
        resource: 'STRING_VALUE'
      },
      buildspec: 'STRING_VALUE',
      gitCloneDepth: 'NUMBER_VALUE',
      gitSubmodulesConfig: {
        fetchSubmodules: true || false /* required */
      },
      insecureSsl: true || false,
      location: 'STRING_VALUE',
      reportBuildStatus: true || false,
      sourceIdentifier: 'STRING_VALUE'
    },
    /* more items */
  ],
  serviceRole: 'STRING_VALUE',
  source: {
    type: CODECOMMIT | CODEPIPELINE | GITHUB | S3 | BITBUCKET | GITHUB_ENTERPRISE | NO_SOURCE, /* required */
    auth: {
      type: OAUTH, /* required */
      resource: 'STRING_VALUE'
    },
    buildspec: 'STRING_VALUE',
    gitCloneDepth: 'NUMBER_VALUE',
    gitSubmodulesConfig: {
      fetchSubmodules: true || false /* required */
    },
    insecureSsl: true || false,
    location: 'STRING_VALUE',
    reportBuildStatus: true || false,
    sourceIdentifier: 'STRING_VALUE'
  },
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ],
  timeoutInMinutes: 'NUMBER_VALUE',
  vpcConfig: {
    securityGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    subnets: [
      'STRING_VALUE',
      /* more items */
    ],
    vpcId: 'STRING_VALUE'
  }
};
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:

        • BITBUCKET: The source code is in a Bitbucket repository.

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

        • NO_SOURCE: The project does not have input source code.

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

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
        • "GITHUB_ENTERPRISE"
        • "NO_SOURCE"
      • 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 ignores 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, one of the following.

          • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

          • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

        • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

      • gitCloneDepth — (Integer)

        Information about the Git clone depth for the build project.

      • gitSubmodulesConfig — (map)

        Information about the Git submodules configuration for the build project.

        • fetchSubmodulesrequired — (Boolean)

          Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

        • typerequired — (String)
          Note: This data type is deprecated and is no longer accurate or used.

          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.

      • reportBuildStatus — (Boolean)

        Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

      • insecureSsl — (Boolean)

        Enable this flag to ignore SSL warnings while connecting to the project source code.

      • sourceIdentifier — (String)

        An identifier for this project source.

    • secondarySources — (Array<map>)

      An array of ProjectSource objects.

      • typerequired — (String)

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

        • BITBUCKET: The source code is in a Bitbucket repository.

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

        • NO_SOURCE: The project does not have input source code.

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

        Possible values include:
        • "CODECOMMIT"
        • "CODEPIPELINE"
        • "GITHUB"
        • "S3"
        • "BITBUCKET"
        • "GITHUB_ENTERPRISE"
        • "NO_SOURCE"
      • 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 ignores 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, one of the following.

          • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

          • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

        • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

      • gitCloneDepth — (Integer)

        Information about the Git clone depth for the build project.

      • gitSubmodulesConfig — (map)

        Information about the Git submodules configuration for the build project.

        • fetchSubmodulesrequired — (Boolean)

          Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

        • typerequired — (String)
          Note: This data type is deprecated and is no longer accurate or used.

          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.

      • reportBuildStatus — (Boolean)

        Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

      • insecureSsl — (Boolean)

        Enable this flag to ignore SSL warnings while connecting to the project source code.

      • sourceIdentifier — (String)

        An identifier for this project source.

    • 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 has build output generated through AWS CodePipeline.

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • secondaryArtifacts — (Array<map>)

      An array of ProjectSource objects.

      • typerequired — (String)

        The type of build output artifact. Valid values include:

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

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

        • S3: The build project stores 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:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

      • namespaceType — (String)

        Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

        • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

        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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

        • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

        • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

      • packaging — (String)

        The type of build output artifact to create:

        • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

          • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

          • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

        Possible values include:
        • "NONE"
        • "ZIP"
      • overrideArtifactName — (Boolean)

        If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

      • encryptionDisabled — (Boolean)

        Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

      • artifactIdentifier — (String)

        An identifier for this artifact definition.

    • cache — (map)

      Stores recently used information so that it can be quickly accessed at a later time.

      • typerequired — (String)

        The type of cache used by the build project. Valid values include:

        • NO_CACHE: The build project does not use any cache.

        • S3: The build project reads and writes from and to S3.

        • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

        Possible values include:
        • "NO_CACHE"
        • "S3"
        • "LOCAL"
      • location — (String)

        Information about the cache location:

        • NO_CACHE or LOCAL: This value is ignored.

        • S3: This is the S3 bucket name/prefix.

      • modes — (Array<String>)

        If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

        • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

        • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

          Note:
          • You can use a Docker layer cache in the Linux enviornment only.
          • The privileged flag must be set so that your project has the required Docker permissions.
          • You should consider the security implications before you use a Docker layer cache.
        • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

          • Only directories can be specified for caching. You cannot specify individual files.

          • Symlinks are used to reference cached directories.

          • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

    • 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:
        • "WINDOWS_CONTAINER"
        • "LINUX_CONTAINER"
      • imagerequired — (String)

        The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

        • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

        • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

      • computeTyperequired — (String)

        Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

        • type — (String)

          The type of environment variable. Valid values include:

          • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

          • PLAINTEXT: An environment variable in plaintext format.

          Possible values include:
          • "PLAINTEXT"
          • "PARAMETER_STORE"
      • privilegedMode — (Boolean)

        Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

        If the operating system's base image is Ubuntu Linux:

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

        If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

      • certificate — (String)

        The certificate to use with this build project.

      • registryCredential — (map)

        The credentials for access to a private registry.

        • credentialrequired — (String)

          The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

          Note: The credential can use the name of the credentials only if they exist in your current region.
        • credentialProviderrequired — (String)

          The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

          Possible values include:
          • "SECRETS_MANAGER"
      • imagePullCredentialsType — (String)

        The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

        • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

        • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

        When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

        Possible values include:
        • "CODEBUILD"
        • "SERVICE_ROLE"
    • 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.

    • queuedTimeoutInMinutes — (Integer)

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

    • encryptionKey — (String)

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

      Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

      You can specify either the Amazon Resource Name (ARN) of the CMK 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.

    • vpcConfig — (map)

      VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.

      • vpcId — (String)

        The ID of the Amazon VPC.

      • subnets — (Array<String>)

        A list of one or more subnet IDs in your Amazon VPC.

      • securityGroupIds — (Array<String>)

        A list of one or more security groups IDs in your Amazon VPC.

    • badgeEnabled — (Boolean)

      Set this to true to generate a publicly accessible URL for your project's build badge.

    • logsConfig — (map)

      Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, logs in an S3 bucket, or both.

      • cloudWatchLogs — (map)

        Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

        • statusrequired — (String)

          The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

          • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

          • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • groupName — (String)

          The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

        • streamName — (String)

          The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

      • s3Logs — (map)

        Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

        • statusrequired — (String)

          The current status of the S3 build logs. Valid values are:

          • ENABLED: S3 build logs are enabled for this build project.

          • DISABLED: S3 build logs are not enabled for this build project.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • location — (String)

          The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

        • encryptionDisabled — (Boolean)

          Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

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:

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • secondarySources — (Array<map>)

          An array of ProjectSource objects.

          • typerequired — (String)

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

            • BITBUCKET: The source code is in a Bitbucket repository.

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

            • NO_SOURCE: The project does not have input source code.

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

            Possible values include:
            • "CODECOMMIT"
            • "CODEPIPELINE"
            • "GITHUB"
            • "S3"
            • "BITBUCKET"
            • "GITHUB_ENTERPRISE"
            • "NO_SOURCE"
          • 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 ignores 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, one of the following.

              • The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).

              • The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).

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

            • For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the build spec. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the source object, set the auth object's type value to OAUTH.

          • gitCloneDepth — (Integer)

            Information about the Git clone depth for the build project.

          • gitSubmodulesConfig — (map)

            Information about the Git submodules configuration for the build project.

            • fetchSubmodulesrequired — (Boolean)

              Set to true to fetch Git submodules for your AWS CodeBuild build project.

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

            • typerequired — (String)
              Note: This data type is deprecated and is no longer accurate or used.

              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.

          • reportBuildStatus — (Boolean)

            Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown.

          • insecureSsl — (Boolean)

            Enable this flag to ignore SSL warnings while connecting to the project source code.

          • sourceIdentifier — (String)

            An identifier for this project source.

        • 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 has build output generated through AWS CodePipeline.

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • secondaryArtifacts — (Array<map>)

          An array of ProjectArtifacts objects.

          • typerequired — (String)

            The type of build output artifact. Valid values include:

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

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

            • S3: The build project stores 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:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

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

          • namespaceType — (String)

            Along with path and name, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, 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, the output artifact is 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 uses to name and store the output artifact:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

            • If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.

            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 is stored in MyArtifacts/build-ID/MyArtifact.zip.

            • If path is empty, namespaceType is set to NONE, and name is set to "/", the output artifact is stored in the root of the output bucket.

            • If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and name is set to "/", the output artifact is stored in MyArtifacts/build-ID .

          • packaging — (String)

            The type of build output artifact to create:

            • If type is set to CODEPIPELINE, AWS CodePipeline ignores 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, this value is ignored if specified, because no build output is produced.

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

              • NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified.

              • ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.

            Possible values include:
            • "NONE"
            • "ZIP"
          • overrideArtifactName — (Boolean)

            If this flag is set, a name specified in the build spec file overrides the artifact name. The name specified in a build spec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.

          • encryptionDisabled — (Boolean)

            Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalidInputException is thrown.

          • artifactIdentifier — (String)

            An identifier for this artifact definition.

        • cache — (map)

          Information about the cache for the build project.

          • typerequired — (String)

            The type of cache used by the build project. Valid values include:

            • NO_CACHE: The build project does not use any cache.

            • S3: The build project reads and writes from and to S3.

            • LOCAL: The build project stores a cache locally on a build host that is only available to that build host.

            Possible values include:
            • "NO_CACHE"
            • "S3"
            • "LOCAL"
          • location — (String)

            Information about the cache location:

            • NO_CACHE or LOCAL: This value is ignored.

            • S3: This is the S3 bucket name/prefix.

          • modes — (Array<String>)

            If you use a LOCAL cache, the local cache mode. You can use one or more local cache modes at the same time.

            • LOCAL_SOURCE_CACHE mode caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.

            • LOCAL_DOCKER_LAYER_CACHE mode caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.

              Note:
              • You can use a Docker layer cache in the Linux enviornment only.
              • The privileged flag must be set so that your project has the required Docker permissions.
              • You should consider the security implications before you use a Docker layer cache.
            • LOCAL_CUSTOM_CACHE mode caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:

              • Only directories can be specified for caching. You cannot specify individual files.

              • Symlinks are used to reference cached directories.

              • Cached directories are linked to your build before it downloads its project sources. Cached items are overriden if a source item has the same name. Directories are specified using cache paths in the buildspec file.

        • 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:
            • "WINDOWS_CONTAINER"
            • "LINUX_CONTAINER"
          • imagerequired — (String)

            The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:

            • For an image tag: registry/repository:tag. For example, to specify an image with the tag "latest," use registry/repository:latest.

            • For an image digest: registry/repository@digest. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.

          • computeTyperequired — (String)

            Information about the compute resources the build project uses. 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 the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys. Environment variables can be displayed in plain text using the AWS CodeBuild console and the AWS Command Line Interface (AWS CLI).

            • type — (String)

              The type of environment variable. Valid values include:

              • PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems Manager Parameter Store.

              • PLAINTEXT: An environment variable in plaintext format.

              Possible values include:
              • "PLAINTEXT"
              • "PARAMETER_STORE"
          • privilegedMode — (Boolean)

            Enables running the Docker daemon inside a Docker container. Set to true only if the build project is be used to build Docker images, and the specified build environment image is not provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon fail. You must also start the Docker daemon so that builds can interact with it. One way to do this is to initialize the Docker daemon during the install phase of your build spec by running the following build commands. (Do not run these commands if the specified build environment image is provided by AWS CodeBuild with Docker support.)

            If the operating system's base image is Ubuntu Linux:

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

            If the operating system's base image is Alpine Linux, add the -t argument to timeout:

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

          • certificate — (String)

            The certificate to use with this build project.

          • registryCredential — (map)

            The credentials for access to a private registry.

            • credentialrequired — (String)

              The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager.

              Note: The credential can use the name of the credentials only if they exist in your current region.
            • credentialProviderrequired — (String)

              The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager.

              Possible values include:
              • "SECRETS_MANAGER"
          • imagePullCredentialsType — (String)

            The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:

            • CODEBUILD specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.

            • SERVICE_ROLE specifies that AWS CodeBuild uses your build project's service role.

            When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.

            Possible values include:
            • "CODEBUILD"
            • "SERVICE_ROLE"
        • 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.

        • queuedTimeoutInMinutes — (Integer)

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

        • encryptionKey — (String)

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

          Note: You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

          You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, 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.

        • webhook — (map)

          Information about a webhook that connects repository events to a build project in AWS CodeBuild.

          • url — (String)

            The URL to the webhook.

          • payloadUrl — (String)

            The AWS CodeBuild endpoint where webhook events are sent.

          • secret — (String)

            The secret token of the associated repository.

            Note: A Bitbucket webhook does not support secret.
          • branchFilter — (String)

            A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

            Note: It is recommended that you use filterGroups instead of branchFilter.
          • filterGroups — (Array<Array<map>>)

            An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

            For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

            • typerequired — (String)

              The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

              EVENT

              A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

              Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
              ACTOR_ACCOUNT_ID

              A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

              HEAD_REF

              A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

              Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

              BASE_REF

              A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

              Note: Works with pull request events only.
              FILE_PATH

              A webhook triggers a build when the path of a changed file matches the regular expression pattern.

              Note: Works with GitHub and GitHub Enterprise push events only.
              Possible values include:
              • "EVENT"
              • "BASE_REF"
              • "HEAD_REF"
              • "ACTOR_ACCOUNT_ID"
              • "FILE_PATH"
            • patternrequired — (String)

              For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

              For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

            • excludeMatchedPattern — (Boolean)

              Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a build.

          • lastModifiedSecret — (Date)

            A timestamp that indicates the last time a repository's secret token was modified.

        • vpcConfig — (map)

          Information about the VPC configuration that AWS CodeBuild accesses.

          • vpcId — (String)

            The ID of the Amazon VPC.

          • subnets — (Array<String>)

            A list of one or more subnet IDs in your Amazon VPC.

          • securityGroupIds — (Array<String>)

            A list of one or more security groups IDs in your Amazon VPC.

        • badge — (map)

          Information about the build badge for the build project.

          • badgeEnabled — (Boolean)

            Set this to true to generate a publicly accessible URL for your project's build badge.

          • badgeRequestUrl — (String)

            The publicly-accessible URL through which you can access the build badge for your project.

            The publicly accessible URL through which you can access the build badge for your project.

        • logsConfig — (map)

          Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.

          • cloudWatchLogs — (map)

            Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch Logs are enabled by default.

            • statusrequired — (String)

              The current status of the logs in Amazon CloudWatch Logs for a build project. Valid values are:

              • ENABLED: Amazon CloudWatch Logs are enabled for this build project.

              • DISABLED: Amazon CloudWatch Logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • groupName — (String)

              The group name of the logs in Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

            • streamName — (String)

              The prefix of the stream name of the Amazon CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.

          • s3Logs — (map)

            Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.

            • statusrequired — (String)

              The current status of the S3 build logs. Valid values are:

              • ENABLED: S3 build logs are enabled for this build project.

              • DISABLED: S3 build logs are not enabled for this build project.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
            • location — (String)

              The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.

            • encryptionDisabled — (Boolean)

              Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.

Returns:

  • (AWS.Request)

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

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

Updates the webhook associated with an AWS CodeBuild build project.

Note: If you use Bitbucket for your repository, rotateSecret is ignored.

Service Reference:

Examples:

Calling the updateWebhook operation

var params = {
  projectName: 'STRING_VALUE', /* required */
  branchFilter: 'STRING_VALUE',
  filterGroups: [
    [
      {
        pattern: 'STRING_VALUE', /* required */
        type: EVENT | BASE_REF | HEAD_REF | ACTOR_ACCOUNT_ID | FILE_PATH, /* required */
        excludeMatchedPattern: true || false
      },
      /* more items */
    ],
    /* more items */
  ],
  rotateSecret: true || false
};
codebuild.updateWebhook(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 AWS CodeBuild project.

    • branchFilter — (String)

      A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

      Note: It is recommended that you use filterGroups instead of branchFilter.
    • rotateSecret — (Boolean)

      A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository, rotateSecret is ignored.

    • filterGroups — (Array<Array<map>>)

      An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger a build. A filter group must pcontain at least one EVENT WebhookFilter.

      • typerequired — (String)

        The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

        EVENT

        A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

        Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
        ACTOR_ACCOUNT_ID

        A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

        HEAD_REF

        A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

        Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

        BASE_REF

        A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

        Note: Works with pull request events only.
        FILE_PATH

        A webhook triggers a build when the path of a changed file matches the regular expression pattern.

        Note: Works with GitHub and GitHub Enterprise push events only.
        Possible values include:
        • "EVENT"
        • "BASE_REF"
        • "HEAD_REF"
        • "ACTOR_ACCOUNT_ID"
        • "FILE_PATH"
      • patternrequired — (String)

        For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

        For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

      • excludeMatchedPattern — (Boolean)

        Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a 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:

      • webhook — (map)

        Information about a repository's webhook that is associated with a project in AWS CodeBuild.

        • url — (String)

          The URL to the webhook.

        • payloadUrl — (String)

          The AWS CodeBuild endpoint where webhook events are sent.

        • secret — (String)

          The secret token of the associated repository.

          Note: A Bitbucket webhook does not support secret.
        • branchFilter — (String)

          A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.

          Note: It is recommended that you use filterGroups instead of branchFilter.
        • filterGroups — (Array<Array<map>>)

          An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.

          For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.

          • typerequired — (String)

            The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF, and FILE_PATH.

            EVENT

            A webhook event triggers a build when the provided pattern matches one of four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. The EVENT patterns are specified as a comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request created, and pull request updated events.

            Note: The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only.
            ACTOR_ACCOUNT_ID

            A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression pattern.

            HEAD_REF

            A webhook event triggers a build when the head reference matches the regular expression pattern. For example, refs/heads/branch-name and refs/tags/tag-name.

            Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.

            BASE_REF

            A webhook event triggers a build when the base reference matches the regular expression pattern. For example, refs/heads/branch-name.

            Note: Works with pull request events only.
            FILE_PATH

            A webhook triggers a build when the path of a changed file matches the regular expression pattern.

            Note: Works with GitHub and GitHub Enterprise push events only.
            Possible values include:
            • "EVENT"
            • "BASE_REF"
            • "HEAD_REF"
            • "ACTOR_ACCOUNT_ID"
            • "FILE_PATH"
          • patternrequired — (String)

            For a WebHookFilter that uses EVENT type, a comma-separated string that specifies one or more events. For example, the webhook filter PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request created, and pull request updated events to trigger a build.

            For a WebHookFilter that uses any of the other filter types, a regular expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type and the pattern ^refs/heads/ triggers a build when the head reference is a branch with a reference name refs/heads/branch-name.

          • excludeMatchedPattern — (Boolean)

            Used to indicate that the pattern determines which webhook events do not trigger a build. If true, then a webhook event that does not match the pattern triggers a build. If false, then a webhook event that matches the pattern triggers a build.

        • lastModifiedSecret — (Date)

          A timestamp that indicates the last time a repository's secret token was modified.

Returns:

  • (AWS.Request)

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