Interface IProject.Jsii$Default

All Superinterfaces:
IConnectable, IConnectable.Jsii$Default, software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default, IEnvironmentAware, IEnvironmentAware.Jsii$Default, IGrantable, IGrantable.Jsii$Default, INotificationRuleSource, INotificationRuleSource.Jsii$Default, IProject, IProjectRef, IProjectRef.Jsii$Default, IResource, IResource.Jsii$Default, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
IProject.Jsii$Proxy
Enclosing interface:
IProject

Internal default implementation for IProject.
  • Method Details

    • getProjectArn

      @Stability(Stable) @NotNull default String getProjectArn()
      The ARN of this Project.
      Specified by:
      getProjectArn in interface IProject
    • getProjectName

      @Stability(Stable) @NotNull default String getProjectName()
      The human-visible name of this Project.
      Specified by:
      getProjectName in interface IProject
    • getRole

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

      Undefined for imported Projects.

      Specified by:
      getRole in interface IProject
    • addToRolePolicy

      @Stability(Stable) default void addToRolePolicy(@NotNull PolicyStatement policyStatement)
      Specified by:
      addToRolePolicy in interface IProject
      Parameters:
      policyStatement - This parameter is required.
    • enableBatchBuilds

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

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

      Specified by:
      enableBatchBuilds in interface IProject
    • metric

      @Stability(Stable) @NotNull default Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Specified by:
      metric in interface IProject
      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 default Metric metric(@NotNull String metricName)
      Specified by:
      metric in interface IProject
      Parameters:
      metricName - The name of the metric. This parameter is required.
      Returns:
      a CloudWatch metric associated with this build project.
    • metricBuilds

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

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Specified by:
      metricBuilds in interface IProject
      Parameters:
      props -
    • metricBuilds

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

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Specified by:
      metricBuilds in interface IProject
    • metricDuration

      @Stability(Stable) @NotNull default 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

      Specified by:
      metricDuration in interface IProject
      Parameters:
      props -
    • metricDuration

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

      Units: Seconds

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

      Default: average over 5 minutes

      Specified by:
      metricDuration in interface IProject
    • metricFailedBuilds

      @Stability(Stable) @NotNull default 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

      Specified by:
      metricFailedBuilds in interface IProject
      Parameters:
      props -
    • metricFailedBuilds

      @Stability(Stable) @NotNull default 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

      Specified by:
      metricFailedBuilds in interface IProject
    • metricSucceededBuilds

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

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Specified by:
      metricSucceededBuilds in interface IProject
      Parameters:
      props -
    • metricSucceededBuilds

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

      Units: Count

      Valid CloudWatch statistics: Sum

      Default: sum over 5 minutes

      Specified by:
      metricSucceededBuilds in interface IProject
    • notifyOn

      @Stability(Stable) @NotNull default 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.

      Specified by:
      notifyOn in interface IProject
      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 default INotificationRule notifyOnBuildFailed(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
      Defines a CodeStar notification rule which triggers when a build fails.

      Specified by:
      notifyOnBuildFailed in interface IProject
      Parameters:
      id - This parameter is required.
      target - This parameter is required.
      options -
    • notifyOnBuildFailed

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

      Specified by:
      notifyOnBuildFailed in interface IProject
      Parameters:
      id - This parameter is required.
      target - This parameter is required.
    • notifyOnBuildSucceeded

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

      Specified by:
      notifyOnBuildSucceeded in interface IProject
      Parameters:
      id - This parameter is required.
      target - This parameter is required.
      options -
    • notifyOnBuildSucceeded

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

      Specified by:
      notifyOnBuildSucceeded in interface IProject
      Parameters:
      id - This parameter is required.
      target - This parameter is required.
    • onBuildFailed

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

      Specified by:
      onBuildFailed in interface IProject
      Parameters:
      id - This parameter is required.
      options -
    • onBuildFailed

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

      Specified by:
      onBuildFailed in interface IProject
      Parameters:
      id - This parameter is required.
    • onBuildStarted

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

      Specified by:
      onBuildStarted in interface IProject
      Parameters:
      id - This parameter is required.
      options -
    • onBuildStarted

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

      Specified by:
      onBuildStarted in interface IProject
      Parameters:
      id - This parameter is required.
    • onBuildSucceeded

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

      Specified by:
      onBuildSucceeded in interface IProject
      Parameters:
      id - This parameter is required.
      options -
    • onBuildSucceeded

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

      Specified by:
      onBuildSucceeded in interface IProject
      Parameters:
      id - This parameter is required.
    • onEvent

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

      Specified by:
      onEvent in interface IProject
      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onEvent

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

      Specified by:
      onEvent in interface IProject
      Parameters:
      id - This parameter is required.
      See Also:
    • onPhaseChange

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

      Specified by:
      onPhaseChange in interface IProject
      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onPhaseChange

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

      Specified by:
      onPhaseChange in interface IProject
      Parameters:
      id - This parameter is required.
      See Also:
    • onStateChange

      @Stability(Stable) @NotNull default 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.

      Specified by:
      onStateChange in interface IProject
      Parameters:
      id - This parameter is required.
      options -
      See Also:
    • onStateChange

      @Stability(Stable) @NotNull default 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.

      Specified by:
      onStateChange in interface IProject
      Parameters:
      id - This parameter is required.
      See Also: