Interface IProject

All Superinterfaces:
IConnectable, software.constructs.IConstruct, software.constructs.IDependable, IGrantable, INotificationRuleSource, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IProject.Jsii$Default
All Known Implementing Classes:
IProject.Jsii$Proxy, PipelineProject, Project

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.658Z") @Stability(Stable) public interface IProject extends software.amazon.jsii.JsiiSerializable, IResource, IGrantable, IConnectable, INotificationRuleSource
  • Method Details

    • getProjectArn

      @Stability(Stable) @NotNull String getProjectArn()
      The ARN of this Project.
    • getProjectName

      @Stability(Stable) @NotNull String getProjectName()
      The human-visible name of this Project.
    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The IAM service Role of this Project.

      Undefined for imported Projects.

    • addToRolePolicy

      @Stability(Stable) void addToRolePolicy(@NotNull PolicyStatement policyStatement)
      Parameters:
      policyStatement - This parameter is required.
    • enableBatchBuilds

      @Stability(Stable) @Nullable BatchBuildConfig enableBatchBuilds()
      Enable batch builds.

      Returns an object contining the batch service role if batch builds could be enabled.

    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Parameters:
      metricName - The name of the metric. This parameter is required.
      props - Customization properties.
      Returns:
      a CloudWatch metric associated with this build project.
    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName)
      Parameters:
      metricName - The name of the metric. This parameter is required.
      Returns:
      a CloudWatch metric associated with this build project.
    • metricBuilds

      @Stability(Stable) @NotNull Metric metricBuilds(@Nullable MetricOptions props)
      Measures the number of builds triggered.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricBuilds

      @Stability(Stable) @NotNull Metric metricBuilds()
      Measures the number of builds triggered.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

    • metricDuration

      @Stability(Stable) @NotNull Metric metricDuration(@Nullable MetricOptions props)
      Measures the duration of all builds over time.

      Units: Seconds

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

      Default: average over 5 minutes

      Parameters:
      props -
    • metricDuration

      @Stability(Stable) @NotNull Metric metricDuration()
      Measures the duration of all builds over time.

      Units: Seconds

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

      Default: average over 5 minutes

    • metricFailedBuilds

      @Stability(Stable) @NotNull Metric metricFailedBuilds(@Nullable MetricOptions props)
      Measures the number of builds that failed because of client error or because of a timeout.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricFailedBuilds

      @Stability(Stable) @NotNull Metric metricFailedBuilds()
      Measures the number of builds that failed because of client error or because of a timeout.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

    • metricSucceededBuilds

      @Stability(Stable) @NotNull Metric metricSucceededBuilds(@Nullable MetricOptions props)
      Measures the number of successful builds.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricSucceededBuilds

      @Stability(Stable) @NotNull Metric metricSucceededBuilds()
      Measures the number of successful builds.

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

    • notifyOn

      @Stability(Stable) @NotNull INotificationRule notifyOn(@NotNull String id, @NotNull INotificationRuleTarget target, @NotNull ProjectNotifyOnOptions options)
      Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to onEvent API.

      You can also use the methods notifyOnBuildSucceeded and notifyOnBuildFailed to define rules for these specific event emitted.

      Parameters:
      id - The logical identifier of the CodeStar Notifications rule that will be created. This parameter is required.
      target - The target to register for the CodeStar Notifications destination. This parameter is required.
      options - Customization options for CodeStar Notifications rule. This parameter is required.
      Returns:
      CodeStar Notifications rule associated with this build project.
    • notifyOnBuildFailed

      @Stability(Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
      Defines a CodeStar notification rule which triggers when a build fails.

      Parameters:
      id - This parameter is required.
      target - This parameter is required.
      options -
    • notifyOnBuildFailed

      @Stability(Stable) @NotNull INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target)
      Defines a CodeStar notification rule which triggers when a build fails.

      Parameters:
      id - This parameter is required.
      target - This parameter is required.
    • notifyOnBuildSucceeded

      @Stability(Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
      Defines a CodeStar notification rule which triggers when a build completes successfully.

      Parameters:
      id - This parameter is required.
      target - This parameter is required.
      options -
    • notifyOnBuildSucceeded

      @Stability(Stable) @NotNull INotificationRule notifyOnBuildSucceeded(@NotNull String id, @NotNull INotificationRuleTarget target)
      Defines a CodeStar notification rule which triggers when a build completes successfully.

      Parameters:
      id - This parameter is required.
      target - This parameter is required.
    • onBuildFailed

      @Stability(Stable) @NotNull Rule onBuildFailed(@NotNull String id, @Nullable OnEventOptions options)
      Defines an event rule which triggers when a build fails.

      Parameters:
      id - This parameter is required.
      options -
    • onBuildFailed

      @Stability(Stable) @NotNull Rule onBuildFailed(@NotNull String id)
      Defines an event rule which triggers when a build fails.

      Parameters:
      id - This parameter is required.
    • onBuildStarted

      @Stability(Stable) @NotNull Rule onBuildStarted(@NotNull String id, @Nullable OnEventOptions options)
      Defines an event rule which triggers when a build starts.

      Parameters:
      id - This parameter is required.
      options -
    • onBuildStarted

      @Stability(Stable) @NotNull Rule onBuildStarted(@NotNull String id)
      Defines an event rule which triggers when a build starts.

      Parameters:
      id - This parameter is required.
    • onBuildSucceeded

      @Stability(Stable) @NotNull Rule onBuildSucceeded(@NotNull String id, @Nullable OnEventOptions options)
      Defines an event rule which triggers when a build completes successfully.

      Parameters:
      id - This parameter is required.
      options -
    • onBuildSucceeded

      @Stability(Stable) @NotNull Rule onBuildSucceeded(@NotNull String id)
      Defines an event rule which triggers when a build completes successfully.

      Parameters:
      id - This parameter is required.
    • onEvent

      @Stability(Stable) @NotNull Rule onEvent(@NotNull String id, @Nullable OnEventOptions options)
      Defines a CloudWatch event rule triggered when something happens with this project.

      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onEvent

      @Stability(Stable) @NotNull Rule onEvent(@NotNull String id)
      Defines a CloudWatch event rule triggered when something happens with this project.

      Parameters:
      id - This parameter is required.
      See Also:
    • onPhaseChange

      @Stability(Stable) @NotNull Rule onPhaseChange(@NotNull String id, @Nullable OnEventOptions options)
      Defines a CloudWatch event rule that triggers upon phase change of this build project.

      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onPhaseChange

      @Stability(Stable) @NotNull Rule onPhaseChange(@NotNull String id)
      Defines a CloudWatch event rule that triggers upon phase change of this build project.

      Parameters:
      id - This parameter is required.
      See Also:
    • onStateChange

      @Stability(Stable) @NotNull Rule onStateChange(@NotNull String id, @Nullable OnEventOptions options)
      Defines a CloudWatch event rule triggered when the build project state changes.

      You can filter specific build status events using an event pattern filter on the build-status detail field:

      const rule = project.onStateChange('OnBuildStarted', { target }); rule.addEventPattern({ detail: { 'build-status': [ "IN_PROGRESS", "SUCCEEDED", "FAILED", "STOPPED" ] } });

      You can also use the methods onBuildFailed and onBuildSucceeded to define rules for these specific state changes.

      To access fields from the event in the event target input, use the static fields on the StateChangeEvent class.

      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onStateChange

      @Stability(Stable) @NotNull Rule onStateChange(@NotNull String id)
      Defines a CloudWatch event rule triggered when the build project state changes.

      You can filter specific build status events using an event pattern filter on the build-status detail field:

      const rule = project.onStateChange('OnBuildStarted', { target }); rule.addEventPattern({ detail: { 'build-status': [ "IN_PROGRESS", "SUCCEEDED", "FAILED", "STOPPED" ] } });

      You can also use the methods onBuildFailed and onBuildSucceeded to define rules for these specific state changes.

      To access fields from the event in the event target input, use the static fields on the StateChangeEvent class.

      Parameters:
      id - This parameter is required.
      See Also: