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

software.amazon.awscdk.services.events.targets.EventBus Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.events.targets;

/**
 * Notify an existing Event Bus of an event.
 * 

* Example: *

*

 * Rule rule = Rule.Builder.create(this, "Rule")
 *         .schedule(Schedule.expression("rate(1 minute)"))
 *         .build();
 * rule.addTarget(new EventBus(EventBus.fromEventBusArn(this, "External", "arn:aws:events:eu-west-1:999999999999:event-bus/test-bus")));
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.63.2 (build a8a8833)", date = "2022-08-17T17:31:21.296Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.events.targets.$Module.class, fqn = "@aws-cdk/aws-events-targets.EventBus") public class EventBus extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.events.IRuleTarget { protected EventBus(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected EventBus(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param eventBus This parameter is required. * @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public EventBus(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.IEventBus eventBus, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.targets.EventBusProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(eventBus, "eventBus is required"), props }); } /** * @param eventBus This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public EventBus(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.IEventBus eventBus) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(eventBus, "eventBus is required") }); } /** * Returns the rule target specification. *

* NOTE: Do not use the various inputXxx options. They can be set in a call to addTarget. *

* @param rule This parameter is required. * @param _id */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.RuleTargetConfig bind(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.IRule rule, final @org.jetbrains.annotations.Nullable java.lang.String _id) { return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.RuleTargetConfig.class), new Object[] { java.util.Objects.requireNonNull(rule, "rule is required"), _id }); } /** * Returns the rule target specification. *

* NOTE: Do not use the various inputXxx options. They can be set in a call to addTarget. *

* @param rule This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.RuleTargetConfig bind(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.IRule rule) { return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.RuleTargetConfig.class), new Object[] { java.util.Objects.requireNonNull(rule, "rule is required") }); } /** * A fluent builder for {@link software.amazon.awscdk.services.events.targets.EventBus}. */ @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 eventBus This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.amazon.awscdk.services.events.IEventBus eventBus) { return new Builder(eventBus); } private final software.amazon.awscdk.services.events.IEventBus eventBus; private software.amazon.awscdk.services.events.targets.EventBusProps.Builder props; private Builder(final software.amazon.awscdk.services.events.IEventBus eventBus) { this.eventBus = eventBus; } /** * The SQS queue to be used as deadLetterQueue. Check out the [considerations for using a dead-letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html#dlq-considerations). *

* The events not successfully delivered are automatically retried for a specified period of time, * depending on the retry policy of the target. * If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. *

* Default: - no dead-letter queue *

* @return {@code this} * @param deadLetterQueue The SQS queue to be used as deadLetterQueue. Check out the [considerations for using a dead-letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html#dlq-considerations). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder deadLetterQueue(final software.amazon.awscdk.services.sqs.IQueue deadLetterQueue) { this.props().deadLetterQueue(deadLetterQueue); return this; } /** * Role to be used to publish the event. *

* Default: a new role is created. *

* @return {@code this} * @param role Role to be used to publish the event. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder role(final software.amazon.awscdk.services.iam.IRole role) { this.props().role(role); return this; } /** * @returns a newly built instance of {@link software.amazon.awscdk.services.events.targets.EventBus}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.awscdk.services.events.targets.EventBus build() { return new software.amazon.awscdk.services.events.targets.EventBus( this.eventBus, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.events.targets.EventBusProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.events.targets.EventBusProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy