NamespaceTopicArgs

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 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

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",
});
});
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.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
})
}
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());
}
}

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}

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
val eventRetentionInDays: Output<Int>? = null

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
val inputSchema: Output<Either<String, EventInputSchema>>? = null

This determines the format that is expected for incoming events published to the topic.

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

Name of the namespace.

Link copied to clipboard
val publisherType: Output<Either<String, PublisherType>>? = null

Publisher type of the namespace topic.

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

The name of the resource group within the user's subscription.

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

Name of the namespace topic.

Functions

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