com.pulumi.azure.eventhub.kotlin.EventSubscriptionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.eventhub.kotlin
import com.pulumi.azure.eventhub.EventSubscriptionArgs.builder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionAdvancedFilterArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionAdvancedFilterArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionAzureFunctionEndpointArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionAzureFunctionEndpointArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeadLetterIdentityArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeadLetterIdentityArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeliveryIdentityArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeliveryIdentityArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeliveryPropertyArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionDeliveryPropertyArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionRetryPolicyArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionRetryPolicyArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionStorageBlobDeadLetterDestinationArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionStorageBlobDeadLetterDestinationArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionStorageQueueEndpointArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionStorageQueueEndpointArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionSubjectFilterArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionSubjectFilterArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionWebhookEndpointArgs
import com.pulumi.azure.eventhub.kotlin.inputs.EventSubscriptionWebhookEndpointArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* 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,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_account = azure.storage.Account("example",
* name="exampleasa",
* resource_group_name=example.name,
* location=example.location,
* account_tier="Standard",
* account_replication_type="LRS",
* tags={
* "environment": "staging",
* })
* example_queue = azure.storage.Queue("example",
* name="example-astq",
* storage_account_name=example_account.name)
* example_event_subscription = azure.eventgrid.EventSubscription("example",
* name="example-aees",
* scope=example.id,
* storage_queue_endpoint=azure.eventgrid.EventSubscriptionStorageQueueEndpointArgs(
* storage_account_id=example_account.id,
* queue_name=example_queue.name,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAccount = new Azure.Storage.Account("example", new()
* {
* Name = "exampleasa",
* ResourceGroupName = example.Name,
* Location = example.Location,
* AccountTier = "Standard",
* AccountReplicationType = "LRS",
* Tags =
* {
* { "environment", "staging" },
* },
* });
* var exampleQueue = new Azure.Storage.Queue("example", new()
* {
* Name = "example-astq",
* StorageAccountName = exampleAccount.Name,
* });
* var exampleEventSubscription = new Azure.EventGrid.EventSubscription("example", new()
* {
* Name = "example-aees",
* Scope = example.Id,
* StorageQueueEndpoint = new Azure.EventGrid.Inputs.EventSubscriptionStorageQueueEndpointArgs
* {
* StorageAccountId = exampleAccount.Id,
* QueueName = exampleQueue.Name,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventgrid"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
* Name: pulumi.String("exampleasa"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* AccountTier: pulumi.String("Standard"),
* AccountReplicationType: pulumi.String("LRS"),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("staging"),
* },
* })
* if err != nil {
* return err
* }
* exampleQueue, err := storage.NewQueue(ctx, "example", &storage.QueueArgs{
* Name: pulumi.String("example-astq"),
* StorageAccountName: exampleAccount.Name,
* })
* if err != nil {
* return err
* }
* _, err = eventgrid.NewEventSubscription(ctx, "example", &eventgrid.EventSubscriptionArgs{
* Name: pulumi.String("example-aees"),
* Scope: example.ID(),
* StorageQueueEndpoint: &eventgrid.EventSubscriptionStorageQueueEndpointArgs{
* StorageAccountId: exampleAccount.ID(),
* QueueName: exampleQueue.Name,
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.storage.Queue;
* import com.pulumi.azure.storage.QueueArgs;
* import com.pulumi.azure.eventgrid.EventSubscription;
* import com.pulumi.azure.eventgrid.EventSubscriptionArgs;
* import com.pulumi.azure.eventgrid.inputs.EventSubscriptionStorageQueueEndpointArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("exampleasa")
* .resourceGroupName(example.name())
* .location(example.location())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .tags(Map.of("environment", "staging"))
* .build());
* var exampleQueue = new Queue("exampleQueue", QueueArgs.builder()
* .name("example-astq")
* .storageAccountName(exampleAccount.name())
* .build());
* var exampleEventSubscription = new EventSubscription("exampleEventSubscription", EventSubscriptionArgs.builder()
* .name("example-aees")
* .scope(example.id())
* .storageQueueEndpoint(EventSubscriptionStorageQueueEndpointArgs.builder()
* .storageAccountId(exampleAccount.id())
* .queueName(exampleQueue.name())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:storage:Account
* name: example
* properties:
* name: exampleasa
* resourceGroupName: ${example.name}
* location: ${example.location}
* accountTier: Standard
* accountReplicationType: LRS
* tags:
* environment: staging
* exampleQueue:
* type: azure:storage:Queue
* name: example
* properties:
* name: example-astq
* storageAccountName: ${exampleAccount.name}
* exampleEventSubscription:
* type: azure:eventgrid:EventSubscription
* name: example
* properties:
* name: example-aees
* scope: ${example.id}
* storageQueueEndpoint:
* storageAccountId: ${exampleAccount.id}
* queueName: ${exampleQueue.name}
* ```
*
* ## Import
* EventGrid Event Subscription's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:eventhub/eventSubscription:EventSubscription eventSubscription1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscription1
* ```
* @property advancedFilter A `advanced_filter` block as defined below.
* @property advancedFilteringOnArraysEnabled Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
* @property azureFunctionEndpoint An `azure_function_endpoint` block as defined below.
* @property deadLetterIdentity A `dead_letter_identity` block as defined below.
* > **Note:** `storage_blob_dead_letter_destination` must be specified when a `dead_letter_identity` is specified
* @property deliveryIdentity A `delivery_identity` block as defined below.
* @property deliveryProperties One or more `delivery_property` blocks as defined below.
* @property eventDeliverySchema 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.
* @property eventhubEndpointId Specifies the id where the Event Hub is located.
* @property expirationTimeUtc Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
* @property hybridConnectionEndpointId Specifies the id where the Hybrid Connection is located.
* @property includedEventTypes A list of applicable event types that need to be part of the event subscription.
* @property labels A list of labels to assign to the event subscription.
* @property name Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
* @property retryPolicy A `retry_policy` block as defined below.
* @property scope Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
* @property serviceBusQueueEndpointId Specifies the id where the Service Bus Queue is located.
* @property serviceBusTopicEndpointId Specifies the id where the Service Bus Topic is located.
* @property storageBlobDeadLetterDestination A `storage_blob_dead_letter_destination` block as defined below.
* @property storageQueueEndpoint A `storage_queue_endpoint` block as defined below.
* @property subjectFilter A `subject_filter` block as defined below.
* @property webhookEndpoint A `webhook_endpoint` block as defined below.
* > **NOTE:** One of `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint`, `webhook_endpoint` or `azure_function_endpoint` must be specified.
*/
public data class EventSubscriptionArgs @Deprecated(
message = """
azure.eventhub.EventSubscription has been deprecated in favor of azure.eventgrid.EventSubscription
""",
) constructor(
public val advancedFilter: Output? = null,
public val advancedFilteringOnArraysEnabled: Output? = null,
public val azureFunctionEndpoint: Output? = null,
public val deadLetterIdentity: Output? = null,
public val deliveryIdentity: Output? = null,
public val deliveryProperties: Output>? = null,
public val eventDeliverySchema: Output? = null,
public val eventhubEndpointId: Output? = null,
public val expirationTimeUtc: Output? = null,
public val hybridConnectionEndpointId: Output? = null,
public val includedEventTypes: Output>? = null,
public val labels: Output>? = null,
public val name: Output? = null,
public val retryPolicy: Output? = null,
public val scope: Output? = null,
public val serviceBusQueueEndpointId: Output? = null,
public val serviceBusTopicEndpointId: Output? = null,
public val storageBlobDeadLetterDestination:
Output? = null,
public val storageQueueEndpoint: Output? = null,
public val subjectFilter: Output? = null,
public val webhookEndpoint: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.eventhub.EventSubscriptionArgs =
com.pulumi.azure.eventhub.EventSubscriptionArgs.builder()
.advancedFilter(advancedFilter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.advancedFilteringOnArraysEnabled(advancedFilteringOnArraysEnabled?.applyValue({ args0 -> args0 }))
.azureFunctionEndpoint(
azureFunctionEndpoint?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.deadLetterIdentity(
deadLetterIdentity?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.deliveryIdentity(deliveryIdentity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deliveryProperties(
deliveryProperties?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.eventDeliverySchema(eventDeliverySchema?.applyValue({ args0 -> args0 }))
.eventhubEndpointId(eventhubEndpointId?.applyValue({ args0 -> args0 }))
.expirationTimeUtc(expirationTimeUtc?.applyValue({ args0 -> args0 }))
.hybridConnectionEndpointId(hybridConnectionEndpointId?.applyValue({ args0 -> args0 }))
.includedEventTypes(includedEventTypes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.name(name?.applyValue({ args0 -> args0 }))
.retryPolicy(retryPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.scope(scope?.applyValue({ args0 -> args0 }))
.serviceBusQueueEndpointId(serviceBusQueueEndpointId?.applyValue({ args0 -> args0 }))
.serviceBusTopicEndpointId(serviceBusTopicEndpointId?.applyValue({ args0 -> args0 }))
.storageBlobDeadLetterDestination(
storageBlobDeadLetterDestination?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.storageQueueEndpoint(
storageQueueEndpoint?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.subjectFilter(subjectFilter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.webhookEndpoint(
webhookEndpoint?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [EventSubscriptionArgs].
*/
@PulumiTagMarker
@Deprecated(
message = """
azure.eventhub.EventSubscription has been deprecated in favor of azure.eventgrid.EventSubscription
""",
)
public class EventSubscriptionArgsBuilder internal constructor() {
private var advancedFilter: Output? = null
private var advancedFilteringOnArraysEnabled: Output? = null
private var azureFunctionEndpoint: Output? = null
private var deadLetterIdentity: Output? = null
private var deliveryIdentity: Output? = null
private var deliveryProperties: Output>? = null
private var eventDeliverySchema: Output? = null
private var eventhubEndpointId: Output? = null
private var expirationTimeUtc: Output? = null
private var hybridConnectionEndpointId: Output? = null
private var includedEventTypes: Output>? = null
private var labels: Output>? = null
private var name: Output? = null
private var retryPolicy: Output? = null
private var scope: Output? = null
private var serviceBusQueueEndpointId: Output? = null
private var serviceBusTopicEndpointId: Output? = null
private var storageBlobDeadLetterDestination:
Output? = null
private var storageQueueEndpoint: Output? = null
private var subjectFilter: Output? = null
private var webhookEndpoint: Output? = null
/**
* @param value A `advanced_filter` block as defined below.
*/
@JvmName("rrultwwgpvhnctak")
public suspend fun advancedFilter(`value`: Output) {
this.advancedFilter = value
}
/**
* @param value Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
*/
@JvmName("paaewksnropsongm")
public suspend fun advancedFilteringOnArraysEnabled(`value`: Output) {
this.advancedFilteringOnArraysEnabled = value
}
/**
* @param value An `azure_function_endpoint` block as defined below.
*/
@JvmName("huyohhvkhuuutkkp")
public suspend
fun azureFunctionEndpoint(`value`: Output) {
this.azureFunctionEndpoint = value
}
/**
* @param value A `dead_letter_identity` block as defined below.
* > **Note:** `storage_blob_dead_letter_destination` must be specified when a `dead_letter_identity` is specified
*/
@JvmName("khweqsxmoeurvsqy")
public suspend fun deadLetterIdentity(`value`: Output) {
this.deadLetterIdentity = value
}
/**
* @param value A `delivery_identity` block as defined below.
*/
@JvmName("ymuyypqqtameicep")
public suspend fun deliveryIdentity(`value`: Output) {
this.deliveryIdentity = value
}
/**
* @param value One or more `delivery_property` blocks as defined below.
*/
@JvmName("stqktvtckvhoyexr")
public suspend
fun deliveryProperties(`value`: Output>) {
this.deliveryProperties = value
}
@JvmName("ixjocddddyivweye")
public suspend fun deliveryProperties(
vararg
values: Output,
) {
this.deliveryProperties = Output.all(values.asList())
}
/**
* @param values One or more `delivery_property` blocks as defined below.
*/
@JvmName("vmgpixjkhrnysrwf")
public suspend
fun deliveryProperties(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy