SystemTopic

class SystemTopic : KotlinCustomResource

Manages an Event Grid System Topic.

Example Usage

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: "examplestoracct",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
tags: {
environment: "staging",
},
});
const exampleSystemTopic = new azure.eventgrid.SystemTopic("example", {
name: "example-topic",
resourceGroupName: example.name,
location: example.location,
sourceArmResourceId: exampleAccount.id,
topicType: "Microsoft.Storage.StorageAccounts",
});
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="examplestoracct",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS",
tags={
"environment": "staging",
})
example_system_topic = azure.eventgrid.SystemTopic("example",
name="example-topic",
resource_group_name=example.name,
location=example.location,
source_arm_resource_id=example_account.id,
topic_type="Microsoft.Storage.StorageAccounts")
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 = "examplestoracct",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
Tags =
{
{ "environment", "staging" },
},
});
var exampleSystemTopic = new Azure.EventGrid.SystemTopic("example", new()
{
Name = "example-topic",
ResourceGroupName = example.Name,
Location = example.Location,
SourceArmResourceId = exampleAccount.Id,
TopicType = "Microsoft.Storage.StorageAccounts",
});
});
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-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplestoracct"),
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
}
_, err = eventgrid.NewSystemTopic(ctx, "example", &eventgrid.SystemTopicArgs{
Name: pulumi.String("example-topic"),
ResourceGroupName: example.Name,
Location: example.Location,
SourceArmResourceId: exampleAccount.ID(),
TopicType: pulumi.String("Microsoft.Storage.StorageAccounts"),
})
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.eventgrid.SystemTopic;
import com.pulumi.azure.eventgrid.SystemTopicArgs;
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("examplestoracct")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.tags(Map.of("environment", "staging"))
.build());
var exampleSystemTopic = new SystemTopic("exampleSystemTopic", SystemTopicArgs.builder()
.name("example-topic")
.resourceGroupName(example.name())
.location(example.location())
.sourceArmResourceId(exampleAccount.id())
.topicType("Microsoft.Storage.StorageAccounts")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplestoracct
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
tags:
environment: staging
exampleSystemTopic:
type: azure:eventgrid:SystemTopic
name: example
properties:
name: example-topic
resourceGroupName: ${example.name}
location: ${example.location}
sourceArmResourceId: ${exampleAccount.id}
topicType: Microsoft.Storage.StorageAccounts

Import

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

$ pulumi import azure:eventgrid/systemTopic:SystemTopic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/systemTopic1

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

An identity block as defined below.

Link copied to clipboard
val location: Output<String>

The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.

Link copied to clipboard

The Metric ARM Resource ID of the Event Grid System Topic.

Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.

Link copied to clipboard

The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>?
Link copied to clipboard
val topicType: Output<String>

The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: Microsoft.AppConfiguration.ConfigurationStores, Microsoft.Communication.CommunicationServices, Microsoft.ContainerRegistry.Registries, Microsoft.Devices.IoTHubs, Microsoft.EventGrid.Domains, Microsoft.EventGrid.Topics, Microsoft.Eventhub.Namespaces, Microsoft.KeyVault.vaults, Microsoft.MachineLearningServices.Workspaces, Microsoft.Maps.Accounts, Microsoft.Media.MediaServices, Microsoft.Resources.ResourceGroups, Microsoft.Resources.Subscriptions, Microsoft.ServiceBus.Namespaces, Microsoft.SignalRService.SignalR, Microsoft.Storage.StorageAccounts, Microsoft.Web.ServerFarms and Microsoft.Web.Sites. Changing this forces a new Event Grid System Topic to be created.

Link copied to clipboard
val urn: Output<String>