Namespace
Namespace resource. 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
Namespaces_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var @namespace = new AzureNative.EventGrid.Namespace("namespace", new()
{
Location = "westus",
NamespaceName = "exampleNamespaceName1",
ResourceGroupName = "examplerg",
Tags =
{
{ "tag1", "value11" },
{ "tag2", "value22" },
},
TopicSpacesConfiguration = new AzureNative.EventGrid.Inputs.TopicSpacesConfigurationArgs
{
RouteTopicResourceId = "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1",
State = AzureNative.EventGrid.TopicSpacesConfigurationState.Enabled,
},
});
});
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.NewNamespace(ctx, "namespace", &eventgrid.NamespaceArgs{
Location: pulumi.String("westus"),
NamespaceName: pulumi.String("exampleNamespaceName1"),
ResourceGroupName: pulumi.String("examplerg"),
Tags: pulumi.StringMap{
"tag1": pulumi.String("value11"),
"tag2": pulumi.String("value22"),
},
TopicSpacesConfiguration: &eventgrid.TopicSpacesConfigurationArgs{
RouteTopicResourceId: pulumi.String("/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1"),
State: pulumi.String(eventgrid.TopicSpacesConfigurationStateEnabled),
},
})
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.Namespace;
import com.pulumi.azurenative.eventgrid.NamespaceArgs;
import com.pulumi.azurenative.eventgrid.inputs.TopicSpacesConfigurationArgs;
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 namespace = new Namespace("namespace", NamespaceArgs.builder()
.location("westus")
.namespaceName("exampleNamespaceName1")
.resourceGroupName("examplerg")
.tags(Map.ofEntries(
Map.entry("tag1", "value11"),
Map.entry("tag2", "value22")
))
.topicSpacesConfiguration(TopicSpacesConfigurationArgs.builder()
.routeTopicResourceId("/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1")
.state("Enabled")
.build())
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:eventgrid:Namespace exampleNamespaceName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}
Properties
The Azure API version of the resource.
Identity information for the Namespace resource.
This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this property is not specified explicitly by the user, its default value depends on the following conditions: a. For Availability Zones enabled regions - The default property value would be true. b. For non-Availability Zones enabled regions - The default property value would be false. Once specified, this property cannot be updated.
Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported.
List of private endpoint connections.
Provisioning state of the namespace resource.
This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring
Represents available Sku pricing tiers.
The system metadata relating to the Event Grid resource.
Topics configuration information for the namespace resource
Topic spaces configuration information for the namespace resource