Namespace Topic Args
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
Properties
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.
This determines the format that is expected for incoming events published to the topic.
Name of the namespace.
Publisher type of the namespace topic.
The name of the resource group within the user's subscription.