Namespace Topic Args
data class NamespaceTopicArgs(val eventRetentionInDays: Output<Int>? = null, val inputSchema: Output<Either<String, EventInputSchema>>? = null, val namespaceName: Output<String>? = null, val publisherType: Output<Either<String, PublisherType>>? = null, val resourceGroupName: Output<String>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<NamespaceTopicArgs>
Namespace topic details. Uses Azure REST API version 2023-06-01-preview. Other available API versions: 2023-12-15-preview, 2024-06-01-preview, 2024-12-15-preview, 2025-02-15.
Example Usage
NamespaceTopics_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var namespaceTopic = new AzureNative.EventGrid.NamespaceTopic("namespaceTopic", new()
{
EventRetentionInDays = 1,
InputSchema = AzureNative.EventGrid.EventInputSchema.CloudEventSchemaV1_0,
NamespaceName = "examplenamespace2",
PublisherType = AzureNative.EventGrid.PublisherType.Custom,
ResourceGroupName = "examplerg",
TopicName = "examplenamespacetopic2",
});
});
Content copied to clipboard
package main
import (
eventgrid "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.NewNamespaceTopic(ctx, "namespaceTopic", &eventgrid.NamespaceTopicArgs{
EventRetentionInDays: pulumi.Int(1),
InputSchema: pulumi.String(eventgrid.EventInputSchema_CloudEventSchemaV1_0),
NamespaceName: pulumi.String("examplenamespace2"),
PublisherType: pulumi.String(eventgrid.PublisherTypeCustom),
ResourceGroupName: pulumi.String("examplerg"),
TopicName: pulumi.String("examplenamespacetopic2"),
})
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.NamespaceTopic;
import com.pulumi.azurenative.eventgrid.NamespaceTopicArgs;
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 namespaceTopic = new NamespaceTopic("namespaceTopic", NamespaceTopicArgs.builder()
.eventRetentionInDays(1)
.inputSchema("CloudEventSchemaV1_0")
.namespaceName("examplenamespace2")
.publisherType("Custom")
.resourceGroupName("examplerg")
.topicName("examplenamespacetopic2")
.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:NamespaceTopic examplenamespacetopic2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(eventRetentionInDays: Output<Int>? = null, inputSchema: Output<Either<String, EventInputSchema>>? = null, namespaceName: Output<String>? = null, publisherType: Output<Either<String, PublisherType>>? = null, resourceGroupName: Output<String>? = null, topicName: Output<String>? = null)
Properties
Link copied to clipboard
Event retention for the namespace topic expressed in days. The property default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 day.
Link copied to clipboard
This determines the format that is expected for incoming events published to the topic.
Link copied to clipboard
Name of the namespace.
Link copied to clipboard
Publisher type of the namespace topic.
Link copied to clipboard
The name of the resource group within the user's subscription.