org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* A CloudFormation MongoDB::Atlas::Trigger
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.992Z")
@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.CfnTrigger")
public class CfnTrigger extends software.amazon.awscdk.CfnResource {
protected CfnTrigger(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnTrigger(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new MongoDB::Atlas::Trigger
.
*
* @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 CfnTrigger(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.CfnTriggerProps 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::Trigger.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));
}
/**
* Resource props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnTriggerProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CfnTriggerProps.class));
}
/**
* A fluent builder for {@link org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger}.
*/
@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.CfnTriggerProps.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.CfnTriggerProps.Builder();
}
/**
* App Services Application ID.
*
* @return {@code this}
* @param appId App Services Application ID. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder appId(final java.lang.String appId) {
this.props.appId(appId);
return this;
}
/**
* The trigger's name.
*
* @return {@code this}
* @param name The trigger's name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder name(final java.lang.String name) {
this.props.name(name);
return this;
}
/**
* Project Id for application services.
*
* @return {@code this}
* @param projectId Project Id for application services. 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;
}
/**
* The trigger's type.
*
* @return {@code this}
* @param type The trigger's type. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder type(final java.lang.String type) {
this.props.type(type);
return this;
}
/**
* @return {@code this}
* @param authTrigger This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder authTrigger(final org.mongodb.awscdk.resources.mongodbatlas.AuthConfig authTrigger) {
this.props.authTrigger(authTrigger);
return this;
}
/**
* @return {@code this}
* @param databaseTrigger This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder databaseTrigger(final org.mongodb.awscdk.resources.mongodbatlas.DatabaseConfig databaseTrigger) {
this.props.databaseTrigger(databaseTrigger);
return this;
}
/**
* If true
, the trigger is disabled and does not listen for events or execute.
*
* @return {@code this}
* @param disabled If true
, the trigger is disabled and does not listen for events or execute. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder disabled(final java.lang.Boolean disabled) {
this.props.disabled(disabled);
return this;
}
/**
* An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor.
*
* For an example configuration object, see
* Send Trigger Events to AWS
* EventBridge.
*
* @return {@code this}
* @param eventProcessors An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder eventProcessors(final org.mongodb.awscdk.resources.mongodbatlas.Event eventProcessors) {
this.props.eventProcessors(eventProcessors);
return this;
}
/**
* The ID of the function that the trigger calls when it fires.
*
* This value is the same as event_processors.FUNCTION.function_id
.
* You can either define the value here or in event_processors.FUNCTION.function_id
.
* The App Services backend duplicates the value to the configuration location where you did not define it.
*
* For example, if you define function_id
, the backend duplicates it to event_processors.FUNCTION.function_id
.
*
* @return {@code this}
* @param functionId The ID of the function that the trigger calls when it fires. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder functionId(final java.lang.String functionId) {
this.props.functionId(functionId);
return this;
}
/**
* The name of the function that the trigger calls when it fires, i.e. the function described by function_id
.
*
* This value is the same as event_processors.FUNCTION.function_name
.
* You can either define the value here or in event_processors.FUNCTION.function_name
.
* The App Services backend duplicates the value to the configuration location where you did not define it.
*
* For example, if you define function_name
, the backend duplicates it to event_processors.FUNCTION.function_name
.
*
* @return {@code this}
* @param functionName The name of the function that the trigger calls when it fires, i.e. the function described by function_id
. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder functionName(final java.lang.String functionName) {
this.props.functionName(functionName);
return this;
}
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup.
*
* @return {@code this}
* @param profile The profile is defined in AWS Secret manager. 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;
}
/**
* @return {@code this}
* @param scheduleTrigger This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder scheduleTrigger(final org.mongodb.awscdk.resources.mongodbatlas.ScheduleConfig scheduleTrigger) {
this.props.scheduleTrigger(scheduleTrigger);
return this;
}
/**
* @return a newly built instance of {@link org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger build() {
return new org.mongodb.awscdk.resources.mongodbatlas.CfnTrigger(
this.scope,
this.id,
this.props.build()
);
}
}
}