import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an EventGrid Event Subscription * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleAccount = new azure.storage.Account("example", { * name: "exampleasa", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "LRS", * tags: { * environment: "staging", * }, * }); * const exampleQueue = new azure.storage.Queue("example", { * name: "example-astq", * storageAccountName: exampleAccount.name, * }); * const exampleEventSubscription = new azure.eventgrid.EventSubscription("example", { * name: "example-aees", * scope: example.id, * storageQueueEndpoint: { * storageAccountId: exampleAccount.id, * queueName: exampleQueue.name, * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.EventGrid` - 2025-02-15 * * ## Import * * EventGrid Event Subscription's can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:eventgrid/eventSubscription:EventSubscription eventSubscription1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscription1 * ``` */ export declare class EventSubscription extends pulumi.CustomResource { /** * Get an existing EventSubscription resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: EventSubscriptionState, opts?: pulumi.CustomResourceOptions): EventSubscription; /** * Returns true if the given object is an instance of EventSubscription. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is EventSubscription; /** * A `advancedFilter` block as defined below. */ readonly advancedFilter: pulumi.Output; /** * Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`. */ readonly advancedFilteringOnArraysEnabled: pulumi.Output; /** * An `azureFunctionEndpoint` block as defined below. */ readonly azureFunctionEndpoint: pulumi.Output; /** * A `deadLetterIdentity` block as defined below. * * > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified */ readonly deadLetterIdentity: pulumi.Output; /** * A `deliveryIdentity` block as defined below. */ readonly deliveryIdentity: pulumi.Output; /** * One or more `deliveryProperty` blocks as defined below. */ readonly deliveryProperties: pulumi.Output; /** * Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created. */ readonly eventDeliverySchema: pulumi.Output; /** * Specifies the id where the Event Hub is located. */ readonly eventhubEndpointId: pulumi.Output; /** * Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`). */ readonly expirationTimeUtc: pulumi.Output; /** * Specifies the id where the Hybrid Connection is located. */ readonly hybridConnectionEndpointId: pulumi.Output; /** * A list of applicable event types that need to be part of the event subscription. */ readonly includedEventTypes: pulumi.Output; /** * A list of labels to assign to the event subscription. */ readonly labels: pulumi.Output; /** * Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A `retryPolicy` block as defined below. */ readonly retryPolicy: pulumi.Output; /** * Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created. */ readonly scope: pulumi.Output; /** * Specifies the id where the Service Bus Queue is located. */ readonly serviceBusQueueEndpointId: pulumi.Output; /** * Specifies the id where the Service Bus Topic is located. */ readonly serviceBusTopicEndpointId: pulumi.Output; /** * A `storageBlobDeadLetterDestination` block as defined below. */ readonly storageBlobDeadLetterDestination: pulumi.Output; /** * A `storageQueueEndpoint` block as defined below. */ readonly storageQueueEndpoint: pulumi.Output; /** * A `subjectFilter` block as defined below. */ readonly subjectFilter: pulumi.Output; /** * A `webhookEndpoint` block as defined below. * * > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified. */ readonly webhookEndpoint: pulumi.Output; /** * Create a EventSubscription resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: EventSubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EventSubscription resources. */ export interface EventSubscriptionState { /** * A `advancedFilter` block as defined below. */ advancedFilter?: pulumi.Input; /** * Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`. */ advancedFilteringOnArraysEnabled?: pulumi.Input; /** * An `azureFunctionEndpoint` block as defined below. */ azureFunctionEndpoint?: pulumi.Input; /** * A `deadLetterIdentity` block as defined below. * * > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified */ deadLetterIdentity?: pulumi.Input; /** * A `deliveryIdentity` block as defined below. */ deliveryIdentity?: pulumi.Input; /** * One or more `deliveryProperty` blocks as defined below. */ deliveryProperties?: pulumi.Input[]>; /** * Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created. */ eventDeliverySchema?: pulumi.Input; /** * Specifies the id where the Event Hub is located. */ eventhubEndpointId?: pulumi.Input; /** * Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`). */ expirationTimeUtc?: pulumi.Input; /** * Specifies the id where the Hybrid Connection is located. */ hybridConnectionEndpointId?: pulumi.Input; /** * A list of applicable event types that need to be part of the event subscription. */ includedEventTypes?: pulumi.Input[]>; /** * A list of labels to assign to the event subscription. */ labels?: pulumi.Input[]>; /** * Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `retryPolicy` block as defined below. */ retryPolicy?: pulumi.Input; /** * Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created. */ scope?: pulumi.Input; /** * Specifies the id where the Service Bus Queue is located. */ serviceBusQueueEndpointId?: pulumi.Input; /** * Specifies the id where the Service Bus Topic is located. */ serviceBusTopicEndpointId?: pulumi.Input; /** * A `storageBlobDeadLetterDestination` block as defined below. */ storageBlobDeadLetterDestination?: pulumi.Input; /** * A `storageQueueEndpoint` block as defined below. */ storageQueueEndpoint?: pulumi.Input; /** * A `subjectFilter` block as defined below. */ subjectFilter?: pulumi.Input; /** * A `webhookEndpoint` block as defined below. * * > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified. */ webhookEndpoint?: pulumi.Input; } /** * The set of arguments for constructing a EventSubscription resource. */ export interface EventSubscriptionArgs { /** * A `advancedFilter` block as defined below. */ advancedFilter?: pulumi.Input; /** * Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`. */ advancedFilteringOnArraysEnabled?: pulumi.Input; /** * An `azureFunctionEndpoint` block as defined below. */ azureFunctionEndpoint?: pulumi.Input; /** * A `deadLetterIdentity` block as defined below. * * > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified */ deadLetterIdentity?: pulumi.Input; /** * A `deliveryIdentity` block as defined below. */ deliveryIdentity?: pulumi.Input; /** * One or more `deliveryProperty` blocks as defined below. */ deliveryProperties?: pulumi.Input[]>; /** * Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created. */ eventDeliverySchema?: pulumi.Input; /** * Specifies the id where the Event Hub is located. */ eventhubEndpointId?: pulumi.Input; /** * Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`). */ expirationTimeUtc?: pulumi.Input; /** * Specifies the id where the Hybrid Connection is located. */ hybridConnectionEndpointId?: pulumi.Input; /** * A list of applicable event types that need to be part of the event subscription. */ includedEventTypes?: pulumi.Input[]>; /** * A list of labels to assign to the event subscription. */ labels?: pulumi.Input[]>; /** * Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `retryPolicy` block as defined below. */ retryPolicy?: pulumi.Input; /** * Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created. */ scope: pulumi.Input; /** * Specifies the id where the Service Bus Queue is located. */ serviceBusQueueEndpointId?: pulumi.Input; /** * Specifies the id where the Service Bus Topic is located. */ serviceBusTopicEndpointId?: pulumi.Input; /** * A `storageBlobDeadLetterDestination` block as defined below. */ storageBlobDeadLetterDestination?: pulumi.Input; /** * A `storageQueueEndpoint` block as defined below. */ storageQueueEndpoint?: pulumi.Input; /** * A `subjectFilter` block as defined below. */ subjectFilter?: pulumi.Input; /** * A `webhookEndpoint` block as defined below. * * > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified. */ webhookEndpoint?: pulumi.Input; }