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

software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSns Maven / Gradle / Ivy

package software.amazon.awsconstructs.services.eventsrulesns;

@javax.annotation.Generated(value = "jsii-pacmak/1.63.2 (build a8a8833)", date = "2022-08-04T20:57:47.048Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.eventsrulesns.$Module.class, fqn = "@aws-solutions-constructs/aws-events-rule-sns.EventsRuleToSns")
public class EventsRuleToSns extends software.amazon.awscdk.core.Construct {

    protected EventsRuleToSns(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected EventsRuleToSns(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope - represents the scope for all the resources. This parameter is required.
     * @param id - this is a a scope-unique id. This parameter is required.
     * @param props - user provided props for the construct. This parameter is required.
     */
    public EventsRuleToSns(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSnsProps 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") });
    }

    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.events.Rule getEventsRule() {
        return software.amazon.jsii.Kernel.get(this, "eventsRule", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.Rule.class));
    }

    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sns.Topic getSnsTopic() {
        return software.amazon.jsii.Kernel.get(this, "snsTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.Topic.class));
    }

    public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.kms.Key getEncryptionKey() {
        return software.amazon.jsii.Kernel.get(this, "encryptionKey", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kms.Key.class));
    }

    public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.IEventBus getEventBus() {
        return software.amazon.jsii.Kernel.get(this, "eventBus", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.IEventBus.class));
    }

    /**
     * A fluent builder for {@link software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSns}.
     */
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param scope - represents the scope for all the resources. This parameter is required.
         * @param id - this is a a scope-unique id. This parameter is required.
         */
        public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
            return new Builder(scope, id);
        }

        private final software.amazon.awscdk.core.Construct scope;
        private final java.lang.String id;
        private final software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSnsProps.Builder props;

        private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
            this.props = new software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSnsProps.Builder();
        }

        /**
         * User provided eventRuleProps to override the defaults.
         * 

* Default: - None *

* @return {@code this} * @param eventRuleProps User provided eventRuleProps to override the defaults. This parameter is required. */ public Builder eventRuleProps(final software.amazon.awscdk.services.events.RuleProps eventRuleProps) { this.props.eventRuleProps(eventRuleProps); return this; } /** * Use a KMS Key, either managed by this CDK app, or imported. *

* If importing an encryption key, it must be specified in * the encryptionKey property for this construct. *

* Default: - true (encryption enabled, managed by this CDK app). *

* @return {@code this} * @param enableEncryptionWithCustomerManagedKey Use a KMS Key, either managed by this CDK app, or imported. This parameter is required. */ public Builder enableEncryptionWithCustomerManagedKey(final java.lang.Boolean enableEncryptionWithCustomerManagedKey) { this.props.enableEncryptionWithCustomerManagedKey(enableEncryptionWithCustomerManagedKey); return this; } /** * An optional, imported encryption key to encrypt the SQS queue, and SNS Topic. *

* Default: - not specified. *

* @return {@code this} * @param encryptionKey An optional, imported encryption key to encrypt the SQS queue, and SNS Topic. This parameter is required. */ public Builder encryptionKey(final software.amazon.awscdk.services.kms.Key encryptionKey) { this.props.encryptionKey(encryptionKey); return this; } /** * Optional user-provided props to override the default props for the encryption key. *

* Default: - Default props are used. *

* @return {@code this} * @param encryptionKeyProps Optional user-provided props to override the default props for the encryption key. This parameter is required. */ public Builder encryptionKeyProps(final software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) { this.props.encryptionKeyProps(encryptionKeyProps); return this; } /** * A new custom EventBus is created with provided props. *

* Default: - None *

* @return {@code this} * @param eventBusProps A new custom EventBus is created with provided props. This parameter is required. */ public Builder eventBusProps(final software.amazon.awscdk.services.events.EventBusProps eventBusProps) { this.props.eventBusProps(eventBusProps); return this; } /** * Existing instance of a custom EventBus. *

* Default: - None *

* @return {@code this} * @param existingEventBusInterface Existing instance of a custom EventBus. This parameter is required. */ public Builder existingEventBusInterface(final software.amazon.awscdk.services.events.IEventBus existingEventBusInterface) { this.props.existingEventBusInterface(existingEventBusInterface); return this; } /** * Existing instance of SNS Topic object, providing both this and topicProps will cause an error.. *

* Default: - Default props are used *

* @return {@code this} * @param existingTopicObj Existing instance of SNS Topic object, providing both this and topicProps will cause an error.. This parameter is required. */ public Builder existingTopicObj(final software.amazon.awscdk.services.sns.Topic existingTopicObj) { this.props.existingTopicObj(existingTopicObj); return this; } /** * User provided props to override the default props for the SNS Topic. *

* Default: - Default props are used *

* @return {@code this} * @param topicProps User provided props to override the default props for the SNS Topic. This parameter is required. */ public Builder topicProps(final software.amazon.awscdk.services.sns.TopicProps topicProps) { this.props.topicProps(topicProps); return this; } /** * @returns a newly built instance of {@link software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSns}. */ @Override public software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSns build() { return new software.amazon.awsconstructs.services.eventsrulesns.EventsRuleToSns( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy