io.github.cdklabs.cdk.codepipeline.extensions.ChangeController Maven / Gradle / Ivy
Show all versions of cdk-codepipeline-extensions Show documentation
package io.github.cdklabs.cdk.codepipeline.extensions;
/**
* (experimental) A change controller.
*
* When added to a stage in a pipeline, this will check against
* a calendar and enable or disable the stage transition based off that calendar,
* defaulting to closed when the calendar cannot be found or when
* the check against it fails. It also checks to against alarms.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.72.0 (build 4b8828b)", date = "2022-12-24T00:13:28.711Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.codepipeline.extensions.$Module.class, fqn = "@cdklabs/cdk-codepipeline-extensions.ChangeController")
public class ChangeController extends software.constructs.Construct {
protected ChangeController(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ChangeController(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public ChangeController(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.codepipeline.extensions.ChangeControllerProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdk.codepipeline.extensions.ChangeController}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdk.codepipeline.extensions.ChangeControllerProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdk.codepipeline.extensions.ChangeControllerProps.Builder();
}
/**
* (experimental) The calendar object.
*
* @return {@code this}
* @param calendar The calendar object. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder calendar(final io.github.cdklabs.cdk.codepipeline.extensions.Calendar calendar) {
this.props.calendar(calendar);
return this;
}
/**
* (experimental) The schedule on which to check the calendar and alarm state.
*
* @return {@code this}
* @param schedule The schedule on which to check the calendar and alarm state. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder schedule(final software.amazon.awscdk.services.events.Schedule schedule) {
this.props.schedule(schedule);
return this;
}
/**
* (experimental) The terms to search for in alarm descriptions.
*
* These if these alarms are in ALARM state, the change controller will close
* the pipeline stage.
*
* @return {@code this}
* @param searchTerms The terms to search for in alarm descriptions. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder searchTerms(final java.util.List searchTerms) {
this.props.searchTerms(searchTerms);
return this;
}
/**
* (experimental) The pipeline stage.
*
* @return {@code this}
* @param stage The pipeline stage. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stage(final software.amazon.awscdk.services.codepipeline.IStage stage) {
this.props.stage(stage);
return this;
}
/**
* @returns a newly built instance of {@link io.github.cdklabs.cdk.codepipeline.extensions.ChangeController}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdk.codepipeline.extensions.ChangeController build() {
return new io.github.cdklabs.cdk.codepipeline.extensions.ChangeController(
this.scope,
this.id,
this.props.build()
);
}
}
}