We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.eventgrid.getDomainTopic
Explore with Pulumi AI
Use this data source to access information about an existing EventGrid Domain Topic
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.eventgrid.getDomainTopic({
    name: "my-eventgrid-domain-topic",
    resourceGroupName: "example-resources",
});
import pulumi
import pulumi_azure as azure
example = azure.eventgrid.get_domain_topic(name="my-eventgrid-domain-topic",
    resource_group_name="example-resources")
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 {
		_, err := eventgrid.LookupDomainTopic(ctx, &eventgrid.LookupDomainTopicArgs{
			Name:              "my-eventgrid-domain-topic",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.EventGrid.GetDomainTopic.Invoke(new()
    {
        Name = "my-eventgrid-domain-topic",
        ResourceGroupName = "example-resources",
    });
});
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.GetDomainTopicArgs;
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.getDomainTopic(GetDomainTopicArgs.builder()
            .name("my-eventgrid-domain-topic")
            .resourceGroupName("example-resources")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:eventgrid:getDomainTopic
      arguments:
        name: my-eventgrid-domain-topic
        resourceGroupName: example-resources
Using getDomainTopic
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 getDomainTopic(args: GetDomainTopicArgs, opts?: InvokeOptions): Promise<GetDomainTopicResult>
function getDomainTopicOutput(args: GetDomainTopicOutputArgs, opts?: InvokeOptions): Output<GetDomainTopicResult>def get_domain_topic(domain_name: Optional[str] = None,
                     name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDomainTopicResult
def get_domain_topic_output(domain_name: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDomainTopicResult]func LookupDomainTopic(ctx *Context, args *LookupDomainTopicArgs, opts ...InvokeOption) (*LookupDomainTopicResult, error)
func LookupDomainTopicOutput(ctx *Context, args *LookupDomainTopicOutputArgs, opts ...InvokeOption) LookupDomainTopicResultOutput> Note: This function is named LookupDomainTopic in the Go SDK.
public static class GetDomainTopic 
{
    public static Task<GetDomainTopicResult> InvokeAsync(GetDomainTopicArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainTopicResult> Invoke(GetDomainTopicInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDomainTopicResult> getDomainTopic(GetDomainTopicArgs args, InvokeOptions options)
public static Output<GetDomainTopicResult> getDomainTopic(GetDomainTopicArgs args, InvokeOptions options)
fn::invoke:
  function: azure:eventgrid/getDomainTopic:getDomainTopic
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DomainName string
- The name of the EventGrid Domain Topic domain.
- Name string
- The name of the EventGrid Domain Topic resource.
- ResourceGroup stringName 
- The name of the resource group in which the EventGrid Domain Topic exists.
- DomainName string
- The name of the EventGrid Domain Topic domain.
- Name string
- The name of the EventGrid Domain Topic resource.
- ResourceGroup stringName 
- The name of the resource group in which the EventGrid Domain Topic exists.
- domainName String
- The name of the EventGrid Domain Topic domain.
- name String
- The name of the EventGrid Domain Topic resource.
- resourceGroup StringName 
- The name of the resource group in which the EventGrid Domain Topic exists.
- domainName string
- The name of the EventGrid Domain Topic domain.
- name string
- The name of the EventGrid Domain Topic resource.
- resourceGroup stringName 
- The name of the resource group in which the EventGrid Domain Topic exists.
- domain_name str
- The name of the EventGrid Domain Topic domain.
- name str
- The name of the EventGrid Domain Topic resource.
- resource_group_ strname 
- The name of the resource group in which the EventGrid Domain Topic exists.
- domainName String
- The name of the EventGrid Domain Topic domain.
- name String
- The name of the EventGrid Domain Topic resource.
- resourceGroup StringName 
- The name of the resource group in which the EventGrid Domain Topic exists.
getDomainTopic Result
The following output properties are available:
- DomainName string
- The EventGrid Domain Topic Domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- ResourceGroup stringName 
- DomainName string
- The EventGrid Domain Topic Domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- ResourceGroup stringName 
- domainName String
- The EventGrid Domain Topic Domain name.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- resourceGroup StringName 
- domainName string
- The EventGrid Domain Topic Domain name.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- resourceGroup stringName 
- domain_name str
- The EventGrid Domain Topic Domain name.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- resource_group_ strname 
- domainName String
- The EventGrid Domain Topic Domain name.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- resourceGroup StringName 
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.