io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoring Maven / Gradle / Ivy
package io.github.cdklabs.cdkmonitoringconstructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.93.0 (build 1706ca5)", date = "2024-01-08T00:34:46.800Z")
@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.SqsQueueMonitoring")
public class SqsQueueMonitoring extends io.github.cdklabs.cdkmonitoringconstructs.Monitoring {
protected SqsQueueMonitoring(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected SqsQueueMonitoring(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param props This parameter is required.
* @param invokedFromSuper
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public SqsQueueMonitoring(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoringProps props, final @org.jetbrains.annotations.Nullable java.lang.Boolean invokedFromSuper) {
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(props, "props is required"), invokedFromSuper });
}
/**
* @param scope This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public SqsQueueMonitoring(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoringProps 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(props, "props is required") });
}
/**
* @param width This parameter is required.
* @param height This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.GraphWidget createMessageAgeWidget(final @org.jetbrains.annotations.NotNull java.lang.Number width, final @org.jetbrains.annotations.NotNull java.lang.Number height) {
return software.amazon.jsii.Kernel.call(this, "createMessageAgeWidget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.GraphWidget.class), new Object[] { java.util.Objects.requireNonNull(width, "width is required"), java.util.Objects.requireNonNull(height, "height is required") });
}
/**
* @param width This parameter is required.
* @param height This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.GraphWidget createMessageCountWidget(final @org.jetbrains.annotations.NotNull java.lang.Number width, final @org.jetbrains.annotations.NotNull java.lang.Number height) {
return software.amazon.jsii.Kernel.call(this, "createMessageCountWidget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.GraphWidget.class), new Object[] { java.util.Objects.requireNonNull(width, "width is required"), java.util.Objects.requireNonNull(height, "height is required") });
}
/**
* @param width This parameter is required.
* @param height This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.GraphWidget createMessageSizeWidget(final @org.jetbrains.annotations.NotNull java.lang.Number width, final @org.jetbrains.annotations.NotNull java.lang.Number height) {
return software.amazon.jsii.Kernel.call(this, "createMessageSizeWidget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.GraphWidget.class), new Object[] { java.util.Objects.requireNonNull(width, "width is required"), java.util.Objects.requireNonNull(height, "height is required") });
}
/**
* @param width This parameter is required.
* @param height This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.GraphWidget createProducerAndConsumerRateWidget(final @org.jetbrains.annotations.NotNull java.lang.Number width, final @org.jetbrains.annotations.NotNull java.lang.Number height) {
return software.amazon.jsii.Kernel.call(this, "createProducerAndConsumerRateWidget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.GraphWidget.class), new Object[] { java.util.Objects.requireNonNull(width, "width is required"), java.util.Objects.requireNonNull(height, "height is required") });
}
/**
* @param width This parameter is required.
* @param height This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.GraphWidget createTimeToDrainWidget(final @org.jetbrains.annotations.NotNull java.lang.Number width, final @org.jetbrains.annotations.NotNull java.lang.Number height) {
return software.amazon.jsii.Kernel.call(this, "createTimeToDrainWidget", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.GraphWidget.class), new Object[] { java.util.Objects.requireNonNull(width, "width is required"), java.util.Objects.requireNonNull(height, "height is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.MonitoringHeaderWidget createTitleWidget() {
return software.amazon.jsii.Kernel.call(this, "createTitleWidget", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.MonitoringHeaderWidget.class));
}
/**
* @param queue This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.Nullable java.lang.String resolveQueueName(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sqs.IQueue queue) {
return software.amazon.jsii.Kernel.call(this, "resolveQueueName", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(queue, "queue is required") });
}
/**
* (experimental) Returns widgets to be placed on the summary dashboard.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.util.List summaryWidgets() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "summaryWidgets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IWidget.class))));
}
/**
* (experimental) Returns widgets to be placed on the main dashboard.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull java.util.List widgets() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "widgets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IWidget.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getAgeAnnotations() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "ageAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getConsumptionRateMetric() {
return software.amazon.jsii.Kernel.get(this, "consumptionRateMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getCountAnnotations() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "countAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getDeletedMessagesMetric() {
return software.amazon.jsii.Kernel.get(this, "deletedMessagesMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getIncomingMessagesMetric() {
return software.amazon.jsii.Kernel.get(this, "incomingMessagesMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getMessageSizeMetric() {
return software.amazon.jsii.Kernel.get(this, "messageSizeMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getOldestMessageAgeMetric() {
return software.amazon.jsii.Kernel.get(this, "oldestMessageAgeMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getProductionRateMetric() {
return software.amazon.jsii.Kernel.get(this, "productionRateMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.QueueAlarmFactory getQueueAlarmFactory() {
return software.amazon.jsii.Kernel.get(this, "queueAlarmFactory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.QueueAlarmFactory.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getTimeToDrainAnnotations() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "timeToDrainAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getTimeToDrainMetric() {
return software.amazon.jsii.Kernel.get(this, "timeToDrainMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getTitle() {
return software.amazon.jsii.Kernel.get(this, "title", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.Object getVisibleMessagesMetric() {
return software.amazon.jsii.Kernel.get(this, "visibleMessagesMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getQueueUrl() {
return software.amazon.jsii.Kernel.get(this, "queueUrl", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoring}.
*/
@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 invokedFromSuper
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope, final java.lang.Boolean invokedFromSuper) {
return new Builder(scope, invokedFromSuper);
}
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope) {
return new Builder(scope, null);
}
private final io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope;
private final java.lang.Boolean invokedFromSuper;
private final io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoringProps.Builder props;
private Builder(final io.github.cdklabs.cdkmonitoringconstructs.MonitoringScope scope, final java.lang.Boolean invokedFromSuper) {
this.scope = scope;
this.invokedFromSuper = invokedFromSuper;
this.props = new io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoringProps.Builder();
}
/**
* @return {@code this}
* @param queue This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder queue(final software.amazon.awscdk.services.sqs.IQueue queue) {
this.props.queue(queue);
return this;
}
/**
* @return {@code this}
* @param addQueueMaxIncomingMessagesAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMaxIncomingMessagesAlarm(final java.util.Map addQueueMaxIncomingMessagesAlarm) {
this.props.addQueueMaxIncomingMessagesAlarm(addQueueMaxIncomingMessagesAlarm);
return this;
}
/**
* @return {@code this}
* @param addQueueMaxMessageAgeAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMaxMessageAgeAlarm(final java.util.Map addQueueMaxMessageAgeAlarm) {
this.props.addQueueMaxMessageAgeAlarm(addQueueMaxMessageAgeAlarm);
return this;
}
/**
* @return {@code this}
* @param addQueueMaxSizeAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMaxSizeAlarm(final java.util.Map addQueueMaxSizeAlarm) {
this.props.addQueueMaxSizeAlarm(addQueueMaxSizeAlarm);
return this;
}
/**
* @return {@code this}
* @param addQueueMaxTimeToDrainMessagesAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMaxTimeToDrainMessagesAlarm(final java.util.Map addQueueMaxTimeToDrainMessagesAlarm) {
this.props.addQueueMaxTimeToDrainMessagesAlarm(addQueueMaxTimeToDrainMessagesAlarm);
return this;
}
/**
* @return {@code this}
* @param addQueueMinIncomingMessagesAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMinIncomingMessagesAlarm(final java.util.Map addQueueMinIncomingMessagesAlarm) {
this.props.addQueueMinIncomingMessagesAlarm(addQueueMinIncomingMessagesAlarm);
return this;
}
/**
* @return {@code this}
* @param addQueueMinSizeAlarm This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addQueueMinSizeAlarm(final java.util.Map addQueueMinSizeAlarm) {
this.props.addQueueMinSizeAlarm(addQueueMinSizeAlarm);
return this;
}
/**
* (experimental) 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.
*
* Default: - derives name from the construct itself
*
* @return {@code this}
* @param alarmFriendlyName Plain name, used in naming alarms. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder alarmFriendlyName(final java.lang.String alarmFriendlyName) {
this.props.alarmFriendlyName(alarmFriendlyName);
return this;
}
/**
* (experimental) Human-readable name is a freeform string, used as a caption or description.
*
* There are no limitations on what it can be.
*
* Default: - use alarmFriendlyName
*
* @return {@code this}
* @param humanReadableName Human-readable name is a freeform string, used as a caption or description. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder humanReadableName(final java.lang.String humanReadableName) {
this.props.humanReadableName(humanReadableName);
return this;
}
/**
* (experimental) 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}
* @see AlarmNamingStrategy for more details on alarm name prefixes
* @param localAlarmNamePrefixOverride If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder localAlarmNamePrefixOverride(final java.lang.String localAlarmNamePrefixOverride) {
this.props.localAlarmNamePrefixOverride(localAlarmNamePrefixOverride);
return this;
}
/**
* (experimental) Flag indicating if the widgets should be added to alarm dashboard.
*
* Default: - true
*
* @return {@code this}
* @param addToAlarmDashboard Flag indicating if the widgets should be added to alarm dashboard. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addToAlarmDashboard(final java.lang.Boolean addToAlarmDashboard) {
this.props.addToAlarmDashboard(addToAlarmDashboard);
return this;
}
/**
* (experimental) Flag indicating if the widgets should be added to detailed dashboard.
*
* Default: - true
*
* @return {@code this}
* @param addToDetailDashboard Flag indicating if the widgets should be added to detailed dashboard. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addToDetailDashboard(final java.lang.Boolean addToDetailDashboard) {
this.props.addToDetailDashboard(addToDetailDashboard);
return this;
}
/**
* (experimental) Flag indicating if the widgets should be added to summary dashboard.
*
* Default: - true
*
* @return {@code this}
* @param addToSummaryDashboard Flag indicating if the widgets should be added to summary dashboard. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder addToSummaryDashboard(final java.lang.Boolean addToSummaryDashboard) {
this.props.addToSummaryDashboard(addToSummaryDashboard);
return this;
}
/**
* (experimental) Calls provided function to process all alarms created.
*
* @return {@code this}
* @param useCreatedAlarms Calls provided function to process all alarms created. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder useCreatedAlarms(final io.github.cdklabs.cdkmonitoringconstructs.IAlarmConsumer useCreatedAlarms) {
this.props.useCreatedAlarms(useCreatedAlarms);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoring}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoring build() {
return new io.github.cdklabs.cdkmonitoringconstructs.SqsQueueMonitoring(
this.scope,
this.props.build(),
this.invokedFromSuper
);
}
}
}