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

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.eventgrid.getDomain

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 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);
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:eventgrid:getDomain
          Arguments:
            name: my-eventgrid-domain
            resourceGroupName: example-resources
    outputs:
      eventgridDomainMappingTopic: ${example.inputMappingFields[0].topic}
    

    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(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]
    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)
    // Output-based functions aren't available in Java yet
    
    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.
    Name string
    The name of the EventGrid Domain resource.
    ResourceGroupName string
    The name of the resource group in which the EventGrid Domain exists.
    name String
    The name of the EventGrid Domain resource.
    resourceGroupName String
    The name of the resource group in which the EventGrid Domain exists.
    name string
    The name of the EventGrid Domain resource.
    resourceGroupName string
    The name of the resource group in which the EventGrid Domain exists.
    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.
    name String
    The name of the EventGrid Domain resource.
    resourceGroupName 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 List<string>
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity.
    Type string
    The type of Managed Service Identity that is configured on this EventGrid Domain.
    IdentityIds []string
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity.
    Type string
    The type of Managed Service Identity that is configured on this EventGrid Domain.
    identityIds List<String>
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity.
    type String
    The type of Managed Service Identity that is configured on this EventGrid Domain.
    identityIds string[]
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    principalId string
    The Principal ID of the System Assigned Managed Service Identity.
    tenantId string
    The Tenant ID of the System Assigned Managed Service Identity.
    type string
    The type of Managed Service Identity that is configured on this EventGrid Domain.
    identity_ids Sequence[str]
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    principal_id str
    The Principal ID of the System Assigned Managed Service Identity.
    tenant_id str
    The Tenant ID of the System Assigned Managed Service Identity.
    type str
    The type of Managed Service Identity that is configured on this EventGrid Domain.
    identityIds List<String>
    The list of User Assigned Managed Identity IDs assigned to this EventGrid Domain.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity.
    type String
    The type of Managed Service Identity that is configured on this EventGrid Domain.

    GetDomainInboundIpRule

    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.
    ipMask string
    The IP mask (CIDR) to match on.
    action str
    The action to take when the rule is matched. Possible values are Allow.
    ip_mask str
    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.

    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.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi