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/0.19.0 (build 7c562bc)", date = "2019-10-15T12:35:09.838Z")
@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 {

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

    /**
     * The human-visible name of this Project.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    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)
    software.amazon.awscdk.services.iam.IRole getRole();

    /**
     * @param policyStatement This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    void addToRolePolicy(final software.amazon.awscdk.services.iam.PolicyStatement policyStatement);

    /**
     * @return a CloudWatch metric associated with this build project.
     * @param metricName The name of the metric. This parameter is required.
     * @param props Customization properties. This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    software.amazon.awscdk.services.cloudwatch.Metric metric(final java.lang.String metricName, final software.amazon.awscdk.services.cloudwatch.MetricOptions 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)
    software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(final 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)
    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)
    software.amazon.awscdk.services.cloudwatch.Metric metricDuration(final 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)
    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)
    software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(final 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)
    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)
    software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(final 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)
    software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds();

    /**
     * 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)
    software.amazon.awscdk.services.events.Rule onBuildFailed(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onBuildFailed(final 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)
    software.amazon.awscdk.services.events.Rule onBuildStarted(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onBuildStarted(final 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)
    software.amazon.awscdk.services.events.Rule onBuildSucceeded(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onBuildSucceeded(final 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)
    software.amazon.awscdk.services.events.Rule onEvent(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onEvent(final 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)
    software.amazon.awscdk.services.events.Rule onPhaseChange(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onPhaseChange(final 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)
    software.amazon.awscdk.services.events.Rule onStateChange(final java.lang.String id, final 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)
    software.amazon.awscdk.services.events.Rule onStateChange(final java.lang.String id);

    /**
     * A proxy class which represents a concrete javascript instance of this type.
     */
    final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.codebuild.IProject {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.setObjRef(objRef);
        }

        /**
         * The ARN of this Project.
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public java.lang.String getProjectArn() {
            return this.jsiiGet("projectArn", java.lang.String.class);
        }

        /**
         * The human-visible name of this Project.
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public java.lang.String getProjectName() {
            return this.jsiiGet("projectName", 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 software.amazon.awscdk.services.iam.IRole getRole() {
            return this.jsiiGet("role", software.amazon.awscdk.services.iam.IRole.class);
        }

        /**
         * The stack in which this resource is defined.
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public software.amazon.awscdk.core.Stack getStack() {
            return this.jsiiGet("stack", software.amazon.awscdk.core.Stack.class);
        }

        /**
         * The construct node in the tree.
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public software.amazon.awscdk.core.ConstructNode getNode() {
            return this.jsiiGet("node", software.amazon.awscdk.core.ConstructNode.class);
        }

        /**
         * The principal to grant permissions to.
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() {
            return this.jsiiGet("grantPrincipal", software.amazon.awscdk.services.iam.IPrincipal.class);
        }

        /**
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public software.amazon.awscdk.services.ec2.Connections getConnections() {
            return this.jsiiGet("connections", software.amazon.awscdk.services.ec2.Connections.class);
        }

        /**
         * @param policyStatement This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public void addToRolePolicy(final software.amazon.awscdk.services.iam.PolicyStatement policyStatement) {
            this.jsiiCall("addToRolePolicy", Void.class, new Object[] { java.util.Objects.requireNonNull(policyStatement, "policyStatement is required") });
        }

        /**
         * @return a CloudWatch metric associated with this build project.
         * @param metricName The name of the metric. This parameter is required.
         * @param props Customization properties. This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public software.amazon.awscdk.services.cloudwatch.Metric metric(final java.lang.String metricName, final software.amazon.awscdk.services.cloudwatch.MetricOptions props) {
            return this.jsiiCall("metric", software.amazon.awscdk.services.cloudwatch.Metric.class, new Object[] { java.util.Objects.requireNonNull(metricName, "metricName is required"), java.util.Objects.requireNonNull(props, "props 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 software.amazon.awscdk.services.cloudwatch.Metric metricBuilds(final software.amazon.awscdk.services.cloudwatch.MetricOptions props) {
            return this.jsiiCall("metricBuilds", 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 software.amazon.awscdk.services.cloudwatch.Metric metricBuilds() {
            return this.jsiiCall("metricBuilds", 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 software.amazon.awscdk.services.cloudwatch.Metric metricDuration(final software.amazon.awscdk.services.cloudwatch.MetricOptions props) {
            return this.jsiiCall("metricDuration", 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 software.amazon.awscdk.services.cloudwatch.Metric metricDuration() {
            return this.jsiiCall("metricDuration", 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 software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds(final software.amazon.awscdk.services.cloudwatch.MetricOptions props) {
            return this.jsiiCall("metricFailedBuilds", 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 software.amazon.awscdk.services.cloudwatch.Metric metricFailedBuilds() {
            return this.jsiiCall("metricFailedBuilds", 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 software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds(final software.amazon.awscdk.services.cloudwatch.MetricOptions props) {
            return this.jsiiCall("metricSucceededBuilds", 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 software.amazon.awscdk.services.cloudwatch.Metric metricSucceededBuilds() {
            return this.jsiiCall("metricSucceededBuilds", software.amazon.awscdk.services.cloudwatch.Metric.class);
        }

        /**
         * 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 software.amazon.awscdk.services.events.Rule onBuildFailed(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onBuildFailed", 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 software.amazon.awscdk.services.events.Rule onBuildFailed(final java.lang.String id) {
            return this.jsiiCall("onBuildFailed", 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 software.amazon.awscdk.services.events.Rule onBuildStarted(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onBuildStarted", 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 software.amazon.awscdk.services.events.Rule onBuildStarted(final java.lang.String id) {
            return this.jsiiCall("onBuildStarted", 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 software.amazon.awscdk.services.events.Rule onBuildSucceeded(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onBuildSucceeded", 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 software.amazon.awscdk.services.events.Rule onBuildSucceeded(final java.lang.String id) {
            return this.jsiiCall("onBuildSucceeded", 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 software.amazon.awscdk.services.events.Rule onEvent(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onEvent", 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 software.amazon.awscdk.services.events.Rule onEvent(final java.lang.String id) {
            return this.jsiiCall("onEvent", 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 software.amazon.awscdk.services.events.Rule onPhaseChange(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onPhaseChange", 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 software.amazon.awscdk.services.events.Rule onPhaseChange(final java.lang.String id) {
            return this.jsiiCall("onPhaseChange", 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 software.amazon.awscdk.services.events.Rule onStateChange(final java.lang.String id, final software.amazon.awscdk.services.events.OnEventOptions options) {
            return this.jsiiCall("onStateChange", 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 software.amazon.awscdk.services.events.Rule onStateChange(final java.lang.String id) {
            return this.jsiiCall("onStateChange", software.amazon.awscdk.services.events.Rule.class, new Object[] { java.util.Objects.requireNonNull(id, "id is required") });
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy