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

com.pulumi.azurenative.eventgrid.EventSubscriptionArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.eventgrid;

import com.pulumi.azurenative.eventgrid.enums.EventDeliverySchema;
import com.pulumi.azurenative.eventgrid.inputs.AzureFunctionEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.DeadLetterWithResourceIdentityArgs;
import com.pulumi.azurenative.eventgrid.inputs.DeliveryWithResourceIdentityArgs;
import com.pulumi.azurenative.eventgrid.inputs.EventHubEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.EventSubscriptionFilterArgs;
import com.pulumi.azurenative.eventgrid.inputs.HybridConnectionEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.RetryPolicyArgs;
import com.pulumi.azurenative.eventgrid.inputs.ServiceBusQueueEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.ServiceBusTopicEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.StorageBlobDeadLetterDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.StorageQueueEventSubscriptionDestinationArgs;
import com.pulumi.azurenative.eventgrid.inputs.WebHookEventSubscriptionDestinationArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class EventSubscriptionArgs extends com.pulumi.resources.ResourceArgs {

    public static final EventSubscriptionArgs Empty = new EventSubscriptionArgs();

    /**
     * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
     * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    @Import(name="deadLetterDestination")
    private @Nullable Output deadLetterDestination;

    /**
     * @return The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
     * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    public Optional> deadLetterDestination() {
        return Optional.ofNullable(this.deadLetterDestination);
    }

    /**
     * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
     * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    @Import(name="deadLetterWithResourceIdentity")
    private @Nullable Output deadLetterWithResourceIdentity;

    /**
     * @return The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
     * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    public Optional> deadLetterWithResourceIdentity() {
        return Optional.ofNullable(this.deadLetterWithResourceIdentity);
    }

    /**
     * Information about the destination where events have to be delivered for the event subscription.
     * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    @Import(name="deliveryWithResourceIdentity")
    private @Nullable Output deliveryWithResourceIdentity;

    /**
     * @return Information about the destination where events have to be delivered for the event subscription.
     * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    public Optional> deliveryWithResourceIdentity() {
        return Optional.ofNullable(this.deliveryWithResourceIdentity);
    }

    /**
     * Information about the destination where events have to be delivered for the event subscription.
     * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    @Import(name="destination")
    private @Nullable Output destination;

    /**
     * @return Information about the destination where events have to be delivered for the event subscription.
     * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
     * 
     */
    public Optional> destination() {
        return Optional.ofNullable(this.destination);
    }

    /**
     * The event delivery schema for the event subscription.
     * 
     */
    @Import(name="eventDeliverySchema")
    private @Nullable Output> eventDeliverySchema;

    /**
     * @return The event delivery schema for the event subscription.
     * 
     */
    public Optional>> eventDeliverySchema() {
        return Optional.ofNullable(this.eventDeliverySchema);
    }

    /**
     * Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
     * 
     */
    @Import(name="eventSubscriptionName")
    private @Nullable Output eventSubscriptionName;

    /**
     * @return Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
     * 
     */
    public Optional> eventSubscriptionName() {
        return Optional.ofNullable(this.eventSubscriptionName);
    }

    /**
     * Expiration time of the event subscription.
     * 
     */
    @Import(name="expirationTimeUtc")
    private @Nullable Output expirationTimeUtc;

    /**
     * @return Expiration time of the event subscription.
     * 
     */
    public Optional> expirationTimeUtc() {
        return Optional.ofNullable(this.expirationTimeUtc);
    }

    /**
     * Information about the filter for the event subscription.
     * 
     */
    @Import(name="filter")
    private @Nullable Output filter;

    /**
     * @return Information about the filter for the event subscription.
     * 
     */
    public Optional> filter() {
        return Optional.ofNullable(this.filter);
    }

    /**
     * List of user defined labels.
     * 
     */
    @Import(name="labels")
    private @Nullable Output> labels;

    /**
     * @return List of user defined labels.
     * 
     */
    public Optional>> labels() {
        return Optional.ofNullable(this.labels);
    }

    /**
     * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
     * 
     */
    @Import(name="retryPolicy")
    private @Nullable Output retryPolicy;

    /**
     * @return The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
     * 
     */
    public Optional> retryPolicy() {
        return Optional.ofNullable(this.retryPolicy);
    }

    /**
     * The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
     * 
     */
    @Import(name="scope", required=true)
    private Output scope;

    /**
     * @return The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
     * 
     */
    public Output scope() {
        return this.scope;
    }

    private EventSubscriptionArgs() {}

    private EventSubscriptionArgs(EventSubscriptionArgs $) {
        this.deadLetterDestination = $.deadLetterDestination;
        this.deadLetterWithResourceIdentity = $.deadLetterWithResourceIdentity;
        this.deliveryWithResourceIdentity = $.deliveryWithResourceIdentity;
        this.destination = $.destination;
        this.eventDeliverySchema = $.eventDeliverySchema;
        this.eventSubscriptionName = $.eventSubscriptionName;
        this.expirationTimeUtc = $.expirationTimeUtc;
        this.filter = $.filter;
        this.labels = $.labels;
        this.retryPolicy = $.retryPolicy;
        this.scope = $.scope;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(EventSubscriptionArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private EventSubscriptionArgs $;

        public Builder() {
            $ = new EventSubscriptionArgs();
        }

        public Builder(EventSubscriptionArgs defaults) {
            $ = new EventSubscriptionArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param deadLetterDestination The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
         * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterDestination(@Nullable Output deadLetterDestination) {
            $.deadLetterDestination = deadLetterDestination;
            return this;
        }

        /**
         * @param deadLetterDestination The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
         * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterDestination(StorageBlobDeadLetterDestinationArgs deadLetterDestination) {
            return deadLetterDestination(Output.of(deadLetterDestination));
        }

        /**
         * @param deadLetterWithResourceIdentity The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
         * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterWithResourceIdentity(@Nullable Output deadLetterWithResourceIdentity) {
            $.deadLetterWithResourceIdentity = deadLetterWithResourceIdentity;
            return this;
        }

        /**
         * @param deadLetterWithResourceIdentity The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
         * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterWithResourceIdentity(DeadLetterWithResourceIdentityArgs deadLetterWithResourceIdentity) {
            return deadLetterWithResourceIdentity(Output.of(deadLetterWithResourceIdentity));
        }

        /**
         * @param deliveryWithResourceIdentity Information about the destination where events have to be delivered for the event subscription.
         * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deliveryWithResourceIdentity(@Nullable Output deliveryWithResourceIdentity) {
            $.deliveryWithResourceIdentity = deliveryWithResourceIdentity;
            return this;
        }

        /**
         * @param deliveryWithResourceIdentity Information about the destination where events have to be delivered for the event subscription.
         * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder deliveryWithResourceIdentity(DeliveryWithResourceIdentityArgs deliveryWithResourceIdentity) {
            return deliveryWithResourceIdentity(Output.of(deliveryWithResourceIdentity));
        }

        /**
         * @param destination Information about the destination where events have to be delivered for the event subscription.
         * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder destination(@Nullable Output destination) {
            $.destination = destination;
            return this;
        }

        /**
         * @param destination Information about the destination where events have to be delivered for the event subscription.
         * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
         * 
         * @return builder
         * 
         */
        public Builder destination(Object destination) {
            return destination(Output.of(destination));
        }

        /**
         * @param eventDeliverySchema The event delivery schema for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder eventDeliverySchema(@Nullable Output> eventDeliverySchema) {
            $.eventDeliverySchema = eventDeliverySchema;
            return this;
        }

        /**
         * @param eventDeliverySchema The event delivery schema for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder eventDeliverySchema(Either eventDeliverySchema) {
            return eventDeliverySchema(Output.of(eventDeliverySchema));
        }

        /**
         * @param eventDeliverySchema The event delivery schema for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder eventDeliverySchema(String eventDeliverySchema) {
            return eventDeliverySchema(Either.ofLeft(eventDeliverySchema));
        }

        /**
         * @param eventDeliverySchema The event delivery schema for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder eventDeliverySchema(EventDeliverySchema eventDeliverySchema) {
            return eventDeliverySchema(Either.ofRight(eventDeliverySchema));
        }

        /**
         * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
         * 
         * @return builder
         * 
         */
        public Builder eventSubscriptionName(@Nullable Output eventSubscriptionName) {
            $.eventSubscriptionName = eventSubscriptionName;
            return this;
        }

        /**
         * @param eventSubscriptionName Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.
         * 
         * @return builder
         * 
         */
        public Builder eventSubscriptionName(String eventSubscriptionName) {
            return eventSubscriptionName(Output.of(eventSubscriptionName));
        }

        /**
         * @param expirationTimeUtc Expiration time of the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder expirationTimeUtc(@Nullable Output expirationTimeUtc) {
            $.expirationTimeUtc = expirationTimeUtc;
            return this;
        }

        /**
         * @param expirationTimeUtc Expiration time of the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder expirationTimeUtc(String expirationTimeUtc) {
            return expirationTimeUtc(Output.of(expirationTimeUtc));
        }

        /**
         * @param filter Information about the filter for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder filter(@Nullable Output filter) {
            $.filter = filter;
            return this;
        }

        /**
         * @param filter Information about the filter for the event subscription.
         * 
         * @return builder
         * 
         */
        public Builder filter(EventSubscriptionFilterArgs filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param labels List of user defined labels.
         * 
         * @return builder
         * 
         */
        public Builder labels(@Nullable Output> labels) {
            $.labels = labels;
            return this;
        }

        /**
         * @param labels List of user defined labels.
         * 
         * @return builder
         * 
         */
        public Builder labels(List labels) {
            return labels(Output.of(labels));
        }

        /**
         * @param labels List of user defined labels.
         * 
         * @return builder
         * 
         */
        public Builder labels(String... labels) {
            return labels(List.of(labels));
        }

        /**
         * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
         * 
         * @return builder
         * 
         */
        public Builder retryPolicy(@Nullable Output retryPolicy) {
            $.retryPolicy = retryPolicy;
            return this;
        }

        /**
         * @param retryPolicy The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events.
         * 
         * @return builder
         * 
         */
        public Builder retryPolicy(RetryPolicyArgs retryPolicy) {
            return retryPolicy(Output.of(retryPolicy));
        }

        /**
         * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
         * 
         * @return builder
         * 
         */
        public Builder scope(Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        public EventSubscriptionArgs build() {
            $.eventDeliverySchema = Codegen.stringProp("eventDeliverySchema").left(EventDeliverySchema.class).output().arg($.eventDeliverySchema).def("EventGridSchema").getNullable();
            if ($.scope == null) {
                throw new MissingRequiredPropertyException("EventSubscriptionArgs", "scope");
            }
            return $;
        }
    }

}