Namespace Topic Event Subscription
Event Subscription. Uses Azure REST API version 2025-02-15. In version 2.x of the Azure Native provider, it used API version 2023-06-01-preview. Other available API versions: 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview, 2024-12-15-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventgrid [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
NamespaceTopicEventSubscriptions_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var namespaceTopicEventSubscription = new AzureNative.EventGrid.NamespaceTopicEventSubscription("namespaceTopicEventSubscription", new()
{
DeliveryConfiguration = new AzureNative.EventGrid.Inputs.DeliveryConfigurationArgs
{
DeliveryMode = AzureNative.EventGrid.DeliveryMode.Queue,
Queue = new AzureNative.EventGrid.Inputs.QueueInfoArgs
{
EventTimeToLive = "P1D",
MaxDeliveryCount = 4,
ReceiveLockDurationInSeconds = 60,
},
},
EventDeliverySchema = AzureNative.EventGrid.DeliverySchema.CloudEventSchemaV1_0,
EventSubscriptionName = "examplenamespacetopicEventSub2",
NamespaceName = "examplenamespace2",
ResourceGroupName = "examplerg",
TopicName = "examplenamespacetopic2",
});
});
package main
import (
eventgrid "github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventgrid.NewNamespaceTopicEventSubscription(ctx, "namespaceTopicEventSubscription", &eventgrid.NamespaceTopicEventSubscriptionArgs{
DeliveryConfiguration: &eventgrid.DeliveryConfigurationArgs{
DeliveryMode: pulumi.String(eventgrid.DeliveryModeQueue),
Queue: &eventgrid.QueueInfoArgs{
EventTimeToLive: pulumi.String("P1D"),
MaxDeliveryCount: pulumi.Int(4),
ReceiveLockDurationInSeconds: pulumi.Int(60),
},
},
EventDeliverySchema: pulumi.String(eventgrid.DeliverySchema_CloudEventSchemaV1_0),
EventSubscriptionName: pulumi.String("examplenamespacetopicEventSub2"),
NamespaceName: pulumi.String("examplenamespace2"),
ResourceGroupName: pulumi.String("examplerg"),
TopicName: pulumi.String("examplenamespacetopic2"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.eventgrid.NamespaceTopicEventSubscription;
import com.pulumi.azurenative.eventgrid.NamespaceTopicEventSubscriptionArgs;
import com.pulumi.azurenative.eventgrid.inputs.DeliveryConfigurationArgs;
import com.pulumi.azurenative.eventgrid.inputs.QueueInfoArgs;
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 namespaceTopicEventSubscription = new NamespaceTopicEventSubscription("namespaceTopicEventSubscription", NamespaceTopicEventSubscriptionArgs.builder()
.deliveryConfiguration(DeliveryConfigurationArgs.builder()
.deliveryMode("Queue")
.queue(QueueInfoArgs.builder()
.eventTimeToLive("P1D")
.maxDeliveryCount(4)
.receiveLockDurationInSeconds(60)
.build())
.build())
.eventDeliverySchema("CloudEventSchemaV1_0")
.eventSubscriptionName("examplenamespacetopicEventSub2")
.namespaceName("examplenamespace2")
.resourceGroupName("examplerg")
.topicName("examplenamespacetopic2")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:eventgrid:NamespaceTopicEventSubscription examplenamespacetopicEventSub2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}
Properties
The Azure API version of the resource.
Information about the delivery configuration of the event subscription.
The event delivery schema for the event subscription.
Expiration time of the event subscription.
Information about the filter for the event subscription.
Provisioning state of the event subscription.
The system metadata relating to the Event Grid resource.