All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.codebuild.IProject Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.codebuild;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.52.1 (build 5ccc8f6)", date = "2022-01-20T19:50:01.574Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.codebuild.$Module.class, fqn = "@aws-cdk/aws-codebuild.IProject")
@software.amazon.jsii.Jsii.Proxy(IProject.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface IProject extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.core.IResource, software.amazon.awscdk.services.iam.IGrantable, software.amazon.awscdk.services.ec2.IConnectable, software.amazon.awscdk.services.codestarnotifications.INotificationRuleSource {

    /**
     * The ARN of this Project.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getProjectArn();

    /**
     * The human-visible name of this Project.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getProjectName();

    /**
     * The IAM service Role of this Project.
     * 

* Undefined for imported Projects. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getRole() { return null; } /** * @param policyStatement This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) void addToRolePolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.PolicyStatement policyStatement); /** * Enable batch builds. *

* Returns an object contining the batch service role if batch builds * could be enabled. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.BatchBuildConfig enableBatchBuilds(); /** * @return a CloudWatch metric associated with this build project. * @param metricName The name of the metric. This parameter is required. * @param props Customization properties. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metric(final @org.jetbrains.annotations.NotNull java.lang.String metricName, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props); /** * @return a CloudWatch metric associated with this build project. * @param metricName The name of the metric. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metric(final @org.jetbrains.annotations.NotNull java.lang.String metricName); /** * Measures the number of builds triggered. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props); /** * Measures the number of builds triggered. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(); /** * Measures the duration of all builds over time. *

* Units: Seconds *

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

* Default: average over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricDuration(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props); /** * Measures the duration of all builds over time. *

* Units: Seconds *

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

* Default: average over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricDuration(); /** * 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 *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.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 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(); /** * Measures the number of successful builds. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props); /** * Measures the number of successful builds. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(); /** * 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. *

* @return CodeStar Notifications rule associated with this build project. * @param id The logical identifier of the CodeStar Notifications rule that will be created. This parameter is required. * @param target The target to register for the CodeStar Notifications destination. This parameter is required. * @param options Customization options for CodeStar Notifications rule. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOn(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codebuild.ProjectNotifyOnOptions options); /** * Defines a CodeStar notification rule which triggers when a build fails. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options); /** * Defines a CodeStar notification rule which triggers when a build fails. *

* @param id This parameter is required. * @param target This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target); /** * Defines a CodeStar notification rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options); /** * Defines a CodeStar notification rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param target This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target); /** * Defines an event rule which triggers when a build fails. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options); /** * Defines an event rule which triggers when a build fails. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id); /** * Defines an event rule which triggers when a build starts. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildStarted(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options); /** * Defines an event rule which triggers when a build starts. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildStarted(final @org.jetbrains.annotations.NotNull java.lang.String id); /** * Defines an event rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options); /** * Defines an event rule which triggers when a build completes successfully. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id); /** * Defines a CloudWatch event rule triggered when something happens with this project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onEvent(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options); /** * Defines a CloudWatch event rule triggered when something happens with this project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onEvent(final @org.jetbrains.annotations.NotNull java.lang.String id); /** * Defines a CloudWatch event rule that triggers upon phase change of this build project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onPhaseChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options); /** * Defines a CloudWatch event rule that triggers upon phase change of this build project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onPhaseChange(final @org.jetbrains.annotations.NotNull java.lang.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. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onStateChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.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. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onStateChange(final @org.jetbrains.annotations.NotNull java.lang.String id); /** * A proxy class which represents a concrete javascript instance of this type. */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.codebuild.IProject.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * The construct tree node for this construct. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.ConstructNode getNode() { return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.ConstructNode.class)); } /** * The environment this resource belongs to. *

* For resources that are created and managed by the CDK * (generally, those created by creating new class instances like Role, Bucket, etc.), * this is always the same as the environment of the stack they belong to; * however, for imported resources * (those obtained from static methods like fromRoleArn, fromBucketName, etc.), * that might be different than the stack they were imported into. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.ResourceEnvironment getEnv() { return software.amazon.jsii.Kernel.get(this, "env", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.ResourceEnvironment.class)); } /** * The stack in which this resource is defined. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Stack getStack() { return software.amazon.jsii.Kernel.get(this, "stack", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.Stack.class)); } /** * The principal to grant permissions to. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() { return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class)); } /** * The network connections associated with this resource. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections() { return software.amazon.jsii.Kernel.get(this, "connections", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.Connections.class)); } /** * The ARN of this Project. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull java.lang.String getProjectArn() { return software.amazon.jsii.Kernel.get(this, "projectArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The human-visible name of this Project. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull java.lang.String getProjectName() { return software.amazon.jsii.Kernel.get(this, "projectName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The IAM service Role of this Project. *

* Undefined for imported Projects. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getRole() { return software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class)); } /** * Apply the given removal policy to this resource. *

* The Removal Policy controls what happens to this resource when it stops * being managed by CloudFormation, either because you've removed it from the * CDK application or because you've made a change that requires the resource * to be replaced. *

* The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS * account for data recovery and cleanup later (RemovalPolicy.RETAIN). *

* @param policy This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final void applyRemovalPolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.RemovalPolicy policy) { software.amazon.jsii.Kernel.call(this, "applyRemovalPolicy", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policy, "policy is required") }); } /** * Returns a source configuration for notification rule. *

* @param scope This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.NotificationRuleSourceConfig bindAsNotificationRuleSource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope) { return software.amazon.jsii.Kernel.call(this, "bindAsNotificationRuleSource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.NotificationRuleSourceConfig.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") }); } /** * @param policyStatement This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final void addToRolePolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.PolicyStatement policyStatement) { software.amazon.jsii.Kernel.call(this, "addToRolePolicy", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policyStatement, "policyStatement is required") }); } /** * Enable batch builds. *

* Returns an object contining the batch service role if batch builds * could be enabled. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.BatchBuildConfig enableBatchBuilds() { return software.amazon.jsii.Kernel.call(this, "enableBatchBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codebuild.BatchBuildConfig.class)); } /** * @return a CloudWatch metric associated with this build project. * @param metricName The name of the metric. This parameter is required. * @param props Customization properties. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metric(final @org.jetbrains.annotations.NotNull java.lang.String metricName, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { java.util.Objects.requireNonNull(metricName, "metricName is required"), props }); } /** * @return a CloudWatch metric associated with this build project. * @param metricName The name of the metric. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metric(final @org.jetbrains.annotations.NotNull java.lang.String metricName) { return software.amazon.jsii.Kernel.call(this, "metric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { java.util.Objects.requireNonNull(metricName, "metricName is required") }); } /** * Measures the number of builds triggered. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * Measures the number of builds triggered. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricBuilds() { return software.amazon.jsii.Kernel.call(this, "metricBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class)); } /** * Measures the duration of all builds over time. *

* Units: Seconds *

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

* Default: average over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricDuration(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricDuration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * Measures the duration of all builds over time. *

* Units: Seconds *

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

* Default: average over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricDuration() { return software.amazon.jsii.Kernel.call(this, "metricDuration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class)); } /** * 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 *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricFailedBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { 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 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds() { return software.amazon.jsii.Kernel.call(this, "metricFailedBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class)); } /** * Measures the number of successful builds. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricSucceededBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * Measures the number of successful builds. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds() { return software.amazon.jsii.Kernel.call(this, "metricSucceededBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class)); } /** * 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. *

* @return CodeStar Notifications rule associated with this build project. * @param id The logical identifier of the CodeStar Notifications rule that will be created. This parameter is required. * @param target The target to register for the CodeStar Notifications destination. This parameter is required. * @param options Customization options for CodeStar Notifications rule. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOn(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codebuild.ProjectNotifyOnOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), java.util.Objects.requireNonNull(options, "options is required") }); } /** * Defines a CodeStar notification rule which triggers when a build fails. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), options }); } /** * Defines a CodeStar notification rule which triggers when a build fails. *

* @param id This parameter is required. * @param target This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required") }); } /** * Defines a CodeStar notification rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), options }); } /** * Defines a CodeStar notification rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param target This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required") }); } /** * Defines an event rule which triggers when a build fails. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines an event rule which triggers when a build fails. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } /** * Defines an event rule which triggers when a build starts. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildStarted(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildStarted", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines an event rule which triggers when a build starts. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildStarted(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onBuildStarted", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } /** * Defines an event rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines an event rule which triggers when a build completes successfully. *

* @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } /** * Defines a CloudWatch event rule triggered when something happens with this project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onEvent(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onEvent", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines a CloudWatch event rule triggered when something happens with this project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onEvent(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onEvent", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } /** * Defines a CloudWatch event rule that triggers upon phase change of this build project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onPhaseChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onPhaseChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines a CloudWatch event rule that triggers upon phase change of this build project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onPhaseChange(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onPhaseChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } /** * 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. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onStateChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onStateChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), 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. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onStateChange(final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.Kernel.call(this, "onStateChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") }); } } /** * Internal default implementation for {@link IProject}. */ @software.amazon.jsii.Internal interface Jsii$Default extends IProject, software.amazon.awscdk.core.IResource.Jsii$Default, software.amazon.awscdk.services.codestarnotifications.INotificationRuleSource.Jsii$Default, software.amazon.awscdk.services.ec2.IConnectable.Jsii$Default, software.amazon.awscdk.services.iam.IGrantable.Jsii$Default { /** * The construct tree node for this construct. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.ConstructNode getNode() { return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.ConstructNode.class)); } /** * The environment this resource belongs to. *

* For resources that are created and managed by the CDK * (generally, those created by creating new class instances like Role, Bucket, etc.), * this is always the same as the environment of the stack they belong to; * however, for imported resources * (those obtained from static methods like fromRoleArn, fromBucketName, etc.), * that might be different than the stack they were imported into. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.ResourceEnvironment getEnv() { return software.amazon.jsii.Kernel.get(this, "env", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.ResourceEnvironment.class)); } /** * The stack in which this resource is defined. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Stack getStack() { return software.amazon.jsii.Kernel.get(this, "stack", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.Stack.class)); } /** * The principal to grant permissions to. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() { return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class)); } /** * The network connections associated with this resource. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections() { return software.amazon.jsii.Kernel.get(this, "connections", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.Connections.class)); } /** * The ARN of this Project. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull java.lang.String getProjectArn() { return software.amazon.jsii.Kernel.get(this, "projectArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The human-visible name of this Project. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull java.lang.String getProjectName() { return software.amazon.jsii.Kernel.get(this, "projectName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The IAM service Role of this Project. *

* Undefined for imported Projects. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getRole() { return software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class)); } /** * Apply the given removal policy to this resource. *

* The Removal Policy controls what happens to this resource when it stops * being managed by CloudFormation, either because you've removed it from the * CDK application or because you've made a change that requires the resource * to be replaced. *

* The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS * account for data recovery and cleanup later (RemovalPolicy.RETAIN). *

* @param policy This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default void applyRemovalPolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.RemovalPolicy policy) { software.amazon.jsii.Kernel.call(this, "applyRemovalPolicy", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policy, "policy is required") }); } /** * Returns a source configuration for notification rule. *

* @param scope This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.NotificationRuleSourceConfig bindAsNotificationRuleSource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope) { return software.amazon.jsii.Kernel.call(this, "bindAsNotificationRuleSource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.NotificationRuleSourceConfig.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") }); } /** * @param policyStatement This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default void addToRolePolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.PolicyStatement policyStatement) { software.amazon.jsii.Kernel.call(this, "addToRolePolicy", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policyStatement, "policyStatement is required") }); } /** * Enable batch builds. *

* Returns an object contining the batch service role if batch builds * could be enabled. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.BatchBuildConfig enableBatchBuilds() { return software.amazon.jsii.Kernel.call(this, "enableBatchBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codebuild.BatchBuildConfig.class)); } /** * @return a CloudWatch metric associated with this build project. * @param metricName The name of the metric. This parameter is required. * @param props Customization properties. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metric(final @org.jetbrains.annotations.NotNull java.lang.String metricName, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { java.util.Objects.requireNonNull(metricName, "metricName is required"), props }); } /** * Measures the number of builds triggered. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * Measures the duration of all builds over time. *

* Units: Seconds *

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

* Default: average over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricDuration(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricDuration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { 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 *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricFailedBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * Measures the number of successful builds. *

* Units: Count *

* Valid CloudWatch statistics: Sum *

* Default: sum over 5 minutes *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.MetricOptions props) { return software.amazon.jsii.Kernel.call(this, "metricSucceededBuilds", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Metric.class), new Object[] { props }); } /** * 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. *

* @return CodeStar Notifications rule associated with this build project. * @param id The logical identifier of the CodeStar Notifications rule that will be created. This parameter is required. * @param target The target to register for the CodeStar Notifications destination. This parameter is required. * @param options Customization options for CodeStar Notifications rule. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOn(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codebuild.ProjectNotifyOnOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), java.util.Objects.requireNonNull(options, "options is required") }); } /** * Defines a CodeStar notification rule which triggers when a build fails. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), options }); } /** * Defines a CodeStar notification rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param target This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRule notifyOnBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget target, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions options) { return software.amazon.jsii.Kernel.call(this, "notifyOnBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codestarnotifications.INotificationRule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(target, "target is required"), options }); } /** * Defines an event rule which triggers when a build fails. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildFailed(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildFailed", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines an event rule which triggers when a build starts. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildStarted(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildStarted", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines an event rule which triggers when a build completes successfully. *

* @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onBuildSucceeded(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onBuildSucceeded", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines a CloudWatch event rule triggered when something happens with this project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onEvent(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onEvent", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } /** * Defines a CloudWatch event rule that triggers upon phase change of this build project. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onPhaseChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onPhaseChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), 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. *

* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html * @param id This parameter is required. * @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule onStateChange(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.OnEventOptions options) { return software.amazon.jsii.Kernel.call(this, "onStateChange", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options }); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy