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

io.github.cdklabs.cdkmonitoringconstructs.ConnectionAlarmFactory Maven / Gradle / Ivy

There is a newer version: 9.1.0
Show newest version
package io.github.cdklabs.cdkmonitoringconstructs;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T17:32:51.858Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.ConnectionAlarmFactory")
public class ConnectionAlarmFactory extends software.amazon.jsii.JsiiObject {

    protected ConnectionAlarmFactory(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected ConnectionAlarmFactory(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param alarmFactory This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public ConnectionAlarmFactory(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmFactory alarmFactory) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(alarmFactory, "alarmFactory is required") });
    }

    /**
     * @param metric This parameter is required.
     * @param props This parameter is required.
     * @param disambiguator
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation addMaxConnectionCountAlarm(final @org.jetbrains.annotations.NotNull java.lang.Object metric, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.HighConnectionCountThreshold props, final @org.jetbrains.annotations.Nullable java.lang.String disambiguator) {
        if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
            if (
                 !(metric instanceof software.amazon.awscdk.services.cloudwatch.Metric)
                && !(metric instanceof software.amazon.awscdk.services.cloudwatch.MathExpression)
            ) {
                throw new IllegalArgumentException(
                    new java.lang.StringBuilder("Expected ")
                        .append("metric")
                        .append(" to be one of: software.amazon.awscdk.services.cloudwatch.Metric, software.amazon.awscdk.services.cloudwatch.MathExpression; received ")
                        .append(metric.getClass()).toString());
            }
        }
        return software.amazon.jsii.Kernel.call(this, "addMaxConnectionCountAlarm", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation.class), new Object[] { java.util.Objects.requireNonNull(metric, "metric is required"), java.util.Objects.requireNonNull(props, "props is required"), disambiguator });
    }

    /**
     * @param metric This parameter is required.
     * @param props This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation addMaxConnectionCountAlarm(final @org.jetbrains.annotations.NotNull java.lang.Object metric, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.HighConnectionCountThreshold props) {
        if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
            if (
                 !(metric instanceof software.amazon.awscdk.services.cloudwatch.Metric)
                && !(metric instanceof software.amazon.awscdk.services.cloudwatch.MathExpression)
            ) {
                throw new IllegalArgumentException(
                    new java.lang.StringBuilder("Expected ")
                        .append("metric")
                        .append(" to be one of: software.amazon.awscdk.services.cloudwatch.Metric, software.amazon.awscdk.services.cloudwatch.MathExpression; received ")
                        .append(metric.getClass()).toString());
            }
        }
        return software.amazon.jsii.Kernel.call(this, "addMaxConnectionCountAlarm", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation.class), new Object[] { java.util.Objects.requireNonNull(metric, "metric is required"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     * @param metric This parameter is required.
     * @param props This parameter is required.
     * @param disambiguator
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation addMinConnectionCountAlarm(final @org.jetbrains.annotations.NotNull java.lang.Object metric, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.LowConnectionCountThreshold props, final @org.jetbrains.annotations.Nullable java.lang.String disambiguator) {
        if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
            if (
                 !(metric instanceof software.amazon.awscdk.services.cloudwatch.Metric)
                && !(metric instanceof software.amazon.awscdk.services.cloudwatch.MathExpression)
            ) {
                throw new IllegalArgumentException(
                    new java.lang.StringBuilder("Expected ")
                        .append("metric")
                        .append(" to be one of: software.amazon.awscdk.services.cloudwatch.Metric, software.amazon.awscdk.services.cloudwatch.MathExpression; received ")
                        .append(metric.getClass()).toString());
            }
        }
        return software.amazon.jsii.Kernel.call(this, "addMinConnectionCountAlarm", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation.class), new Object[] { java.util.Objects.requireNonNull(metric, "metric is required"), java.util.Objects.requireNonNull(props, "props is required"), disambiguator });
    }

    /**
     * @param metric This parameter is required.
     * @param props This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation addMinConnectionCountAlarm(final @org.jetbrains.annotations.NotNull java.lang.Object metric, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.LowConnectionCountThreshold props) {
        if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
            if (
                 !(metric instanceof software.amazon.awscdk.services.cloudwatch.Metric)
                && !(metric instanceof software.amazon.awscdk.services.cloudwatch.MathExpression)
            ) {
                throw new IllegalArgumentException(
                    new java.lang.StringBuilder("Expected ")
                        .append("metric")
                        .append(" to be one of: software.amazon.awscdk.services.cloudwatch.Metric, software.amazon.awscdk.services.cloudwatch.MathExpression; received ")
                        .append(metric.getClass()).toString());
            }
        }
        return software.amazon.jsii.Kernel.call(this, "addMinConnectionCountAlarm", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.AlarmWithAnnotation.class), new Object[] { java.util.Objects.requireNonNull(metric, "metric is required"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AlarmFactory getAlarmFactory() {
        return software.amazon.jsii.Kernel.get(this, "alarmFactory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.AlarmFactory.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy