SystemTopicEventSubscriptionArgs

data class SystemTopicEventSubscriptionArgs(val advancedFilter: Output<SystemTopicEventSubscriptionAdvancedFilterArgs>? = null, val advancedFilteringOnArraysEnabled: Output<Boolean>? = null, val azureFunctionEndpoint: Output<SystemTopicEventSubscriptionAzureFunctionEndpointArgs>? = null, val deadLetterIdentity: Output<SystemTopicEventSubscriptionDeadLetterIdentityArgs>? = null, val deliveryIdentity: Output<SystemTopicEventSubscriptionDeliveryIdentityArgs>? = null, val deliveryProperties: Output<List<SystemTopicEventSubscriptionDeliveryPropertyArgs>>? = null, val eventDeliverySchema: Output<String>? = null, val eventhubEndpointId: Output<String>? = null, val expirationTimeUtc: Output<String>? = null, val hybridConnectionEndpointId: Output<String>? = null, val includedEventTypes: Output<List<String>>? = null, val labels: Output<List<String>>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retryPolicy: Output<SystemTopicEventSubscriptionRetryPolicyArgs>? = null, val serviceBusQueueEndpointId: Output<String>? = null, val serviceBusTopicEndpointId: Output<String>? = null, val storageBlobDeadLetterDestination: Output<SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs>? = null, val storageQueueEndpoint: Output<SystemTopicEventSubscriptionStorageQueueEndpointArgs>? = null, val subjectFilter: Output<SystemTopicEventSubscriptionSubjectFilterArgs>? = null, val systemTopic: Output<String>? = null, val webhookEndpoint: Output<SystemTopicEventSubscriptionWebhookEndpointArgs>? = null) : ConvertibleToJava<SystemTopicEventSubscriptionArgs>

Manages an EventGrid System Topic Event Subscription.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "examplestorageaccount",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
tags: {
environment: "staging",
},
});
const exampleQueue = new azure.storage.Queue("example", {
name: "examplestoragequeue",
storageAccountName: exampleAccount.name,
});
const exampleSystemTopic = new azure.eventgrid.SystemTopic("example", {
name: "example-system-topic",
location: "Global",
resourceGroupName: example.name,
sourceArmResourceId: example.id,
topicType: "Microsoft.Resources.ResourceGroups",
});
const exampleSystemTopicEventSubscription = new azure.eventgrid.SystemTopicEventSubscription("example", {
name: "example-event-subscription",
systemTopic: exampleSystemTopic.name,
resourceGroupName: example.name,
storageQueueEndpoint: {
storageAccountId: exampleAccount.id,
queueName: exampleQueue.name,
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="West Europe")
example_account = azure.storage.Account("example",
name="examplestorageaccount",
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="examplestoragequeue",
storage_account_name=example_account.name)
example_system_topic = azure.eventgrid.SystemTopic("example",
name="example-system-topic",
location="Global",
resource_group_name=example.name,
source_arm_resource_id=example.id,
topic_type="Microsoft.Resources.ResourceGroups")
example_system_topic_event_subscription = azure.eventgrid.SystemTopicEventSubscription("example",
name="example-event-subscription",
system_topic=example_system_topic.name,
resource_group_name=example.name,
storage_queue_endpoint={
"storage_account_id": example_account.id,
"queue_name": example_queue.name,
})
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-rg",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "examplestorageaccount",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
Tags =
{
{ "environment", "staging" },
},
});
var exampleQueue = new Azure.Storage.Queue("example", new()
{
Name = "examplestoragequeue",
StorageAccountName = exampleAccount.Name,
});
var exampleSystemTopic = new Azure.EventGrid.SystemTopic("example", new()
{
Name = "example-system-topic",
Location = "Global",
ResourceGroupName = example.Name,
SourceArmResourceId = example.Id,
TopicType = "Microsoft.Resources.ResourceGroups",
});
var exampleSystemTopicEventSubscription = new Azure.EventGrid.SystemTopicEventSubscription("example", new()
{
Name = "example-event-subscription",
SystemTopic = exampleSystemTopic.Name,
ResourceGroupName = example.Name,
StorageQueueEndpoint = new Azure.EventGrid.Inputs.SystemTopicEventSubscriptionStorageQueueEndpointArgs
{
StorageAccountId = exampleAccount.Id,
QueueName = exampleQueue.Name,
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventgrid"
"github.com/pulumi/pulumi-azure/sdk/v6/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-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplestorageaccount"),
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("examplestoragequeue"),
StorageAccountName: exampleAccount.Name,
})
if err != nil {
return err
}
exampleSystemTopic, err := eventgrid.NewSystemTopic(ctx, "example", &eventgrid.SystemTopicArgs{
Name: pulumi.String("example-system-topic"),
Location: pulumi.String("Global"),
ResourceGroupName: example.Name,
SourceArmResourceId: example.ID(),
TopicType: pulumi.String("Microsoft.Resources.ResourceGroups"),
})
if err != nil {
return err
}
_, err = eventgrid.NewSystemTopicEventSubscription(ctx, "example", &eventgrid.SystemTopicEventSubscriptionArgs{
Name: pulumi.String("example-event-subscription"),
SystemTopic: exampleSystemTopic.Name,
ResourceGroupName: example.Name,
StorageQueueEndpoint: &eventgrid.SystemTopicEventSubscriptionStorageQueueEndpointArgs{
StorageAccountId: exampleAccount.ID(),
QueueName: exampleQueue.Name,
},
})
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.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.SystemTopic;
import com.pulumi.azure.eventgrid.SystemTopicArgs;
import com.pulumi.azure.eventgrid.SystemTopicEventSubscription;
import com.pulumi.azure.eventgrid.SystemTopicEventSubscriptionArgs;
import com.pulumi.azure.eventgrid.inputs.SystemTopicEventSubscriptionStorageQueueEndpointArgs;
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-rg")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestorageaccount")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.tags(Map.of("environment", "staging"))
.build());
var exampleQueue = new Queue("exampleQueue", QueueArgs.builder()
.name("examplestoragequeue")
.storageAccountName(exampleAccount.name())
.build());
var exampleSystemTopic = new SystemTopic("exampleSystemTopic", SystemTopicArgs.builder()
.name("example-system-topic")
.location("Global")
.resourceGroupName(example.name())
.sourceArmResourceId(example.id())
.topicType("Microsoft.Resources.ResourceGroups")
.build());
var exampleSystemTopicEventSubscription = new SystemTopicEventSubscription("exampleSystemTopicEventSubscription", SystemTopicEventSubscriptionArgs.builder()
.name("example-event-subscription")
.systemTopic(exampleSystemTopic.name())
.resourceGroupName(example.name())
.storageQueueEndpoint(SystemTopicEventSubscriptionStorageQueueEndpointArgs.builder()
.storageAccountId(exampleAccount.id())
.queueName(exampleQueue.name())
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplestorageaccount
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
tags:
environment: staging
exampleQueue:
type: azure:storage:Queue
name: example
properties:
name: examplestoragequeue
storageAccountName: ${exampleAccount.name}
exampleSystemTopic:
type: azure:eventgrid:SystemTopic
name: example
properties:
name: example-system-topic
location: Global
resourceGroupName: ${example.name}
sourceArmResourceId: ${example.id}
topicType: Microsoft.Resources.ResourceGroups
exampleSystemTopicEventSubscription:
type: azure:eventgrid:SystemTopicEventSubscription
name: example
properties:
name: example-event-subscription
systemTopic: ${exampleSystemTopic.name}
resourceGroupName: ${example.name}
storageQueueEndpoint:
storageAccountId: ${exampleAccount.id}
queueName: ${exampleQueue.name}

Import

EventGrid System Topic Event Subscriptions can be imported using the resource id, e.g.

$ pulumi import azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/topic1/eventSubscriptions/subscription1

Constructors

Link copied to clipboard
constructor(advancedFilter: Output<SystemTopicEventSubscriptionAdvancedFilterArgs>? = null, advancedFilteringOnArraysEnabled: Output<Boolean>? = null, azureFunctionEndpoint: Output<SystemTopicEventSubscriptionAzureFunctionEndpointArgs>? = null, deadLetterIdentity: Output<SystemTopicEventSubscriptionDeadLetterIdentityArgs>? = null, deliveryIdentity: Output<SystemTopicEventSubscriptionDeliveryIdentityArgs>? = null, deliveryProperties: Output<List<SystemTopicEventSubscriptionDeliveryPropertyArgs>>? = null, eventDeliverySchema: Output<String>? = null, eventhubEndpointId: Output<String>? = null, expirationTimeUtc: Output<String>? = null, hybridConnectionEndpointId: Output<String>? = null, includedEventTypes: Output<List<String>>? = null, labels: Output<List<String>>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, retryPolicy: Output<SystemTopicEventSubscriptionRetryPolicyArgs>? = null, serviceBusQueueEndpointId: Output<String>? = null, serviceBusTopicEndpointId: Output<String>? = null, storageBlobDeadLetterDestination: Output<SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs>? = null, storageQueueEndpoint: Output<SystemTopicEventSubscriptionStorageQueueEndpointArgs>? = null, subjectFilter: Output<SystemTopicEventSubscriptionSubjectFilterArgs>? = null, systemTopic: Output<String>? = null, webhookEndpoint: Output<SystemTopicEventSubscriptionWebhookEndpointArgs>? = null)

Properties

Link copied to clipboard

A advanced_filter block as defined below.

Link copied to clipboard

Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to false.

Link copied to clipboard

An azure_function_endpoint block as defined below.

Link copied to clipboard

A dead_letter_identity block as defined below.

Link copied to clipboard

A delivery_identity block as defined below.

Link copied to clipboard

One or more delivery_property blocks as defined below.

Link copied to clipboard
val eventDeliverySchema: Output<String>? = null

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.

Link copied to clipboard
val eventhubEndpointId: Output<String>? = null

Specifies the id where the Event Hub is located.

Link copied to clipboard
val expirationTimeUtc: Output<String>? = null

Specifies the expiration time of the event subscription (Datetime Format RFC 3339).

Link copied to clipboard
val hybridConnectionEndpointId: Output<String>? = null

Specifies the id where the Hybrid Connection is located.

Link copied to clipboard
val includedEventTypes: Output<List<String>>? = null

A list of applicable event types that need to be part of the event subscription.

Link copied to clipboard
val labels: Output<List<String>>? = null

A list of labels to assign to the event subscription.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.

Link copied to clipboard

A retry_policy block as defined below.

Link copied to clipboard
val serviceBusQueueEndpointId: Output<String>? = null

Specifies the id where the Service Bus Queue is located.

Link copied to clipboard
val serviceBusTopicEndpointId: Output<String>? = null

Specifies the id where the Service Bus Topic is located.

Link copied to clipboard

A storage_blob_dead_letter_destination block as defined below.

Link copied to clipboard

A storage_queue_endpoint block as defined below.

Link copied to clipboard

A subject_filter block as defined below.

Link copied to clipboard
val systemTopic: Output<String>? = null

The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.

Link copied to clipboard

A webhook_endpoint block as defined below.

Functions

Link copied to clipboard
open override fun toJava(): SystemTopicEventSubscriptionArgs