1. Docs
  2. @pulumi/awsx
  3. classic
  4. codebuild

Module classic/codebuild

    APIs

    APIs

    namespace 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

    interface CodebuildMetricChange

    interface CodebuildMetricChange extends MetricChange

    property color

    color?: pulumi.Input<string>;

    The six-digit HTML hex color code to be used for this metric.

    Only used if this metric is displayed in a [Dashboard] with a [MetricWidget].

    property dimensions

    dimensions?: pulumi.Input<Record<string, pulumi.Input<string>>>;

    The new dimension for this metric. If this object is missing this property, then no change will be made. However, if the property is there by set to [undefined] then the value will be cleared.

    property extendedStatistic

    extendedStatistic?: pulumi.Input<number>;

    The new percentile statistic for the metric associated with the alarm. If this object is missing this property, then no change will be made. However, if the property is there by set to [undefined] then the value will be set to the default.

    property label

    label?: pulumi.Input<string>;

    The label to display for this metric in the graph legend. If this is not specified, the metric is given an autogenerated label that distinguishes it from the other metrics in the widget.

    Only used if this metric is displayed in a [Dashboard] with a [MetricWidget].

    property period

    period?: pulumi.Input<number>;

    The new period in seconds over which the specified stat is applied. If this object is missing this property, then no change will be made. However, if the property is there by set to [undefined] then the value will be set to the default (300s).

    property project

    project?: aws.codebuild.Project;

    Optional Project this metric should be filtered down to.

    property statistic

    statistic?: pulumi.Input<MetricStatistic>;

    The new statistic to apply to the alarm’s associated metric. If this object is missing this property, then no change will be made. However, if the property is there by set to [undefined] then the value will be set to the default.

    property unit

    unit?: pulumi.Input<MetricUnit>;

    The new unit for this metric. If this object is missing this property, then no change will be made. However, if the property is there by set to [undefined] then the value will be set to the default.

    property visible

    visible?: pulumi.Input<boolean>;

    Set this to true to have the metric appear in the graph, or false to have it be hidden. The default is true.

    Only used if this metric is displayed in a [Dashboard] with a [MetricWidget].

    property yAxis

    yAxis?: pulumi.Input<"left" | "right">;

    Where on the graph to display the y-axis for this metric. The default is left.

    Only used if this metric is displayed in a [Dashboard] with a [MetricWidget].

    type CodebuildMetricName

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

    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

      Pulumi AI - What cloud infrastructure would you like to build? Generate Program