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

com.pulumi.azure.eventgrid.kotlin.EventSubscriptionArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.eventgrid.kotlin

import com.pulumi.azure.eventgrid.EventSubscriptionArgs.builder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionAdvancedFilterArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionAdvancedFilterArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionAzureFunctionEndpointArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionAzureFunctionEndpointArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeadLetterIdentityArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeadLetterIdentityArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeliveryIdentityArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeliveryIdentityArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeliveryPropertyArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionDeliveryPropertyArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionRetryPolicyArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionRetryPolicyArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionStorageBlobDeadLetterDestinationArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionStorageBlobDeadLetterDestinationArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionStorageQueueEndpointArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionStorageQueueEndpointArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionSubjectFilterArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionSubjectFilterArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.EventSubscriptionWebhookEndpointArgs
import com.pulumi.azure.eventgrid.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.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={
 *         "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:eventgrid/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(
    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.eventgrid.EventSubscriptionArgs =
        com.pulumi.azure.eventgrid.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
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("arbiguqpoceuloxp")
    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("womgabdohpbnvgni")
    public suspend fun advancedFilteringOnArraysEnabled(`value`: Output) {
        this.advancedFilteringOnArraysEnabled = value
    }

    /**
     * @param value An `azure_function_endpoint` block as defined below.
     */
    @JvmName("xtbvighytsccgrfk")
    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("tlqagjxxirrwbrvl")
    public suspend fun deadLetterIdentity(`value`: Output) {
        this.deadLetterIdentity = value
    }

    /**
     * @param value A `delivery_identity` block as defined below.
     */
    @JvmName("hnilpwbuouyflmiv")
    public suspend fun deliveryIdentity(`value`: Output) {
        this.deliveryIdentity = value
    }

    /**
     * @param value One or more `delivery_property` blocks as defined below.
     */
    @JvmName("vuejuqrcchqnitjp")
    public suspend fun deliveryProperties(`value`: Output>) {
        this.deliveryProperties = value
    }

    @JvmName("pslbkkpsmnfrbygr")
    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("lvgpymrhhseiwfvn")
    public suspend fun deliveryProperties(values: List>) {
        this.deliveryProperties = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("fukjatawwdopwopt")
    public suspend fun eventDeliverySchema(`value`: Output) {
        this.eventDeliverySchema = value
    }

    /**
     * @param value Specifies the id where the Event Hub is located.
     */
    @JvmName("mxeyynrwgnhiwwqa")
    public suspend fun eventhubEndpointId(`value`: Output) {
        this.eventhubEndpointId = value
    }

    /**
     * @param value Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
     */
    @JvmName("nojksbsxvfwmlvds")
    public suspend fun expirationTimeUtc(`value`: Output) {
        this.expirationTimeUtc = value
    }

    /**
     * @param value Specifies the id where the Hybrid Connection is located.
     */
    @JvmName("xlbahaxjubynkrwm")
    public suspend fun hybridConnectionEndpointId(`value`: Output) {
        this.hybridConnectionEndpointId = value
    }

    /**
     * @param value A list of applicable event types that need to be part of the event subscription.
     */
    @JvmName("cemjdxyaylyqhnee")
    public suspend fun includedEventTypes(`value`: Output>) {
        this.includedEventTypes = value
    }

    @JvmName("ycutnlohotrcmvpt")
    public suspend fun includedEventTypes(vararg values: Output) {
        this.includedEventTypes = Output.all(values.asList())
    }

    /**
     * @param values A list of applicable event types that need to be part of the event subscription.
     */
    @JvmName("mlultutknetfdjey")
    public suspend fun includedEventTypes(values: List>) {
        this.includedEventTypes = Output.all(values)
    }

    /**
     * @param value A list of labels to assign to the event subscription.
     */
    @JvmName("mdcmfjnqcanonyfg")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    @JvmName("ayvtrplvguaamkay")
    public suspend fun labels(vararg values: Output) {
        this.labels = Output.all(values.asList())
    }

    /**
     * @param values A list of labels to assign to the event subscription.
     */
    @JvmName("iwydtwkkyutlorcy")
    public suspend fun labels(values: List>) {
        this.labels = Output.all(values)
    }

    /**
     * @param value Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
     */
    @JvmName("fhwwncqedrndmrmn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `retry_policy` block as defined below.
     */
    @JvmName("ihjrxtkjydamvoki")
    public suspend fun retryPolicy(`value`: Output) {
        this.retryPolicy = value
    }

    /**
     * @param value Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
     */
    @JvmName("qcpcjrmnabkkfkwv")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Specifies the id where the Service Bus Queue is located.
     */
    @JvmName("fodofhexcydkwtux")
    public suspend fun serviceBusQueueEndpointId(`value`: Output) {
        this.serviceBusQueueEndpointId = value
    }

    /**
     * @param value Specifies the id where the Service Bus Topic is located.
     */
    @JvmName("ajpuuvqowcdkkssy")
    public suspend fun serviceBusTopicEndpointId(`value`: Output) {
        this.serviceBusTopicEndpointId = value
    }

    /**
     * @param value A `storage_blob_dead_letter_destination` block as defined below.
     */
    @JvmName("ftqjvuepnwkypikk")
    public suspend fun storageBlobDeadLetterDestination(`value`: Output) {
        this.storageBlobDeadLetterDestination = value
    }

    /**
     * @param value A `storage_queue_endpoint` block as defined below.
     */
    @JvmName("hsgiovuyexbrdtsq")
    public suspend fun storageQueueEndpoint(`value`: Output) {
        this.storageQueueEndpoint = value
    }

    /**
     * @param value A `subject_filter` block as defined below.
     */
    @JvmName("yjyqgtctppvyfegw")
    public suspend fun subjectFilter(`value`: Output) {
        this.subjectFilter = value
    }

    /**
     * @param value 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.
     */
    @JvmName("yfdkjfxytyyejwdh")
    public suspend fun webhookEndpoint(`value`: Output) {
        this.webhookEndpoint = value
    }

    /**
     * @param value A `advanced_filter` block as defined below.
     */
    @JvmName("ylqskxhrgplblicq")
    public suspend fun advancedFilter(`value`: EventSubscriptionAdvancedFilterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedFilter = mapped
    }

    /**
     * @param argument A `advanced_filter` block as defined below.
     */
    @JvmName("wphdvbalomqjgnii")
    public suspend fun advancedFilter(argument: suspend EventSubscriptionAdvancedFilterArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionAdvancedFilterArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.advancedFilter = mapped
    }

    /**
     * @param value Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
     */
    @JvmName("cpqyrqqdycqowsqo")
    public suspend fun advancedFilteringOnArraysEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedFilteringOnArraysEnabled = mapped
    }

    /**
     * @param value An `azure_function_endpoint` block as defined below.
     */
    @JvmName("wyuviotoqhhtyjty")
    public suspend fun azureFunctionEndpoint(`value`: EventSubscriptionAzureFunctionEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.azureFunctionEndpoint = mapped
    }

    /**
     * @param argument An `azure_function_endpoint` block as defined below.
     */
    @JvmName("yhoqovifinduvahr")
    public suspend fun azureFunctionEndpoint(argument: suspend EventSubscriptionAzureFunctionEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionAzureFunctionEndpointArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.azureFunctionEndpoint = mapped
    }

    /**
     * @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("nswrayrdtunhpxnw")
    public suspend fun deadLetterIdentity(`value`: EventSubscriptionDeadLetterIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deadLetterIdentity = mapped
    }

    /**
     * @param argument 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("tgblokeqlnfpvtan")
    public suspend fun deadLetterIdentity(argument: suspend EventSubscriptionDeadLetterIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionDeadLetterIdentityArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.deadLetterIdentity = mapped
    }

    /**
     * @param value A `delivery_identity` block as defined below.
     */
    @JvmName("qdiyehdnholruxew")
    public suspend fun deliveryIdentity(`value`: EventSubscriptionDeliveryIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deliveryIdentity = mapped
    }

    /**
     * @param argument A `delivery_identity` block as defined below.
     */
    @JvmName("moivqkchlbhaotiu")
    public suspend fun deliveryIdentity(argument: suspend EventSubscriptionDeliveryIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionDeliveryIdentityArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.deliveryIdentity = mapped
    }

    /**
     * @param value One or more `delivery_property` blocks as defined below.
     */
    @JvmName("vhbqgntikfxmavnq")
    public suspend fun deliveryProperties(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deliveryProperties = mapped
    }

    /**
     * @param argument One or more `delivery_property` blocks as defined below.
     */
    @JvmName("kxaweuafbfufgwrh")
    public suspend fun deliveryProperties(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EventSubscriptionDeliveryPropertyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.deliveryProperties = mapped
    }

    /**
     * @param argument One or more `delivery_property` blocks as defined below.
     */
    @JvmName("bfiddysjbxlkchnt")
    public suspend fun deliveryProperties(vararg argument: suspend EventSubscriptionDeliveryPropertyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EventSubscriptionDeliveryPropertyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.deliveryProperties = mapped
    }

    /**
     * @param argument One or more `delivery_property` blocks as defined below.
     */
    @JvmName("fvhbvkreyehnteuk")
    public suspend fun deliveryProperties(argument: suspend EventSubscriptionDeliveryPropertyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EventSubscriptionDeliveryPropertyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.deliveryProperties = mapped
    }

    /**
     * @param values One or more `delivery_property` blocks as defined below.
     */
    @JvmName("owthusiclscrsvee")
    public suspend fun deliveryProperties(vararg values: EventSubscriptionDeliveryPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deliveryProperties = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("irfosdnyucfokgkm")
    public suspend fun eventDeliverySchema(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventDeliverySchema = mapped
    }

    /**
     * @param value Specifies the id where the Event Hub is located.
     */
    @JvmName("jageskpsirwaqisu")
    public suspend fun eventhubEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventhubEndpointId = mapped
    }

    /**
     * @param value Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
     */
    @JvmName("caukxhygsgjtiqgg")
    public suspend fun expirationTimeUtc(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirationTimeUtc = mapped
    }

    /**
     * @param value Specifies the id where the Hybrid Connection is located.
     */
    @JvmName("dfnjcjniwjxcupgc")
    public suspend fun hybridConnectionEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hybridConnectionEndpointId = mapped
    }

    /**
     * @param value A list of applicable event types that need to be part of the event subscription.
     */
    @JvmName("poeefuvrqyostjli")
    public suspend fun includedEventTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includedEventTypes = mapped
    }

    /**
     * @param values A list of applicable event types that need to be part of the event subscription.
     */
    @JvmName("plwnpihcdxdkaetl")
    public suspend fun includedEventTypes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.includedEventTypes = mapped
    }

    /**
     * @param value A list of labels to assign to the event subscription.
     */
    @JvmName("cdcyrwdunpjqaava")
    public suspend fun labels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values A list of labels to assign to the event subscription.
     */
    @JvmName("iqimdgpxsejjumiv")
    public suspend fun labels(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
     */
    @JvmName("kmicylujlmformuw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `retry_policy` block as defined below.
     */
    @JvmName("bnuoikbyiqtnddyq")
    public suspend fun retryPolicy(`value`: EventSubscriptionRetryPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retryPolicy = mapped
    }

    /**
     * @param argument A `retry_policy` block as defined below.
     */
    @JvmName("qyttfqjtrcdeokag")
    public suspend fun retryPolicy(argument: suspend EventSubscriptionRetryPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionRetryPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retryPolicy = mapped
    }

    /**
     * @param value Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
     */
    @JvmName("siioeecllrtfwgls")
    public suspend fun scope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value Specifies the id where the Service Bus Queue is located.
     */
    @JvmName("cqircilblijctgli")
    public suspend fun serviceBusQueueEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceBusQueueEndpointId = mapped
    }

    /**
     * @param value Specifies the id where the Service Bus Topic is located.
     */
    @JvmName("bhdopgwiyjkjtubp")
    public suspend fun serviceBusTopicEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceBusTopicEndpointId = mapped
    }

    /**
     * @param value A `storage_blob_dead_letter_destination` block as defined below.
     */
    @JvmName("npkkoxhjvlsgclfi")
    public suspend fun storageBlobDeadLetterDestination(`value`: EventSubscriptionStorageBlobDeadLetterDestinationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageBlobDeadLetterDestination = mapped
    }

    /**
     * @param argument A `storage_blob_dead_letter_destination` block as defined below.
     */
    @JvmName("enwoilqqtlcfwdxn")
    public suspend fun storageBlobDeadLetterDestination(argument: suspend EventSubscriptionStorageBlobDeadLetterDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionStorageBlobDeadLetterDestinationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.storageBlobDeadLetterDestination = mapped
    }

    /**
     * @param value A `storage_queue_endpoint` block as defined below.
     */
    @JvmName("gsusyqjewmymeavc")
    public suspend fun storageQueueEndpoint(`value`: EventSubscriptionStorageQueueEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageQueueEndpoint = mapped
    }

    /**
     * @param argument A `storage_queue_endpoint` block as defined below.
     */
    @JvmName("xseruxmvmicoeqfs")
    public suspend fun storageQueueEndpoint(argument: suspend EventSubscriptionStorageQueueEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionStorageQueueEndpointArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.storageQueueEndpoint = mapped
    }

    /**
     * @param value A `subject_filter` block as defined below.
     */
    @JvmName("kvuiawavgajqhexb")
    public suspend fun subjectFilter(`value`: EventSubscriptionSubjectFilterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subjectFilter = mapped
    }

    /**
     * @param argument A `subject_filter` block as defined below.
     */
    @JvmName("afnjcadumxtcdurk")
    public suspend fun subjectFilter(argument: suspend EventSubscriptionSubjectFilterArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionSubjectFilterArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subjectFilter = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("mroptojvujwnisqt")
    public suspend fun webhookEndpoint(`value`: EventSubscriptionWebhookEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.webhookEndpoint = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("snjgvtdpxwpnprqo")
    public suspend fun webhookEndpoint(argument: suspend EventSubscriptionWebhookEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = EventSubscriptionWebhookEndpointArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.webhookEndpoint = mapped
    }

    internal fun build(): EventSubscriptionArgs = EventSubscriptionArgs(
        advancedFilter = advancedFilter,
        advancedFilteringOnArraysEnabled = advancedFilteringOnArraysEnabled,
        azureFunctionEndpoint = azureFunctionEndpoint,
        deadLetterIdentity = deadLetterIdentity,
        deliveryIdentity = deliveryIdentity,
        deliveryProperties = deliveryProperties,
        eventDeliverySchema = eventDeliverySchema,
        eventhubEndpointId = eventhubEndpointId,
        expirationTimeUtc = expirationTimeUtc,
        hybridConnectionEndpointId = hybridConnectionEndpointId,
        includedEventTypes = includedEventTypes,
        labels = labels,
        name = name,
        retryPolicy = retryPolicy,
        scope = scope,
        serviceBusQueueEndpointId = serviceBusQueueEndpointId,
        serviceBusTopicEndpointId = serviceBusTopicEndpointId,
        storageBlobDeadLetterDestination = storageBlobDeadLetterDestination,
        storageQueueEndpoint = storageQueueEndpoint,
        subjectFilter = subjectFilter,
        webhookEndpoint = webhookEndpoint,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy