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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

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

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.EventGrid.GetDomain.InvokeAsync(new Azure.EventGrid.GetDomainArgs
            {
                Name = "my-eventgrid-domain",
                ResourceGroupName = "example-resources",
            }));
            this.EventgridDomainMappingTopic = example.Apply(example => example.InputMappingFields?[0]?.Topic);
        }
    
        [Output("eventgridDomainMappingTopic")]
        public Output<string> EventgridDomainMappingTopic { get; set; }
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/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
    	})
    }
    

    Example coming soon!

    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);
    
    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)
    

    Example coming soon!

    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>
    def get_domain(inbound_ip_rules: Optional[Sequence[GetDomainInboundIpRule]] = None,
                   name: Optional[str] = None,
                   public_network_access_enabled: Optional[bool] = None,
                   resource_group_name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetDomainResult
    def get_domain_output(inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[GetDomainInboundIpRuleArgs]]]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   public_network_access_enabled: Optional[pulumi.Input[bool]] = None,
                   resource_group_name: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetDomainResult]
    func LookupDomain(ctx *Context, args *LookupDomainArgs, opts ...InvokeOption) (*LookupDomainResult, error)
    func LookupDomainOutput(ctx *Context, args *LookupDomainOutputArgs, opts ...InvokeOption) LookupDomainResultOutput

    > 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)
    }
    public static CompletableFuture<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
    public static Output<GetDomainResult> getDomain(GetDomainArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:eventgrid/getDomain:getDomain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the EventGrid Domain resource.
    ResourceGroupName string
    The name of the resource group in which the EventGrid Domain exists.
    InboundIpRules List<GetDomainInboundIpRule>
    One or more inbound_ip_rule blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the EventGrid Domain.
    Name string
    The name of the EventGrid Domain resource.
    ResourceGroupName string
    The name of the resource group in which the EventGrid Domain exists.
    InboundIpRules []GetDomainInboundIpRule
    One or more inbound_ip_rule blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server.
    Tags map[string]string
    A mapping of tags assigned to the EventGrid Domain.
    name String
    The name of the EventGrid Domain resource.
    resourceGroupName String
    The name of the resource group in which the EventGrid Domain exists.
    inboundIpRules List<GetDomainInboundIpRule>
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server.
    tags Map<String,String>
    A mapping of tags assigned to the EventGrid Domain.
    name string
    The name of the EventGrid Domain resource.
    resourceGroupName string
    The name of the resource group in which the EventGrid Domain exists.
    inboundIpRules GetDomainInboundIpRule[]
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server.
    tags {[key: string]: string}
    A mapping of tags assigned to the EventGrid Domain.
    name str
    The name of the EventGrid Domain resource.
    resource_group_name str
    The name of the resource group in which the EventGrid Domain exists.
    inbound_ip_rules Sequence[GetDomainInboundIpRule]
    One or more inbound_ip_rule blocks as defined below.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server.
    tags Mapping[str, str]
    A mapping of tags assigned to the EventGrid Domain.
    name String
    The name of the EventGrid Domain resource.
    resourceGroupName String
    The name of the resource group in which the EventGrid Domain exists.
    inboundIpRules List<Property Map>
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server.
    tags Map<String>
    A mapping of tags assigned to the EventGrid Domain.

    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.
    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.
    ResourceGroupName string
    SecondaryAccessKey string
    The secondary access key associated with the EventGrid Domain.
    InboundIpRules List<GetDomainInboundIpRule>
    One or more inbound_ip_rule blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server.
    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.
    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.
    ResourceGroupName string
    SecondaryAccessKey string
    The secondary access key associated with the EventGrid Domain.
    InboundIpRules []GetDomainInboundIpRule
    One or more inbound_ip_rule blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server.
    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.
    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.
    resourceGroupName String
    secondaryAccessKey String
    The secondary access key associated with the EventGrid Domain.
    inboundIpRules List<GetDomainInboundIpRule>
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server.
    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.
    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.
    resourceGroupName string
    secondaryAccessKey string
    The secondary access key associated with the EventGrid Domain.
    inboundIpRules GetDomainInboundIpRule[]
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server.
    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.
    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.
    resource_group_name str
    secondary_access_key str
    The secondary access key associated with the EventGrid Domain.
    inbound_ip_rules Sequence[GetDomainInboundIpRule]
    One or more inbound_ip_rule blocks as defined below.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server.
    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.
    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.
    resourceGroupName String
    secondaryAccessKey String
    The secondary access key associated with the EventGrid Domain.
    inboundIpRules List<Property Map>
    One or more inbound_ip_rule blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server.
    tags Map<String>
    A mapping of tags assigned to the EventGrid Domain.

    Supporting Types

    GetDomainInboundIpRule

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

    GetDomainInputMappingDefaultValue

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

    GetDomainInputMappingField

    DataVersion string
    Specifies the default data version of the EventGrid Event associated with the domain.
    EventTime string
    Specifies the event time of the EventGrid Event associated with the domain.
    EventType string
    Specifies the default event type of the EventGrid Event associated with the domain.
    Id string
    Specifies the id of the EventGrid Event associated with the domain.
    Subject string
    Specifies the default subject of the EventGrid Event associated with the domain.
    Topic string
    Specifies the topic of the EventGrid Event associated with the domain.
    DataVersion string
    Specifies the default data version of the EventGrid Event associated with the domain.
    EventTime string
    Specifies the event time of the EventGrid Event associated with the domain.
    EventType string
    Specifies the default event type of the EventGrid Event associated with the domain.
    Id string
    Specifies the id of the EventGrid Event associated with the domain.
    Subject string
    Specifies the default subject of the EventGrid Event associated with the domain.
    Topic string
    Specifies the topic of the EventGrid Event associated with the domain.
    dataVersion String
    Specifies the default data version of the EventGrid Event associated with the domain.
    eventTime String
    Specifies the event time of the EventGrid Event associated with the domain.
    eventType String
    Specifies the default event type of the EventGrid Event associated with the domain.
    id String
    Specifies the id of the EventGrid Event associated with the domain.
    subject String
    Specifies the default subject of the EventGrid Event associated with the domain.
    topic String
    Specifies the topic of the EventGrid Event associated with the domain.
    dataVersion string
    Specifies the default data version of the EventGrid Event associated with the domain.
    eventTime string
    Specifies the event time of the EventGrid Event associated with the domain.
    eventType string
    Specifies the default event type of the EventGrid Event associated with the domain.
    id string
    Specifies the id of the EventGrid Event associated with the domain.
    subject string
    Specifies the default subject of the EventGrid Event associated with the domain.
    topic string
    Specifies the topic of the EventGrid Event associated with the domain.
    data_version str
    Specifies the default data version of the EventGrid Event associated with the domain.
    event_time str
    Specifies the event time of the EventGrid Event associated with the domain.
    event_type str
    Specifies the default event type of the EventGrid Event associated with the domain.
    id str
    Specifies the id of the EventGrid Event associated with the domain.
    subject str
    Specifies the default subject of the EventGrid Event associated with the domain.
    topic str
    Specifies the topic of the EventGrid Event associated with the domain.
    dataVersion String
    Specifies the default data version of the EventGrid Event associated with the domain.
    eventTime String
    Specifies the event time of the EventGrid Event associated with the domain.
    eventType String
    Specifies the default event type of the EventGrid Event associated with the domain.
    id String
    Specifies the id of the EventGrid Event associated with the domain.
    subject String
    Specifies the default subject of the EventGrid Event associated with the domain.
    topic 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.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.