Topic
Manages an EventGrid Topic
Note: at this time EventGrid Topic’s are only available in a limited number of regions.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US 2",
});
var exampleTopic = new Azure.EventGrid.Topic("exampleTopic", new Azure.EventGrid.TopicArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Tags =
{
{ "environment", "Production" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West US 2"),
})
if err != nil {
return err
}
_, err = eventgrid.NewTopic(ctx, "exampleTopic", &eventgrid.TopicArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Tags: pulumi.Map{
"environment": pulumi.String("Production"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US 2")
example_topic = azure.eventgrid.Topic("exampleTopic",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
tags={
"environment": "Production",
})import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US 2"});
const exampleTopic = new azure.eventgrid.Topic("exampleTopic", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
tags: {
environment: "Production",
},
});Create a Topic Resource
new Topic(name: string, args: TopicArgs, opts?: CustomResourceOptions);def Topic(resource_name, opts=None, input_mapping_default_values=None, input_mapping_fields=None, input_schema=None, location=None, name=None, resource_group_name=None, tags=None, __props__=None);public Topic(string name, TopicArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Topic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Topic resource accepts the following input properties:
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- Input
Mapping TopicDefault Values Input Mapping Default Values Args A
input_mapping_default_valuesblock as defined below.- Input
Mapping TopicFields Input Mapping Fields Args A
input_mapping_fieldsblock as defined below.- Input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- Input
Mapping TopicDefault Values Input Mapping Default Values A
input_mapping_default_valuesblock as defined below.- Input
Mapping TopicFields Input Mapping Fields A
input_mapping_fieldsblock as defined below.- Input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- input
Mapping TopicDefault Values Input Mapping Default Values A
input_mapping_default_valuesblock as defined below.- input
Mapping TopicFields Input Mapping Fields A
input_mapping_fieldsblock as defined below.- input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- resource_
group_ strname The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- input_
mapping_ Dict[Topicdefault_ values Input Mapping Default Values] A
input_mapping_default_valuesblock as defined below.- input_
mapping_ Dict[Topicfields Input Mapping Fields] A
input_mapping_fieldsblock as defined below.- input_
schema str Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- endpoint string
The Endpoint associated with the EventGrid Topic.
- id string
- The provider-assigned unique ID for this managed resource.
- primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- endpoint str
The Endpoint associated with the EventGrid Topic.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_
access_ strkey The Primary Shared Access Key associated with the EventGrid Topic.
- secondary_
access_ strkey The Secondary Shared Access Key associated with the EventGrid Topic.
Look up an Existing Topic Resource
Get an existing Topic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TopicState, opts?: CustomResourceOptions): Topicstatic get(resource_name, id, opts=None, endpoint=None, input_mapping_default_values=None, input_mapping_fields=None, input_schema=None, location=None, name=None, primary_access_key=None, resource_group_name=None, secondary_access_key=None, tags=None, __props__=None);func GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Input
Mapping TopicDefault Values Input Mapping Default Values Args A
input_mapping_default_valuesblock as defined below.- Input
Mapping TopicFields Input Mapping Fields Args A
input_mapping_fieldsblock as defined below.- Input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Endpoint string
The Endpoint associated with the EventGrid Topic.
- Input
Mapping TopicDefault Values Input Mapping Default Values A
input_mapping_default_valuesblock as defined below.- Input
Mapping TopicFields Input Mapping Fields A
input_mapping_fieldsblock as defined below.- Input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- Primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- Resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- Secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- map[string]string
A mapping of tags to assign to the resource.
- endpoint string
The Endpoint associated with the EventGrid Topic.
- input
Mapping TopicDefault Values Input Mapping Default Values A
input_mapping_default_valuesblock as defined below.- input
Mapping TopicFields Input Mapping Fields A
input_mapping_fieldsblock as defined below.- input
Schema string Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- primary
Access stringKey The Primary Shared Access Key associated with the EventGrid Topic.
- resource
Group stringName The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- secondary
Access stringKey The Secondary Shared Access Key associated with the EventGrid Topic.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- endpoint str
The Endpoint associated with the EventGrid Topic.
- input_
mapping_ Dict[Topicdefault_ values Input Mapping Default Values] A
input_mapping_default_valuesblock as defined below.- input_
mapping_ Dict[Topicfields Input Mapping Fields] A
input_mapping_fieldsblock as defined below.- input_
schema str Specifies the schema in which incoming events will be published to this domain. Allowed values are
CloudEventSchemaV1_0,CustomEventSchema, orEventGridSchema. Defaults toEventGridSchema. Changing this forces a new resource to be created.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
- primary_
access_ strkey The Primary Shared Access Key associated with the EventGrid Topic.
- resource_
group_ strname The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
- secondary_
access_ strkey The Secondary Shared Access Key associated with the EventGrid Topic.
- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
TopicInputMappingDefaultValues
- Data
Version string Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Type string Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Subject string
Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Data
Version string Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Type string Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Subject string
Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- data
Version string Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Type string Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- subject string
Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- data
Version str Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Type str Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- subject str
Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
TopicInputMappingFields
- Data
Version string Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Time string Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Type string Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Id string
Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Subject string
Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Topic string
Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Data
Version string Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Time string Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Event
Type string Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Id string
Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Subject string
Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- Topic string
Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- data
Version string Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Time string Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Type string Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- id string
Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- subject string
Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- topic string
Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- data
Version str Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Time str Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- event
Type str Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- id str
Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- subject str
Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
- topic str
Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.