com.github.eladb.watchful.WatchfulAspect Maven / Gradle / Ivy
Show all versions of cdk-watchful Show documentation
package com.github.eladb.watchful;
/**
* A CDK aspect that can automatically watch all resources within a scope.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.13.0 (build 385c325)", date = "2020-10-05T09:37:29.749Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = com.github.eladb.watchful.$Module.class, fqn = "cdk-watchful.WatchfulAspect")
public class WatchfulAspect extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.core.IAspect {
protected WatchfulAspect(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected WatchfulAspect(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* Defines a watchful aspect.
*
* @param watchful The watchful to add those resources to. This parameter is required.
* @param props Options.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public WatchfulAspect(final @org.jetbrains.annotations.NotNull com.github.eladb.watchful.Watchful watchful, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchfulAspectProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(watchful, "watchful is required"), props });
}
/**
* Defines a watchful aspect.
*
* @param watchful The watchful to add those resources to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public WatchfulAspect(final @org.jetbrains.annotations.NotNull com.github.eladb.watchful.Watchful watchful) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(watchful, "watchful is required") });
}
/**
* All aspects can visit an IConstruct.
*
* @param node This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void visit(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.IConstruct node) {
this.jsiiCall("visit", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(node, "node is required") });
}
/**
* A fluent builder for {@link com.github.eladb.watchful.WatchfulAspect}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param watchful The watchful to add those resources to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final com.github.eladb.watchful.Watchful watchful) {
return new Builder(watchful);
}
private final com.github.eladb.watchful.Watchful watchful;
private com.github.eladb.watchful.WatchfulAspectProps.Builder props;
private Builder(final com.github.eladb.watchful.Watchful watchful) {
this.watchful = watchful;
}
/**
* Automatically watch API Gateway APIs in the scope.
*
* Default: true
*
* @return {@code this}
* @param apiGateway Automatically watch API Gateway APIs in the scope. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder apiGateway(final java.lang.Boolean apiGateway) {
this.props().apiGateway(apiGateway);
return this;
}
/**
* Automatically watch all Amazon DynamoDB tables in the scope.
*
* Default: true
*
* @return {@code this}
* @param dynamodb Automatically watch all Amazon DynamoDB tables in the scope. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dynamodb(final java.lang.Boolean dynamodb) {
this.props().dynamodb(dynamodb);
return this;
}
/**
* Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern).
*
* Default: true
*
* @return {@code this}
* @param ec2Ecs Automatically watch ApplicationLoadBalanced EC2 Ecs Services in the scope (using ECS Pattern). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ec2Ecs(final java.lang.Boolean ec2Ecs) {
this.props().ec2Ecs(ec2Ecs);
return this;
}
/**
* Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern).
*
* Default: true
*
* @return {@code this}
* @param fargateecs Automatically watch ApplicationLoadBalanced Fargate Ecs Services in the scope (using ECS Pattern). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder fargateecs(final java.lang.Boolean fargateecs) {
this.props().fargateecs(fargateecs);
return this;
}
/**
* Automatically watch AWS Lambda functions in the scope.
*
* Default: true
*
* @return {@code this}
* @param lambda Automatically watch AWS Lambda functions in the scope. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambda(final java.lang.Boolean lambda) {
this.props().lambda(lambda);
return this;
}
/**
* Automatically watch RDS Aurora clusters in the scope.
*
* Default: true
*
* @return {@code this}
* @param rdsaurora Automatically watch RDS Aurora clusters in the scope. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder rdsaurora(final java.lang.Boolean rdsaurora) {
this.props().rdsaurora(rdsaurora);
return this;
}
/**
* @returns a newly built instance of {@link com.github.eladb.watchful.WatchfulAspect}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public com.github.eladb.watchful.WatchfulAspect build() {
return new com.github.eladb.watchful.WatchfulAspect(
this.watchful,
this.props != null ? this.props.build() : null
);
}
private com.github.eladb.watchful.WatchfulAspectProps.Builder props() {
if (this.props == null) {
this.props = new com.github.eladb.watchful.WatchfulAspectProps.Builder();
}
return this.props;
}
}
}