DomainArgs

data class DomainArgs(val autoCreateTopicWithFirstSubscription: Output<Boolean>? = null, val autoDeleteTopicWithLastSubscription: Output<Boolean>? = null, val dataResidencyBoundary: Output<Either<String, DataResidencyBoundary>>? = null, val disableLocalAuth: Output<Boolean>? = null, val domainName: Output<String>? = null, val identity: Output<IdentityInfoArgs>? = null, val inboundIpRules: Output<List<InboundIpRuleArgs>>? = null, val inputSchema: Output<Either<String, InputSchema>>? = null, val inputSchemaMapping: Output<JsonInputSchemaMappingArgs>? = null, val location: Output<String>? = null, val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DomainArgs>

EventGrid Domain. Uses Azure REST API version 2022-06-15. In version 1.x of the Azure Native provider, it used API version 2020-06-01. Other available API versions: 2020-04-01-preview, 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview, 2024-12-15-preview, 2025-02-15.

Example Usage

Domains_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var domain = new AzureNative.EventGrid.Domain("domain", new()
{
DomainName = "exampledomain1",
InboundIpRules = new[]
{
new AzureNative.EventGrid.Inputs.InboundIpRuleArgs
{
Action = AzureNative.EventGrid.IpActionType.Allow,
IpMask = "12.18.30.15",
},
new AzureNative.EventGrid.Inputs.InboundIpRuleArgs
{
Action = AzureNative.EventGrid.IpActionType.Allow,
IpMask = "12.18.176.1",
},
},
Location = "westus2",
PublicNetworkAccess = AzureNative.EventGrid.PublicNetworkAccess.Enabled,
ResourceGroupName = "examplerg",
Tags =
{
{ "tag1", "value1" },
{ "tag2", "value2" },
},
});
});
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.NewDomain(ctx, "domain", &eventgrid.DomainArgs{
DomainName: pulumi.String("exampledomain1"),
InboundIpRules: eventgrid.InboundIpRuleArray{
&eventgrid.InboundIpRuleArgs{
Action: pulumi.String(eventgrid.IpActionTypeAllow),
IpMask: pulumi.String("12.18.30.15"),
},
&eventgrid.InboundIpRuleArgs{
Action: pulumi.String(eventgrid.IpActionTypeAllow),
IpMask: pulumi.String("12.18.176.1"),
},
},
Location: pulumi.String("westus2"),
PublicNetworkAccess: pulumi.String(eventgrid.PublicNetworkAccessEnabled),
ResourceGroupName: pulumi.String("examplerg"),
Tags: pulumi.StringMap{
"tag1": pulumi.String("value1"),
"tag2": pulumi.String("value2"),
},
})
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.Domain;
import com.pulumi.azurenative.eventgrid.DomainArgs;
import com.pulumi.azurenative.eventgrid.inputs.InboundIpRuleArgs;
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 domain = new Domain("domain", DomainArgs.builder()
.domainName("exampledomain1")
.inboundIpRules(
InboundIpRuleArgs.builder()
.action("Allow")
.ipMask("12.18.30.15")
.build(),
InboundIpRuleArgs.builder()
.action("Allow")
.ipMask("12.18.176.1")
.build())
.location("westus2")
.publicNetworkAccess("Enabled")
.resourceGroupName("examplerg")
.tags(Map.ofEntries(
Map.entry("tag1", "value1"),
Map.entry("tag2", "value2")
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:eventgrid:Domain exampledomain1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}

Constructors

Link copied to clipboard
constructor(autoCreateTopicWithFirstSubscription: Output<Boolean>? = null, autoDeleteTopicWithLastSubscription: Output<Boolean>? = null, dataResidencyBoundary: Output<Either<String, DataResidencyBoundary>>? = null, disableLocalAuth: Output<Boolean>? = null, domainName: Output<String>? = null, identity: Output<IdentityInfoArgs>? = null, inboundIpRules: Output<List<InboundIpRuleArgs>>? = null, inputSchema: Output<Either<String, InputSchema>>? = null, inputSchemaMapping: Output<JsonInputSchemaMappingArgs>? = null, location: Output<String>? = null, publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic when the first event subscription is created at the scope of the domain topic. If this property is set to false, then creating the first event subscription will require creating a domain topic by the user. The self-management mode can be used if the user wants full control of when the domain topic is created, while auto-managed mode provides the flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed creation mode, user is allowed to create the domain topic on demand if needed.

Link copied to clipboard

This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the last event subscription at the scope of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the domain topic when it is no longer needed (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode can be used if the user wants full control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform less operations and manage fewer resources by the user.

Link copied to clipboard
val dataResidencyBoundary: Output<Either<String, DataResidencyBoundary>>? = null

Data Residency Boundary of the resource.

Link copied to clipboard
val disableLocalAuth: Output<Boolean>? = null

This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the domain.

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

Name of the domain.

Link copied to clipboard
val identity: Output<IdentityInfoArgs>? = null

Identity information for the Event Grid Domain resource.

Link copied to clipboard
val inboundIpRules: Output<List<InboundIpRuleArgs>>? = null

This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.

Link copied to clipboard
val inputSchema: Output<Either<String, InputSchema>>? = null

This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource.

Link copied to clipboard

Information about the InputSchemaMapping which specified the info about mapping event payload.

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

Location of the resource.

Link copied to clipboard
val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null

This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring

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 tags: Output<Map<String, String>>? = null

Tags of the resource.

Functions

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