GetTopic
Use this data source to access information about an existing EventGrid Topic
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.EventGrid.GetTopic.InvokeAsync(new Azure.EventGrid.GetTopicArgs
{
Name = "my-eventgrid-topic",
ResourceGroupName = "example-resources",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/eventgrid"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventgrid.LookupTopic(ctx, &eventgrid.LookupTopicArgs{
Name: "my-eventgrid-topic",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.eventgrid.get_topic(name="my-eventgrid-topic",
resource_group_name="example-resources")import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.eventgrid.getTopic({
name: "my-eventgrid-topic",
resourceGroupName: "example-resources",
}, { async: true }));Using GetTopic
function getTopic(args: GetTopicArgs, opts?: InvokeOptions): Promise<GetTopicResult>function get_topic(name=None, resource_group_name=None, tags=None, opts=None)func LookupTopic(ctx *Context, args *LookupTopicArgs, opts ...InvokeOption) (*LookupTopicResult, error)Note: This function is named
LookupTopicin the Go SDK.
public static class GetTopic {
public static Task<GetTopicResult> InvokeAsync(GetTopicArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the EventGrid Topic resource.
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists.
- Dictionary<string, string>
- Name string
The name of the EventGrid Topic resource.
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists.
- map[string]string
- name string
The name of the EventGrid Topic resource.
- resource
Group stringName The name of the resource group in which the EventGrid Topic exists.
- {[key: string]: string}
- name str
The name of the EventGrid Topic resource.
- resource_
group_ strname The name of the resource group in which the EventGrid Topic exists.
- Dict[str, str]
GetTopic Result
The following output properties are available:
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Resource
Group stringName - Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- Dictionary<string, string>
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Resource
Group stringName - Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- map[string]string
- endpoint string
The Endpoint associated with the EventGrid Topic.
- id string
The provider-assigned unique ID for this managed resource.
- location string
- name string
- primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- resource
Group stringName - secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- {[key: string]: string}
- endpoint str
The Endpoint associated with the EventGrid Topic.
- id str
The provider-assigned unique ID for this managed resource.
- location str
- name str
- primary_
access_ strkey The Primary Shared Access Key associated with the EventGrid Topic.
- resource_
group_ strname - secondary_
access_ strkey The Secondary Shared Access Key associated with the EventGrid Topic.
- Dict[str, str]
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.