Topic Event Subscription Args
data class TopicEventSubscriptionArgs(val deadLetterDestination: Output<StorageBlobDeadLetterDestinationArgs>? = null, val deadLetterWithResourceIdentity: Output<DeadLetterWithResourceIdentityArgs>? = null, val deliveryWithResourceIdentity: Output<DeliveryWithResourceIdentityArgs>? = null, val destination: Output<Any>? = null, val eventDeliverySchema: Output<Either<String, EventDeliverySchema>>? = null, val eventSubscriptionName: Output<String>? = null, val expirationTimeUtc: Output<String>? = null, val filter: Output<EventSubscriptionFilterArgs>? = null, val labels: Output<List<String>>? = null, val resourceGroupName: Output<String>? = null, val retryPolicy: Output<RetryPolicyArgs>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<TopicEventSubscriptionArgs>
Event Subscription Azure REST API version: 2022-06-15. Prior API version in Azure Native 1.x: 2021-10-15-preview. Other available API versions: 2023-06-01-preview.
Example Usage
TopicEventSubscriptions_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var topicEventSubscription = new AzureNative.EventGrid.TopicEventSubscription("topicEventSubscription", new()
{
Destination = new AzureNative.EventGrid.Inputs.WebHookEventSubscriptionDestinationArgs
{
EndpointType = "WebHook",
EndpointUrl = "https://requestb.in/15ksip71",
},
EventSubscriptionName = "exampleEventSubscriptionName1",
Filter = new AzureNative.EventGrid.Inputs.EventSubscriptionFilterArgs
{
IsSubjectCaseSensitive = false,
SubjectBeginsWith = "ExamplePrefix",
SubjectEndsWith = "ExampleSuffix",
},
ResourceGroupName = "examplerg",
TopicName = "exampleTopic1",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventgrid.NewTopicEventSubscription(ctx, "topicEventSubscription", &eventgrid.TopicEventSubscriptionArgs{
Destination: eventgrid.WebHookEventSubscriptionDestination{
EndpointType: "WebHook",
EndpointUrl: "https://requestb.in/15ksip71",
},
EventSubscriptionName: pulumi.String("exampleEventSubscriptionName1"),
Filter: &eventgrid.EventSubscriptionFilterArgs{
IsSubjectCaseSensitive: pulumi.Bool(false),
SubjectBeginsWith: pulumi.String("ExamplePrefix"),
SubjectEndsWith: pulumi.String("ExampleSuffix"),
},
ResourceGroupName: pulumi.String("examplerg"),
TopicName: pulumi.String("exampleTopic1"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.eventgrid.TopicEventSubscription;
import com.pulumi.azurenative.eventgrid.TopicEventSubscriptionArgs;
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 topicEventSubscription = new TopicEventSubscription("topicEventSubscription", TopicEventSubscriptionArgs.builder()
.destination(Map.ofEntries(
Map.entry("endpointType", "WebHook"),
Map.entry("endpointUrl", "https://requestb.in/15ksip71")
))
.eventSubscriptionName("exampleEventSubscriptionName1")
.filter(Map.ofEntries(
Map.entry("isSubjectCaseSensitive", false),
Map.entry("subjectBeginsWith", "ExamplePrefix"),
Map.entry("subjectEndsWith", "ExampleSuffix")
))
.resourceGroupName("examplerg")
.topicName("exampleTopic1")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:eventgrid:TopicEventSubscription exampleEventSubscriptionName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}
Content copied to clipboard
Constructors
Link copied to clipboard
fun TopicEventSubscriptionArgs(deadLetterDestination: Output<StorageBlobDeadLetterDestinationArgs>? = null, deadLetterWithResourceIdentity: Output<DeadLetterWithResourceIdentityArgs>? = null, deliveryWithResourceIdentity: Output<DeliveryWithResourceIdentityArgs>? = null, destination: Output<Any>? = null, eventDeliverySchema: Output<Either<String, EventDeliverySchema>>? = null, eventSubscriptionName: Output<String>? = null, expirationTimeUtc: Output<String>? = null, filter: Output<EventSubscriptionFilterArgs>? = null, labels: Output<List<String>>? = null, resourceGroupName: Output<String>? = null, retryPolicy: Output<RetryPolicyArgs>? = null, topicName: Output<String>? = null)
Functions
Properties
Link copied to clipboard
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.
Link copied to clipboard