Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.eventgrid.kotlin
import com.pulumi.azurenative.eventgrid.TopicArgs.builder
import com.pulumi.azurenative.eventgrid.kotlin.enums.DataResidencyBoundary
import com.pulumi.azurenative.eventgrid.kotlin.enums.InputSchema
import com.pulumi.azurenative.eventgrid.kotlin.enums.PublicNetworkAccess
import com.pulumi.azurenative.eventgrid.kotlin.inputs.IdentityInfoArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.IdentityInfoArgsBuilder
import com.pulumi.azurenative.eventgrid.kotlin.inputs.InboundIpRuleArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.InboundIpRuleArgsBuilder
import com.pulumi.azurenative.eventgrid.kotlin.inputs.JsonInputSchemaMappingArgs
import com.pulumi.azurenative.eventgrid.kotlin.inputs.JsonInputSchemaMappingArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* EventGrid Topic
* Azure REST API version: 2022-06-15. Prior API version in Azure Native 1.x: 2020-06-01.
* Other available API versions: 2020-04-01-preview, 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview.
* ## Example Usage
* ### Topics_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var topic = new AzureNative.EventGrid.Topic("topic", new()
* {
* InboundIpRules = new[]
* {
* new AzureNative.EventGrid.Inputs.InboundIpRuleArgs
* {
* Action = AzureNative.EventGrid.IpActionType.Allow,
* IpMask = "12.18.30.15",
* },
* new AzureNative.EventGrid.Inputs.InboundIpRuleArgs
* {
* Action = AzureNative.EventGrid.IpActionType.Allow,
* IpMask = "12.18.176.1",
* },
* },
* Location = "westus2",
* PublicNetworkAccess = AzureNative.EventGrid.PublicNetworkAccess.Enabled,
* ResourceGroupName = "examplerg",
* Tags =
* {
* { "tag1", "value1" },
* { "tag2", "value2" },
* },
* TopicName = "exampletopic1",
* });
* });
* ```
* ```go
* package main
* import (
* eventgrid "github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := eventgrid.NewTopic(ctx, "topic", &eventgrid.TopicArgs{
* InboundIpRules: eventgrid.InboundIpRuleArray{
* &eventgrid.InboundIpRuleArgs{
* Action: pulumi.String(eventgrid.IpActionTypeAllow),
* IpMask: pulumi.String("12.18.30.15"),
* },
* &eventgrid.InboundIpRuleArgs{
* Action: pulumi.String(eventgrid.IpActionTypeAllow),
* IpMask: pulumi.String("12.18.176.1"),
* },
* },
* Location: pulumi.String("westus2"),
* PublicNetworkAccess: pulumi.String(eventgrid.PublicNetworkAccessEnabled),
* ResourceGroupName: pulumi.String("examplerg"),
* Tags: pulumi.StringMap{
* "tag1": pulumi.String("value1"),
* "tag2": pulumi.String("value2"),
* },
* TopicName: pulumi.String("exampletopic1"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.eventgrid.Topic;
* import com.pulumi.azurenative.eventgrid.TopicArgs;
* import com.pulumi.azurenative.eventgrid.inputs.InboundIpRuleArgs;
* 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) {
* var topic = new Topic("topic", TopicArgs.builder()
* .inboundIpRules(
* InboundIpRuleArgs.builder()
* .action("Allow")
* .ipMask("12.18.30.15")
* .build(),
* InboundIpRuleArgs.builder()
* .action("Allow")
* .ipMask("12.18.176.1")
* .build())
* .location("westus2")
* .publicNetworkAccess("Enabled")
* .resourceGroupName("examplerg")
* .tags(Map.ofEntries(
* Map.entry("tag1", "value1"),
* Map.entry("tag2", "value2")
* ))
* .topicName("exampletopic1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:eventgrid:Topic exampletopic1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
* ```
* @property dataResidencyBoundary Data Residency Boundary of the resource.
* @property disableLocalAuth This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
* @property identity Identity information for the resource.
* @property inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
* @property inputSchema This determines the format that Event Grid should expect for incoming events published to the topic.
* @property inputSchemaMapping This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
* @property location Location of the resource.
* @property publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
* You can further restrict to specific IPs by configuring
* @property resourceGroupName The name of the resource group within the user's subscription.
* @property tags Tags of the resource.
* @property topicName Name of the topic.
*/
public data class TopicArgs(
public val dataResidencyBoundary: Output>? = null,
public val disableLocalAuth: Output? = null,
public val identity: Output? = null,
public val inboundIpRules: Output>? = null,
public val inputSchema: Output>? = null,
public val inputSchemaMapping: Output? = null,
public val location: Output? = null,
public val publicNetworkAccess: Output>? = null,
public val resourceGroupName: Output? = null,
public val tags: Output