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. Azure REST API version: 2023-06-01-preview.
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 = "CloudEventSchemaV1_0",
NamespaceName = "examplenamespace2",
PublisherType = "Custom",
ResourceGroupName = "examplerg",
TopicName = "examplenamespacetopic2",
});
});
Content copied to clipboard
package main
import (
"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("CloudEventSchemaV1_0"),
NamespaceName: pulumi.String("examplenamespace2"),
PublisherType: pulumi.String("Custom"),
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
fun NamespaceTopicArgs(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)