Module codebuild

@pulumi/awsx > codebuild

module metrics

function buildDuration

buildDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s BUILD phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function builds

builds(change?: CodebuildMetricChange): Metric

Measures the number of builds triggered.

Units: Count Valid CloudWatch statistics: Sum

function downloadSourceDuration

downloadSourceDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s DOWNLOAD_SOURCE phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function duration

duration(change?: CodebuildMetricChange): Metric

Measures the duration of all builds over time.

Units: Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function failedBuilds

failedBuilds(change?: CodebuildMetricChange): Metric

Measures the number of builds that failed because of client error or because of a timeout.

Units: Count Valid CloudWatch statistics: Sum

function finalizingDuration

finalizingDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s FINALIZING phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function installDuration

installDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s INSTALL phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function metric

metric(metricName: CodebuildMetricName, change: CodebuildMetricChange): Metric

Creates an AWS/CodeBuild metric with the requested [metricName]. See https://docs.aws.amazon.com/codebuild/latest/userguide/monitoring-builds.html for list of all metric-names.

Note, individual metrics can easily be obtained without supplying the name using the other [metricXXX] functions.

You can use Amazon CloudWatch to watch your builds, report when something is wrong, and take automatic actions when appropriate. You can monitor your builds at two levels:

  • At the project level: These metrics are for all builds in the specified project only. To see metrics for a project, specify the ProjectName for the dimension in CloudWatch.

  • At the AWS account level: These metrics are for all builds in one account. To see metrics at the AWS account level, do not enter a dimension in CloudWatch.

CloudWatch metrics show the behavior of your builds over time. For example, you can monitor:

  • How many builds were attempted in a build project or an AWS account over time.
  • How many builds were successful in a build project or an AWS account over time.
  • How many builds failed in a build project or an AWS account over time.
  • How much time CodeBuild spent executing builds in a build project or an AWS account over time.

Metrics displayed in the CodeBuild console are always from the past three days. You can use the CloudWatch console to view CodeBuild metrics over different durations.

“ProjectName” is the only AWS CodeBuild metrics dimension. If it is specified, then the metrics are for that project. If it is not specified, then the metrics are for the current AWS account.

function postBuildDuration

postBuildDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s POST_BUILD phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function preBuildDuration

preBuildDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s PRE_BUILD phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function provisioningDuration

provisioningDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s PROVISIONING phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function queuedDuration

queuedDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s QUEUED phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function submittedDuration

submittedDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s SUBMITTED phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

function succeededBuilds

succeededBuilds(change?: CodebuildMetricChange): Metric

Measures the number of successful builds.

Units: Count Valid CloudWatch statistics: Sum

function uploadArtifactsDuration

uploadArtifactsDuration(change?: CodebuildMetricChange): Metric

Measures the duration of the build’s UPLOAD_ARTIFACTS phase.

Units:Seconds Valid CloudWatch statistics: Average (recommended), Maximum, Minimum

interface CodebuildMetricChange

type CodebuildMetricName

type CodebuildMetricName = "BuildDuration" | "Builds" | "DownloadSourceDuration" | "Duration" | "FailedBuilds" | "FinalizingDuration" | "InstallDuration" | "PostBuildDuration" | "PreBuildDuration" | "ProvisioningDuration" | "QueuedDuration" | "SubmittedDuration" | "SucceededBuilds" | "UploadArtifactsDuration";