1. Packages
  2. Azure Classic
  3. API Docs
  4. eventgrid
  5. getDomain

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.eventgrid.getDomain

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing EventGrid Domain

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.eventgrid.getDomain({
    name: "my-eventgrid-domain",
    resourceGroupName: "example-resources",
});
export const eventgridDomainMappingTopic = example.then(example => example.inputMappingFields?.[0]?.topic);
Copy
import pulumi
import pulumi_azure as azure

example = azure.eventgrid.get_domain(name="my-eventgrid-domain",
    resource_group_name="example-resources")
pulumi.export("eventgridDomainMappingTopic", example.input_mapping_fields[0].topic)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventgrid"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := eventgrid.LookupDomain(ctx, &eventgrid.LookupDomainArgs{
			Name:              "my-eventgrid-domain",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("eventgridDomainMappingTopic", example.InputMappingFields[0].Topic)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.EventGrid.GetDomain.Invoke(new()
    {
        Name = "my-eventgrid-domain",
        ResourceGroupName = "example-resources",
    });

    return new Dictionary<string, object?>
    {
        ["eventgridDomainMappingTopic"] = example.Apply(getDomainResult => getDomainResult.InputMappingFields[0]?.Topic),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.eventgrid.EventgridFunctions;
import com.pulumi.azure.eventgrid.inputs.GetDomainArgs;
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) {
        final var example = EventgridFunctions.getDomain(GetDomainArgs.builder()
            .name("my-eventgrid-domain")
            .resourceGroupName("example-resources")
            .build());

        ctx.export("eventgridDomainMappingTopic", example.applyValue(getDomainResult -> getDomainResult.inputMappingFields()[0].topic()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:eventgrid:getDomain
      arguments:
        name: my-eventgrid-domain
        resourceGroupName: example-resources
outputs:
  eventgridDomainMappingTopic: ${example.inputMappingFields[0].topic}
Copy

Using getDomain

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDomain(args: GetDomainArgs, opts?: InvokeOptions): Promise<GetDomainResult>
function getDomainOutput(args: GetDomainOutputArgs, opts?: InvokeOptions): Output<GetDomainResult>
Copy
def get_domain(name: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetDomainResult
def get_domain_output(name: Optional[pulumi.Input[str]] = None,
               resource_group_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetDomainResult]
Copy
func LookupDomain(ctx *Context, args *LookupDomainArgs, opts ...InvokeOption) (*LookupDomainResult, error)
func LookupDomainOutput(ctx *Context, args *LookupDomainOutputArgs, opts ...InvokeOption) LookupDomainResultOutput
Copy

> Note: This function is named LookupDomain in the Go SDK.

public static class GetDomain 
{
    public static Task<GetDomainResult> InvokeAsync(GetDomainArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainResult> Invoke(GetDomainInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
public static Output<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:eventgrid/getDomain:getDomain
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the EventGrid Domain resource.
ResourceGroupName This property is required. string
The name of the resource group in which the EventGrid Domain exists.
Name This property is required. string
The name of the EventGrid Domain resource.
ResourceGroupName This property is required. string
The name of the resource group in which the EventGrid Domain exists.
name This property is required. String
The name of the EventGrid Domain resource.
resourceGroupName This property is required. String
The name of the resource group in which the EventGrid Domain exists.
name This property is required. string
The name of the EventGrid Domain resource.
resourceGroupName This property is required. string
The name of the resource group in which the EventGrid Domain exists.
name This property is required. str
The name of the EventGrid Domain resource.
resource_group_name This property is required. str
The name of the resource group in which the EventGrid Domain exists.
name This property is required. String
The name of the EventGrid Domain resource.
resourceGroupName This property is required. String
The name of the resource group in which the EventGrid Domain exists.

getDomain Result

The following output properties are available:

Endpoint string
The Endpoint associated with the EventGrid Domain.
Id string
The provider-assigned unique ID for this managed resource.
Identities List<GetDomainIdentity>
An identity block as documented below.
InboundIpRules List<GetDomainInboundIpRule>
One or more inbound_ip_rule blocks as defined below.
InputMappingDefaultValues List<GetDomainInputMappingDefaultValue>
A input_mapping_default_values block as defined below.
InputMappingFields List<GetDomainInputMappingField>
A input_mapping_fields block as defined below.
InputSchema string
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
Location string
The Azure Region in which this EventGrid Domain exists.
Name string
PrimaryAccessKey string
The primary access key associated with the EventGrid Domain.
PublicNetworkAccessEnabled bool
Whether or not public network access is allowed for this server.
ResourceGroupName string
SecondaryAccessKey string
The secondary access key associated with the EventGrid Domain.
Tags Dictionary<string, string>
A mapping of tags assigned to the EventGrid Domain.
Endpoint string
The Endpoint associated with the EventGrid Domain.
Id string
The provider-assigned unique ID for this managed resource.
Identities []GetDomainIdentity
An identity block as documented below.
InboundIpRules []GetDomainInboundIpRule
One or more inbound_ip_rule blocks as defined below.
InputMappingDefaultValues []GetDomainInputMappingDefaultValue
A input_mapping_default_values block as defined below.
InputMappingFields []GetDomainInputMappingField
A input_mapping_fields block as defined below.
InputSchema string
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
Location string
The Azure Region in which this EventGrid Domain exists.
Name string
PrimaryAccessKey string
The primary access key associated with the EventGrid Domain.
PublicNetworkAccessEnabled bool
Whether or not public network access is allowed for this server.
ResourceGroupName string
SecondaryAccessKey string
The secondary access key associated with the EventGrid Domain.
Tags map[string]string
A mapping of tags assigned to the EventGrid Domain.
endpoint String
The Endpoint associated with the EventGrid Domain.
id String
The provider-assigned unique ID for this managed resource.
identities List<GetDomainIdentity>
An identity block as documented below.
inboundIpRules List<GetDomainInboundIpRule>
One or more inbound_ip_rule blocks as defined below.
inputMappingDefaultValues List<GetDomainInputMappingDefaultValue>
A input_mapping_default_values block as defined below.
inputMappingFields List<GetDomainInputMappingField>
A input_mapping_fields block as defined below.
inputSchema String
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
location String
The Azure Region in which this EventGrid Domain exists.
name String
primaryAccessKey String
The primary access key associated with the EventGrid Domain.
publicNetworkAccessEnabled Boolean
Whether or not public network access is allowed for this server.
resourceGroupName String
secondaryAccessKey String
The secondary access key associated with the EventGrid Domain.
tags Map<String,String>
A mapping of tags assigned to the EventGrid Domain.
endpoint string
The Endpoint associated with the EventGrid Domain.
id string
The provider-assigned unique ID for this managed resource.
identities GetDomainIdentity[]
An identity block as documented below.
inboundIpRules GetDomainInboundIpRule[]
One or more inbound_ip_rule blocks as defined below.
inputMappingDefaultValues GetDomainInputMappingDefaultValue[]
A input_mapping_default_values block as defined below.
inputMappingFields GetDomainInputMappingField[]
A input_mapping_fields block as defined below.
inputSchema string
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
location string
The Azure Region in which this EventGrid Domain exists.
name string
primaryAccessKey string
The primary access key associated with the EventGrid Domain.
publicNetworkAccessEnabled boolean
Whether or not public network access is allowed for this server.
resourceGroupName string
secondaryAccessKey string
The secondary access key associated with the EventGrid Domain.
tags {[key: string]: string}
A mapping of tags assigned to the EventGrid Domain.
endpoint str
The Endpoint associated with the EventGrid Domain.
id str
The provider-assigned unique ID for this managed resource.
identities Sequence[GetDomainIdentity]
An identity block as documented below.
inbound_ip_rules Sequence[GetDomainInboundIpRule]
One or more inbound_ip_rule blocks as defined below.
input_mapping_default_values Sequence[GetDomainInputMappingDefaultValue]
A input_mapping_default_values block as defined below.
input_mapping_fields Sequence[GetDomainInputMappingField]
A input_mapping_fields block as defined below.
input_schema str
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
location str
The Azure Region in which this EventGrid Domain exists.
name str
primary_access_key str
The primary access key associated with the EventGrid Domain.
public_network_access_enabled bool
Whether or not public network access is allowed for this server.
resource_group_name str
secondary_access_key str
The secondary access key associated with the EventGrid Domain.
tags Mapping[str, str]
A mapping of tags assigned to the EventGrid Domain.
endpoint String
The Endpoint associated with the EventGrid Domain.
id String
The provider-assigned unique ID for this managed resource.
identities List<Property Map>
An identity block as documented below.
inboundIpRules List<Property Map>
One or more inbound_ip_rule blocks as defined below.
inputMappingDefaultValues List<Property Map>
A input_mapping_default_values block as defined below.
inputMappingFields List<Property Map>
A input_mapping_fields block as defined below.
inputSchema String
The schema in which incoming events will be published to this domain. Possible values are CloudEventSchemaV1_0, CustomEventSchema, or EventGridSchema.
location String
The Azure Region in which this EventGrid Domain exists.
name String
primaryAccessKey String
The primary access key associated with the EventGrid Domain.
publicNetworkAccessEnabled Boolean
Whether or not public network access is allowed for this server.
resourceGroupName String
secondaryAccessKey String
The secondary access key associated with the EventGrid Domain.
tags Map<String>
A mapping of tags assigned to the EventGrid Domain.

Supporting Types

GetDomainIdentity

IdentityIds This property is required. List<string>
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
PrincipalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity.
Type This property is required. string
The type of Managed Service Identity that is configured on this EventGrid Domain.
IdentityIds This property is required. []string
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
PrincipalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity.
Type This property is required. string
The type of Managed Service Identity that is configured on this EventGrid Domain.
identityIds This property is required. List<String>
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity.
type This property is required. String
The type of Managed Service Identity that is configured on this EventGrid Domain.
identityIds This property is required. string[]
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
principalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity.
tenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity.
type This property is required. string
The type of Managed Service Identity that is configured on this EventGrid Domain.
identity_ids This property is required. Sequence[str]
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
principal_id This property is required. str
The Principal ID of the System Assigned Managed Service Identity.
tenant_id This property is required. str
The Tenant ID of the System Assigned Managed Service Identity.
type This property is required. str
The type of Managed Service Identity that is configured on this EventGrid Domain.
identityIds This property is required. List<String>
The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity.
type This property is required. String
The type of Managed Service Identity that is configured on this EventGrid Domain.

GetDomainInboundIpRule

Action This property is required. string
The action to take when the rule is matched. Possible values are Allow.
IpMask This property is required. string
The IP mask (CIDR) to match on.
Action This property is required. string
The action to take when the rule is matched. Possible values are Allow.
IpMask This property is required. string
The IP mask (CIDR) to match on.
action This property is required. String
The action to take when the rule is matched. Possible values are Allow.
ipMask This property is required. String
The IP mask (CIDR) to match on.
action This property is required. string
The action to take when the rule is matched. Possible values are Allow.
ipMask This property is required. string
The IP mask (CIDR) to match on.
action This property is required. str
The action to take when the rule is matched. Possible values are Allow.
ip_mask This property is required. str
The IP mask (CIDR) to match on.
action This property is required. String
The action to take when the rule is matched. Possible values are Allow.
ipMask This property is required. String
The IP mask (CIDR) to match on.

GetDomainInputMappingDefaultValue

DataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
EventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
Subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
DataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
EventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
Subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
dataVersion This property is required. String
Specifies the default data version of the EventGrid Event associated with the domain.
eventType This property is required. String
Specifies the default event type of the EventGrid Event associated with the domain.
subject This property is required. String
Specifies the default subject of the EventGrid Event associated with the domain.
dataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
eventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
data_version This property is required. str
Specifies the default data version of the EventGrid Event associated with the domain.
event_type This property is required. str
Specifies the default event type of the EventGrid Event associated with the domain.
subject This property is required. str
Specifies the default subject of the EventGrid Event associated with the domain.
dataVersion This property is required. String
Specifies the default data version of the EventGrid Event associated with the domain.
eventType This property is required. String
Specifies the default event type of the EventGrid Event associated with the domain.
subject This property is required. String
Specifies the default subject of the EventGrid Event associated with the domain.

GetDomainInputMappingField

DataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
EventTime This property is required. string
Specifies the event time of the EventGrid Event associated with the domain.
EventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
Id This property is required. string
Specifies the id of the EventGrid Event associated with the domain.
Subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
Topic This property is required. string
Specifies the topic of the EventGrid Event associated with the domain.
DataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
EventTime This property is required. string
Specifies the event time of the EventGrid Event associated with the domain.
EventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
Id This property is required. string
Specifies the id of the EventGrid Event associated with the domain.
Subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
Topic This property is required. string
Specifies the topic of the EventGrid Event associated with the domain.
dataVersion This property is required. String
Specifies the default data version of the EventGrid Event associated with the domain.
eventTime This property is required. String
Specifies the event time of the EventGrid Event associated with the domain.
eventType This property is required. String
Specifies the default event type of the EventGrid Event associated with the domain.
id This property is required. String
Specifies the id of the EventGrid Event associated with the domain.
subject This property is required. String
Specifies the default subject of the EventGrid Event associated with the domain.
topic This property is required. String
Specifies the topic of the EventGrid Event associated with the domain.
dataVersion This property is required. string
Specifies the default data version of the EventGrid Event associated with the domain.
eventTime This property is required. string
Specifies the event time of the EventGrid Event associated with the domain.
eventType This property is required. string
Specifies the default event type of the EventGrid Event associated with the domain.
id This property is required. string
Specifies the id of the EventGrid Event associated with the domain.
subject This property is required. string
Specifies the default subject of the EventGrid Event associated with the domain.
topic This property is required. string
Specifies the topic of the EventGrid Event associated with the domain.
data_version This property is required. str
Specifies the default data version of the EventGrid Event associated with the domain.
event_time This property is required. str
Specifies the event time of the EventGrid Event associated with the domain.
event_type This property is required. str
Specifies the default event type of the EventGrid Event associated with the domain.
id This property is required. str
Specifies the id of the EventGrid Event associated with the domain.
subject This property is required. str
Specifies the default subject of the EventGrid Event associated with the domain.
topic This property is required. str
Specifies the topic of the EventGrid Event associated with the domain.
dataVersion This property is required. String
Specifies the default data version of the EventGrid Event associated with the domain.
eventTime This property is required. String
Specifies the event time of the EventGrid Event associated with the domain.
eventType This property is required. String
Specifies the default event type of the EventGrid Event associated with the domain.
id This property is required. String
Specifies the id of the EventGrid Event associated with the domain.
subject This property is required. String
Specifies the default subject of the EventGrid Event associated with the domain.
topic This property is required. String
Specifies the topic of the EventGrid Event associated with the domain.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi