org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* A CloudFormation MongoDB::Atlas::AlertConfiguration
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.891Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnAlertConfiguration")
public class CfnAlertConfiguration extends software.amazon.awscdk.CfnResource {
protected CfnAlertConfiguration(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnAlertConfiguration(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new MongoDB::Atlas::AlertConfiguration
.
*
* @param scope
- scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
* @param props - resource properties.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnAlertConfiguration(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfigurationProps 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") });
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* Attribute MongoDB::Atlas::AlertConfiguration.Created
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrCreated() {
return software.amazon.jsii.Kernel.get(this, "attrCreated", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Attribute MongoDB::Atlas::AlertConfiguration.Enabled
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.IResolvable getAttrEnabled() {
return software.amazon.jsii.Kernel.get(this, "attrEnabled", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.IResolvable.class));
}
/**
* Attribute MongoDB::Atlas::AlertConfiguration.Id
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrId() {
return software.amazon.jsii.Kernel.get(this, "attrId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Attribute MongoDB::Atlas::AlertConfiguration.Updated
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrUpdated() {
return software.amazon.jsii.Kernel.get(this, "attrUpdated", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Resource props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfigurationProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfigurationProps.class));
}
/**
* A fluent builder for {@link org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration}.
*/
@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 scope - scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
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 org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfigurationProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfigurationProps.Builder();
}
/**
* Event type that triggers an alert.
*
* @return {@code this}
* @param eventTypeName Event type that triggers an alert. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder eventTypeName(final java.lang.String eventTypeName) {
this.props.eventTypeName(eventTypeName);
return this;
}
/**
* List of rules that determine whether MongoDB Cloud checks an object for the alert configuration.
*
* You can filter using the matchers array if the eventTypeName specifies an event for a host, replica set, or sharded cluster.
*
* @return {@code this}
* @param matchers List of rules that determine whether MongoDB Cloud checks an object for the alert configuration. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder matchers(final java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.Matcher> matchers) {
this.props.matchers(matchers);
return this;
}
/**
* Threshold for the metric that, when exceeded, triggers an alert.
*
* The resource returns this parameter when '"eventTypeName" : "OUTSIDE_METRIC_THRESHOLD"'.
*
* @return {@code this}
* @param metricThreshold Threshold for the metric that, when exceeded, triggers an alert. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder metricThreshold(final org.mongodb.awscdk.resources.mongodbatlas.MetricThresholdView metricThreshold) {
this.props.metricThreshold(metricThreshold);
return this;
}
/**
* List that contains the targets that MongoDB Cloud sends notifications.
*
* @return {@code this}
* @param notifications List that contains the targets that MongoDB Cloud sends notifications. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder notifications(final java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.NotificationView> notifications) {
this.props.notifications(notifications);
return this;
}
/**
* Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used.
*
* @return {@code this}
* @param profile Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(final java.lang.String profile) {
this.props.profile(profile);
return this;
}
/**
* Unique 24-hexadecimal digit string that identifies your project.
*
* @return {@code this}
* @param projectId Unique 24-hexadecimal digit string that identifies your project. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(final java.lang.String projectId) {
this.props.projectId(projectId);
return this;
}
/**
* Limit that triggers an alert when exceeded.
*
* The resource returns this parameter when eventTypeName has not been set to 'OUTSIDE_METRIC_THRESHOLD'.
*
* @return {@code this}
* @param threshold Limit that triggers an alert when exceeded. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder threshold(final org.mongodb.awscdk.resources.mongodbatlas.IntegerThresholdView threshold) {
this.props.threshold(threshold);
return this;
}
/**
* Human-readable label that displays the alert type.
*
* @return {@code this}
* @param typeName Human-readable label that displays the alert type. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder typeName(final java.lang.String typeName) {
this.props.typeName(typeName);
return this;
}
/**
* @return a newly built instance of {@link org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration build() {
return new org.mongodb.awscdk.resources.mongodbatlas.CfnAlertConfiguration(
this.scope,
this.id,
this.props.build()
);
}
}
}