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

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

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

/**
 * (experimental) Monitoring props for Fargate service with application load balancer and plain service.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T17:32:51.945Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.FargateApplicationLoadBalancerMonitoringProps")
@software.amazon.jsii.Jsii.Proxy(FargateApplicationLoadBalancerMonitoringProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface FargateApplicationLoadBalancerMonitoringProps extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.cdkmonitoringconstructs.ApplicationLoadBalancerMetricFactoryProps, io.github.cdklabs.cdkmonitoringconstructs.BaseMonitoringProps, io.github.cdklabs.cdkmonitoringconstructs.BaseFargateServiceAlarms {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.FargateService getFargateService();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.Map getAddHealthyTaskCountAlarm() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.Map getAddHealthyTaskPercentAlarm() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.Map getAddMinProcessedBytesAlarm() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.Map getAddUnhealthyTaskCountAlarm() {
        return null;
    }

    /**
     * (experimental) Invert the statistics of HealthyHostCount and UnHealthyHostCount.
     * 

* When invertLoadBalancerTaskCountMetricsStatistics is set to false, the minimum of HealthyHostCount and the maximum of UnHealthyHostCount are monitored. * When invertLoadBalancerTaskCountMetricsStatistics is set to true, the maximum of HealthyHostCount and the minimum of UnHealthyHostCount are monitored. *

* invertLoadBalancerTaskCountMetricsStatistics is recommended to set to true as per the guidelines at * https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-cloudwatch-metrics.html#metric-statistics *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getInvertLoadBalancerTaskCountMetricsStatistics() { return null; } /** * (experimental) Account where the metrics exist. *

* Default: The account configured by the construct holding the Monitoring construct *

* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @org.jetbrains.annotations.Nullable java.lang.String getAccount() { return null; } /** * (experimental) Region where the metrics exist. *

* Default: The region configured by the construct holding the Monitoring construct *

* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @org.jetbrains.annotations.Nullable java.lang.String getRegion() { return null; } /** * @return a {@link Builder} of {@link FargateApplicationLoadBalancerMonitoringProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link FargateApplicationLoadBalancerMonitoringProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.ecs.FargateService fargateService; java.util.Map addHealthyTaskCountAlarm; java.util.Map addHealthyTaskPercentAlarm; java.util.Map addMinProcessedBytesAlarm; java.util.Map addUnhealthyTaskCountAlarm; java.lang.Boolean invertLoadBalancerTaskCountMetricsStatistics; software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer applicationLoadBalancer; software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationTargetGroup applicationTargetGroup; java.lang.Boolean invertStatisticsOfTaskCountEnabled; java.lang.String account; java.lang.String region; io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer useCreatedAlarms; java.lang.String alarmFriendlyName; java.lang.String humanReadableName; java.lang.String localAlarmNamePrefixOverride; java.lang.Boolean addToAlarmDashboard; java.lang.Boolean addToDetailDashboard; java.lang.Boolean addToSummaryDashboard; java.util.Map addCpuUsageAlarm; java.util.Map addEphermalStorageUsageAlarm; java.util.Map addMemoryUsageAlarm; java.util.Map addRunningTaskCountAlarm; java.lang.Number maxAutoScalingTaskCount; java.lang.Number minAutoScalingTaskCount; /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getFargateService} * @param fargateService the value to be set. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder fargateService(software.amazon.awscdk.services.ecs.FargateService fargateService) { this.fargateService = fargateService; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddHealthyTaskCountAlarm} * @param addHealthyTaskCountAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addHealthyTaskCountAlarm(java.util.Map addHealthyTaskCountAlarm) { this.addHealthyTaskCountAlarm = (java.util.Map)addHealthyTaskCountAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddHealthyTaskPercentAlarm} * @param addHealthyTaskPercentAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addHealthyTaskPercentAlarm(java.util.Map addHealthyTaskPercentAlarm) { this.addHealthyTaskPercentAlarm = (java.util.Map)addHealthyTaskPercentAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddMinProcessedBytesAlarm} * @param addMinProcessedBytesAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addMinProcessedBytesAlarm(java.util.Map addMinProcessedBytesAlarm) { this.addMinProcessedBytesAlarm = (java.util.Map)addMinProcessedBytesAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddUnhealthyTaskCountAlarm} * @param addUnhealthyTaskCountAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addUnhealthyTaskCountAlarm(java.util.Map addUnhealthyTaskCountAlarm) { this.addUnhealthyTaskCountAlarm = (java.util.Map)addUnhealthyTaskCountAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getInvertLoadBalancerTaskCountMetricsStatistics} * @param invertLoadBalancerTaskCountMetricsStatistics Invert the statistics of HealthyHostCount and UnHealthyHostCount. * When invertLoadBalancerTaskCountMetricsStatistics is set to false, the minimum of HealthyHostCount and the maximum of UnHealthyHostCount are monitored. * When invertLoadBalancerTaskCountMetricsStatistics is set to true, the maximum of HealthyHostCount and the minimum of UnHealthyHostCount are monitored. *

* invertLoadBalancerTaskCountMetricsStatistics is recommended to set to true as per the guidelines at * https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-cloudwatch-metrics.html#metric-statistics * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder invertLoadBalancerTaskCountMetricsStatistics(java.lang.Boolean invertLoadBalancerTaskCountMetricsStatistics) { this.invertLoadBalancerTaskCountMetricsStatistics = invertLoadBalancerTaskCountMetricsStatistics; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getApplicationLoadBalancer} * @param applicationLoadBalancer the value to be set. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder applicationLoadBalancer(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer applicationLoadBalancer) { this.applicationLoadBalancer = applicationLoadBalancer; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getApplicationTargetGroup} * @param applicationTargetGroup the value to be set. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder applicationTargetGroup(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationTargetGroup applicationTargetGroup) { this.applicationTargetGroup = applicationTargetGroup; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getInvertStatisticsOfTaskCountEnabled} * @param invertStatisticsOfTaskCountEnabled Invert the statistics of HealthyHostCount and UnHealthyHostCount. * When invertStatisticsOfTaskCountEnabled is set to false, the minimum of HealthyHostCount and the maximum of UnHealthyHostCount are monitored. * When invertStatisticsOfTaskCountEnabled is set to true, the maximum of HealthyHostCount and the minimum of UnHealthyHostCount are monitored. *

* invertStatisticsOfTaskCountEnabled is recommended to set to true as per the guidelines at * https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-cloudwatch-metrics.html#metric-statistics * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder invertStatisticsOfTaskCountEnabled(java.lang.Boolean invertStatisticsOfTaskCountEnabled) { this.invertStatisticsOfTaskCountEnabled = invertStatisticsOfTaskCountEnabled; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAccount} * @param account Account where the metrics exist. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder account(java.lang.String account) { this.account = account; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getRegion} * @param region Region where the metrics exist. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder region(java.lang.String region) { this.region = region; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getUseCreatedAlarms} * @param useCreatedAlarms Calls provided function to process all alarms created. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder useCreatedAlarms(io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer useCreatedAlarms) { this.useCreatedAlarms = useCreatedAlarms; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAlarmFriendlyName} * @param alarmFriendlyName Plain name, used in naming alarms. * This unique among other resources, and respect the AWS CDK restriction posed on alarm names. * The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder alarmFriendlyName(java.lang.String alarmFriendlyName) { this.alarmFriendlyName = alarmFriendlyName; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getHumanReadableName} * @param humanReadableName Human-readable name is a freeform string, used as a caption or description. * There are no limitations on what it can be. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder humanReadableName(java.lang.String humanReadableName) { this.humanReadableName = humanReadableName; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getLocalAlarmNamePrefixOverride} * @param localAlarmNamePrefixOverride If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. * The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder localAlarmNamePrefixOverride(java.lang.String localAlarmNamePrefixOverride) { this.localAlarmNamePrefixOverride = localAlarmNamePrefixOverride; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddToAlarmDashboard} * @param addToAlarmDashboard Flag indicating if the widgets should be added to alarm dashboard. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder addToAlarmDashboard(java.lang.Boolean addToAlarmDashboard) { this.addToAlarmDashboard = addToAlarmDashboard; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddToDetailDashboard} * @param addToDetailDashboard Flag indicating if the widgets should be added to detailed dashboard. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder addToDetailDashboard(java.lang.Boolean addToDetailDashboard) { this.addToDetailDashboard = addToDetailDashboard; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddToSummaryDashboard} * @param addToSummaryDashboard Flag indicating if the widgets should be added to summary dashboard. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder addToSummaryDashboard(java.lang.Boolean addToSummaryDashboard) { this.addToSummaryDashboard = addToSummaryDashboard; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddCpuUsageAlarm} * @param addCpuUsageAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addCpuUsageAlarm(java.util.Map addCpuUsageAlarm) { this.addCpuUsageAlarm = (java.util.Map)addCpuUsageAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddEphermalStorageUsageAlarm} * @param addEphermalStorageUsageAlarm Container Insights needs to be enabled for the cluster for this alarm. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addEphermalStorageUsageAlarm(java.util.Map addEphermalStorageUsageAlarm) { this.addEphermalStorageUsageAlarm = (java.util.Map)addEphermalStorageUsageAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddMemoryUsageAlarm} * @param addMemoryUsageAlarm the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addMemoryUsageAlarm(java.util.Map addMemoryUsageAlarm) { this.addMemoryUsageAlarm = (java.util.Map)addMemoryUsageAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getAddRunningTaskCountAlarm} * @param addRunningTaskCountAlarm Container Insights needs to be enabled for the cluster for this alarm. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder addRunningTaskCountAlarm(java.util.Map addRunningTaskCountAlarm) { this.addRunningTaskCountAlarm = (java.util.Map)addRunningTaskCountAlarm; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getMaxAutoScalingTaskCount} * @param maxAutoScalingTaskCount Maximum number of tasks, as specified in your auto scaling config. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder maxAutoScalingTaskCount(java.lang.Number maxAutoScalingTaskCount) { this.maxAutoScalingTaskCount = maxAutoScalingTaskCount; return this; } /** * Sets the value of {@link FargateApplicationLoadBalancerMonitoringProps#getMinAutoScalingTaskCount} * @param minAutoScalingTaskCount Minimum number of tasks, as specified in your auto scaling config. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder minAutoScalingTaskCount(java.lang.Number minAutoScalingTaskCount) { this.minAutoScalingTaskCount = minAutoScalingTaskCount; return this; } /** * Builds the configured instance. * @return a new instance of {@link FargateApplicationLoadBalancerMonitoringProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public FargateApplicationLoadBalancerMonitoringProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link FargateApplicationLoadBalancerMonitoringProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements FargateApplicationLoadBalancerMonitoringProps { private final software.amazon.awscdk.services.ecs.FargateService fargateService; private final java.util.Map addHealthyTaskCountAlarm; private final java.util.Map addHealthyTaskPercentAlarm; private final java.util.Map addMinProcessedBytesAlarm; private final java.util.Map addUnhealthyTaskCountAlarm; private final java.lang.Boolean invertLoadBalancerTaskCountMetricsStatistics; private final software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer applicationLoadBalancer; private final software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationTargetGroup applicationTargetGroup; private final java.lang.Boolean invertStatisticsOfTaskCountEnabled; private final java.lang.String account; private final java.lang.String region; private final io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer useCreatedAlarms; private final java.lang.String alarmFriendlyName; private final java.lang.String humanReadableName; private final java.lang.String localAlarmNamePrefixOverride; private final java.lang.Boolean addToAlarmDashboard; private final java.lang.Boolean addToDetailDashboard; private final java.lang.Boolean addToSummaryDashboard; private final java.util.Map addCpuUsageAlarm; private final java.util.Map addEphermalStorageUsageAlarm; private final java.util.Map addMemoryUsageAlarm; private final java.util.Map addRunningTaskCountAlarm; private final java.lang.Number maxAutoScalingTaskCount; private final java.lang.Number minAutoScalingTaskCount; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.fargateService = software.amazon.jsii.Kernel.get(this, "fargateService", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.FargateService.class)); this.addHealthyTaskCountAlarm = software.amazon.jsii.Kernel.get(this, "addHealthyTaskCountAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.HealthyTaskCountThreshold.class))); this.addHealthyTaskPercentAlarm = software.amazon.jsii.Kernel.get(this, "addHealthyTaskPercentAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.HealthyTaskPercentThreshold.class))); this.addMinProcessedBytesAlarm = software.amazon.jsii.Kernel.get(this, "addMinProcessedBytesAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.MinProcessedBytesThreshold.class))); this.addUnhealthyTaskCountAlarm = software.amazon.jsii.Kernel.get(this, "addUnhealthyTaskCountAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.UnhealthyTaskCountThreshold.class))); this.invertLoadBalancerTaskCountMetricsStatistics = software.amazon.jsii.Kernel.get(this, "invertLoadBalancerTaskCountMetricsStatistics", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.applicationLoadBalancer = software.amazon.jsii.Kernel.get(this, "applicationLoadBalancer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer.class)); this.applicationTargetGroup = software.amazon.jsii.Kernel.get(this, "applicationTargetGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationTargetGroup.class)); this.invertStatisticsOfTaskCountEnabled = software.amazon.jsii.Kernel.get(this, "invertStatisticsOfTaskCountEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.account = software.amazon.jsii.Kernel.get(this, "account", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.region = software.amazon.jsii.Kernel.get(this, "region", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.useCreatedAlarms = software.amazon.jsii.Kernel.get(this, "useCreatedAlarms", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer.class)); this.alarmFriendlyName = software.amazon.jsii.Kernel.get(this, "alarmFriendlyName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.humanReadableName = software.amazon.jsii.Kernel.get(this, "humanReadableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.localAlarmNamePrefixOverride = software.amazon.jsii.Kernel.get(this, "localAlarmNamePrefixOverride", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.addToAlarmDashboard = software.amazon.jsii.Kernel.get(this, "addToAlarmDashboard", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.addToDetailDashboard = software.amazon.jsii.Kernel.get(this, "addToDetailDashboard", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.addToSummaryDashboard = software.amazon.jsii.Kernel.get(this, "addToSummaryDashboard", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.addCpuUsageAlarm = software.amazon.jsii.Kernel.get(this, "addCpuUsageAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.UsageThreshold.class))); this.addEphermalStorageUsageAlarm = software.amazon.jsii.Kernel.get(this, "addEphermalStorageUsageAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.UsageThreshold.class))); this.addMemoryUsageAlarm = software.amazon.jsii.Kernel.get(this, "addMemoryUsageAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.UsageThreshold.class))); this.addRunningTaskCountAlarm = software.amazon.jsii.Kernel.get(this, "addRunningTaskCountAlarm", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.RunningTaskCountThreshold.class))); this.maxAutoScalingTaskCount = software.amazon.jsii.Kernel.get(this, "maxAutoScalingTaskCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.minAutoScalingTaskCount = software.amazon.jsii.Kernel.get(this, "minAutoScalingTaskCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.fargateService = java.util.Objects.requireNonNull(builder.fargateService, "fargateService is required"); this.addHealthyTaskCountAlarm = (java.util.Map)builder.addHealthyTaskCountAlarm; this.addHealthyTaskPercentAlarm = (java.util.Map)builder.addHealthyTaskPercentAlarm; this.addMinProcessedBytesAlarm = (java.util.Map)builder.addMinProcessedBytesAlarm; this.addUnhealthyTaskCountAlarm = (java.util.Map)builder.addUnhealthyTaskCountAlarm; this.invertLoadBalancerTaskCountMetricsStatistics = builder.invertLoadBalancerTaskCountMetricsStatistics; this.applicationLoadBalancer = java.util.Objects.requireNonNull(builder.applicationLoadBalancer, "applicationLoadBalancer is required"); this.applicationTargetGroup = java.util.Objects.requireNonNull(builder.applicationTargetGroup, "applicationTargetGroup is required"); this.invertStatisticsOfTaskCountEnabled = builder.invertStatisticsOfTaskCountEnabled; this.account = builder.account; this.region = builder.region; this.useCreatedAlarms = builder.useCreatedAlarms; this.alarmFriendlyName = builder.alarmFriendlyName; this.humanReadableName = builder.humanReadableName; this.localAlarmNamePrefixOverride = builder.localAlarmNamePrefixOverride; this.addToAlarmDashboard = builder.addToAlarmDashboard; this.addToDetailDashboard = builder.addToDetailDashboard; this.addToSummaryDashboard = builder.addToSummaryDashboard; this.addCpuUsageAlarm = (java.util.Map)builder.addCpuUsageAlarm; this.addEphermalStorageUsageAlarm = (java.util.Map)builder.addEphermalStorageUsageAlarm; this.addMemoryUsageAlarm = (java.util.Map)builder.addMemoryUsageAlarm; this.addRunningTaskCountAlarm = (java.util.Map)builder.addRunningTaskCountAlarm; this.maxAutoScalingTaskCount = builder.maxAutoScalingTaskCount; this.minAutoScalingTaskCount = builder.minAutoScalingTaskCount; } @Override public final software.amazon.awscdk.services.ecs.FargateService getFargateService() { return this.fargateService; } @Override public final java.util.Map getAddHealthyTaskCountAlarm() { return this.addHealthyTaskCountAlarm; } @Override public final java.util.Map getAddHealthyTaskPercentAlarm() { return this.addHealthyTaskPercentAlarm; } @Override public final java.util.Map getAddMinProcessedBytesAlarm() { return this.addMinProcessedBytesAlarm; } @Override public final java.util.Map getAddUnhealthyTaskCountAlarm() { return this.addUnhealthyTaskCountAlarm; } @Override public final java.lang.Boolean getInvertLoadBalancerTaskCountMetricsStatistics() { return this.invertLoadBalancerTaskCountMetricsStatistics; } @Override public final software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer getApplicationLoadBalancer() { return this.applicationLoadBalancer; } @Override public final software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationTargetGroup getApplicationTargetGroup() { return this.applicationTargetGroup; } @Override public final java.lang.Boolean getInvertStatisticsOfTaskCountEnabled() { return this.invertStatisticsOfTaskCountEnabled; } @Override public final java.lang.String getAccount() { return this.account; } @Override public final java.lang.String getRegion() { return this.region; } @Override public final io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer getUseCreatedAlarms() { return this.useCreatedAlarms; } @Override public final java.lang.String getAlarmFriendlyName() { return this.alarmFriendlyName; } @Override public final java.lang.String getHumanReadableName() { return this.humanReadableName; } @Override public final java.lang.String getLocalAlarmNamePrefixOverride() { return this.localAlarmNamePrefixOverride; } @Override public final java.lang.Boolean getAddToAlarmDashboard() { return this.addToAlarmDashboard; } @Override public final java.lang.Boolean getAddToDetailDashboard() { return this.addToDetailDashboard; } @Override public final java.lang.Boolean getAddToSummaryDashboard() { return this.addToSummaryDashboard; } @Override public final java.util.Map getAddCpuUsageAlarm() { return this.addCpuUsageAlarm; } @Override public final java.util.Map getAddEphermalStorageUsageAlarm() { return this.addEphermalStorageUsageAlarm; } @Override public final java.util.Map getAddMemoryUsageAlarm() { return this.addMemoryUsageAlarm; } @Override public final java.util.Map getAddRunningTaskCountAlarm() { return this.addRunningTaskCountAlarm; } @Override public final java.lang.Number getMaxAutoScalingTaskCount() { return this.maxAutoScalingTaskCount; } @Override public final java.lang.Number getMinAutoScalingTaskCount() { return this.minAutoScalingTaskCount; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("fargateService", om.valueToTree(this.getFargateService())); if (this.getAddHealthyTaskCountAlarm() != null) { data.set("addHealthyTaskCountAlarm", om.valueToTree(this.getAddHealthyTaskCountAlarm())); } if (this.getAddHealthyTaskPercentAlarm() != null) { data.set("addHealthyTaskPercentAlarm", om.valueToTree(this.getAddHealthyTaskPercentAlarm())); } if (this.getAddMinProcessedBytesAlarm() != null) { data.set("addMinProcessedBytesAlarm", om.valueToTree(this.getAddMinProcessedBytesAlarm())); } if (this.getAddUnhealthyTaskCountAlarm() != null) { data.set("addUnhealthyTaskCountAlarm", om.valueToTree(this.getAddUnhealthyTaskCountAlarm())); } if (this.getInvertLoadBalancerTaskCountMetricsStatistics() != null) { data.set("invertLoadBalancerTaskCountMetricsStatistics", om.valueToTree(this.getInvertLoadBalancerTaskCountMetricsStatistics())); } data.set("applicationLoadBalancer", om.valueToTree(this.getApplicationLoadBalancer())); data.set("applicationTargetGroup", om.valueToTree(this.getApplicationTargetGroup())); if (this.getInvertStatisticsOfTaskCountEnabled() != null) { data.set("invertStatisticsOfTaskCountEnabled", om.valueToTree(this.getInvertStatisticsOfTaskCountEnabled())); } if (this.getAccount() != null) { data.set("account", om.valueToTree(this.getAccount())); } if (this.getRegion() != null) { data.set("region", om.valueToTree(this.getRegion())); } if (this.getUseCreatedAlarms() != null) { data.set("useCreatedAlarms", om.valueToTree(this.getUseCreatedAlarms())); } if (this.getAlarmFriendlyName() != null) { data.set("alarmFriendlyName", om.valueToTree(this.getAlarmFriendlyName())); } if (this.getHumanReadableName() != null) { data.set("humanReadableName", om.valueToTree(this.getHumanReadableName())); } if (this.getLocalAlarmNamePrefixOverride() != null) { data.set("localAlarmNamePrefixOverride", om.valueToTree(this.getLocalAlarmNamePrefixOverride())); } if (this.getAddToAlarmDashboard() != null) { data.set("addToAlarmDashboard", om.valueToTree(this.getAddToAlarmDashboard())); } if (this.getAddToDetailDashboard() != null) { data.set("addToDetailDashboard", om.valueToTree(this.getAddToDetailDashboard())); } if (this.getAddToSummaryDashboard() != null) { data.set("addToSummaryDashboard", om.valueToTree(this.getAddToSummaryDashboard())); } if (this.getAddCpuUsageAlarm() != null) { data.set("addCpuUsageAlarm", om.valueToTree(this.getAddCpuUsageAlarm())); } if (this.getAddEphermalStorageUsageAlarm() != null) { data.set("addEphermalStorageUsageAlarm", om.valueToTree(this.getAddEphermalStorageUsageAlarm())); } if (this.getAddMemoryUsageAlarm() != null) { data.set("addMemoryUsageAlarm", om.valueToTree(this.getAddMemoryUsageAlarm())); } if (this.getAddRunningTaskCountAlarm() != null) { data.set("addRunningTaskCountAlarm", om.valueToTree(this.getAddRunningTaskCountAlarm())); } if (this.getMaxAutoScalingTaskCount() != null) { data.set("maxAutoScalingTaskCount", om.valueToTree(this.getMaxAutoScalingTaskCount())); } if (this.getMinAutoScalingTaskCount() != null) { data.set("minAutoScalingTaskCount", om.valueToTree(this.getMinAutoScalingTaskCount())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-monitoring-constructs.FargateApplicationLoadBalancerMonitoringProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FargateApplicationLoadBalancerMonitoringProps.Jsii$Proxy that = (FargateApplicationLoadBalancerMonitoringProps.Jsii$Proxy) o; if (!fargateService.equals(that.fargateService)) return false; if (this.addHealthyTaskCountAlarm != null ? !this.addHealthyTaskCountAlarm.equals(that.addHealthyTaskCountAlarm) : that.addHealthyTaskCountAlarm != null) return false; if (this.addHealthyTaskPercentAlarm != null ? !this.addHealthyTaskPercentAlarm.equals(that.addHealthyTaskPercentAlarm) : that.addHealthyTaskPercentAlarm != null) return false; if (this.addMinProcessedBytesAlarm != null ? !this.addMinProcessedBytesAlarm.equals(that.addMinProcessedBytesAlarm) : that.addMinProcessedBytesAlarm != null) return false; if (this.addUnhealthyTaskCountAlarm != null ? !this.addUnhealthyTaskCountAlarm.equals(that.addUnhealthyTaskCountAlarm) : that.addUnhealthyTaskCountAlarm != null) return false; if (this.invertLoadBalancerTaskCountMetricsStatistics != null ? !this.invertLoadBalancerTaskCountMetricsStatistics.equals(that.invertLoadBalancerTaskCountMetricsStatistics) : that.invertLoadBalancerTaskCountMetricsStatistics != null) return false; if (!applicationLoadBalancer.equals(that.applicationLoadBalancer)) return false; if (!applicationTargetGroup.equals(that.applicationTargetGroup)) return false; if (this.invertStatisticsOfTaskCountEnabled != null ? !this.invertStatisticsOfTaskCountEnabled.equals(that.invertStatisticsOfTaskCountEnabled) : that.invertStatisticsOfTaskCountEnabled != null) return false; if (this.account != null ? !this.account.equals(that.account) : that.account != null) return false; if (this.region != null ? !this.region.equals(that.region) : that.region != null) return false; if (this.useCreatedAlarms != null ? !this.useCreatedAlarms.equals(that.useCreatedAlarms) : that.useCreatedAlarms != null) return false; if (this.alarmFriendlyName != null ? !this.alarmFriendlyName.equals(that.alarmFriendlyName) : that.alarmFriendlyName != null) return false; if (this.humanReadableName != null ? !this.humanReadableName.equals(that.humanReadableName) : that.humanReadableName != null) return false; if (this.localAlarmNamePrefixOverride != null ? !this.localAlarmNamePrefixOverride.equals(that.localAlarmNamePrefixOverride) : that.localAlarmNamePrefixOverride != null) return false; if (this.addToAlarmDashboard != null ? !this.addToAlarmDashboard.equals(that.addToAlarmDashboard) : that.addToAlarmDashboard != null) return false; if (this.addToDetailDashboard != null ? !this.addToDetailDashboard.equals(that.addToDetailDashboard) : that.addToDetailDashboard != null) return false; if (this.addToSummaryDashboard != null ? !this.addToSummaryDashboard.equals(that.addToSummaryDashboard) : that.addToSummaryDashboard != null) return false; if (this.addCpuUsageAlarm != null ? !this.addCpuUsageAlarm.equals(that.addCpuUsageAlarm) : that.addCpuUsageAlarm != null) return false; if (this.addEphermalStorageUsageAlarm != null ? !this.addEphermalStorageUsageAlarm.equals(that.addEphermalStorageUsageAlarm) : that.addEphermalStorageUsageAlarm != null) return false; if (this.addMemoryUsageAlarm != null ? !this.addMemoryUsageAlarm.equals(that.addMemoryUsageAlarm) : that.addMemoryUsageAlarm != null) return false; if (this.addRunningTaskCountAlarm != null ? !this.addRunningTaskCountAlarm.equals(that.addRunningTaskCountAlarm) : that.addRunningTaskCountAlarm != null) return false; if (this.maxAutoScalingTaskCount != null ? !this.maxAutoScalingTaskCount.equals(that.maxAutoScalingTaskCount) : that.maxAutoScalingTaskCount != null) return false; return this.minAutoScalingTaskCount != null ? this.minAutoScalingTaskCount.equals(that.minAutoScalingTaskCount) : that.minAutoScalingTaskCount == null; } @Override public final int hashCode() { int result = this.fargateService.hashCode(); result = 31 * result + (this.addHealthyTaskCountAlarm != null ? this.addHealthyTaskCountAlarm.hashCode() : 0); result = 31 * result + (this.addHealthyTaskPercentAlarm != null ? this.addHealthyTaskPercentAlarm.hashCode() : 0); result = 31 * result + (this.addMinProcessedBytesAlarm != null ? this.addMinProcessedBytesAlarm.hashCode() : 0); result = 31 * result + (this.addUnhealthyTaskCountAlarm != null ? this.addUnhealthyTaskCountAlarm.hashCode() : 0); result = 31 * result + (this.invertLoadBalancerTaskCountMetricsStatistics != null ? this.invertLoadBalancerTaskCountMetricsStatistics.hashCode() : 0); result = 31 * result + (this.applicationLoadBalancer.hashCode()); result = 31 * result + (this.applicationTargetGroup.hashCode()); result = 31 * result + (this.invertStatisticsOfTaskCountEnabled != null ? this.invertStatisticsOfTaskCountEnabled.hashCode() : 0); result = 31 * result + (this.account != null ? this.account.hashCode() : 0); result = 31 * result + (this.region != null ? this.region.hashCode() : 0); result = 31 * result + (this.useCreatedAlarms != null ? this.useCreatedAlarms.hashCode() : 0); result = 31 * result + (this.alarmFriendlyName != null ? this.alarmFriendlyName.hashCode() : 0); result = 31 * result + (this.humanReadableName != null ? this.humanReadableName.hashCode() : 0); result = 31 * result + (this.localAlarmNamePrefixOverride != null ? this.localAlarmNamePrefixOverride.hashCode() : 0); result = 31 * result + (this.addToAlarmDashboard != null ? this.addToAlarmDashboard.hashCode() : 0); result = 31 * result + (this.addToDetailDashboard != null ? this.addToDetailDashboard.hashCode() : 0); result = 31 * result + (this.addToSummaryDashboard != null ? this.addToSummaryDashboard.hashCode() : 0); result = 31 * result + (this.addCpuUsageAlarm != null ? this.addCpuUsageAlarm.hashCode() : 0); result = 31 * result + (this.addEphermalStorageUsageAlarm != null ? this.addEphermalStorageUsageAlarm.hashCode() : 0); result = 31 * result + (this.addMemoryUsageAlarm != null ? this.addMemoryUsageAlarm.hashCode() : 0); result = 31 * result + (this.addRunningTaskCountAlarm != null ? this.addRunningTaskCountAlarm.hashCode() : 0); result = 31 * result + (this.maxAutoScalingTaskCount != null ? this.maxAutoScalingTaskCount.hashCode() : 0); result = 31 * result + (this.minAutoScalingTaskCount != null ? this.minAutoScalingTaskCount.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy