Please wait. This can take some minutes ...
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.
com.pulumi.azure.eventgrid.kotlin.SystemTopicArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.eventgrid.kotlin
import com.pulumi.azure.eventgrid.SystemTopicArgs.builder
import com.pulumi.azure.eventgrid.kotlin.inputs.SystemTopicIdentityArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.SystemTopicIdentityArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Event Grid System Topic.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAccount = new azure.storage.Account("example", {
* name: "examplestoracct",
* resourceGroupName: example.name,
* location: example.location,
* accountTier: "Standard",
* accountReplicationType: "LRS",
* tags: {
* environment: "staging",
* },
* });
* const exampleSystemTopic = new azure.eventgrid.SystemTopic("example", {
* name: "example-topic",
* resourceGroupName: example.name,
* location: example.location,
* sourceArmResourceId: exampleAccount.id,
* topicType: "Microsoft.Storage.StorageAccounts",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_account = azure.storage.Account("example",
* name="examplestoracct",
* resource_group_name=example.name,
* location=example.location,
* account_tier="Standard",
* account_replication_type="LRS",
* tags={
* "environment": "staging",
* })
* example_system_topic = azure.eventgrid.SystemTopic("example",
* name="example-topic",
* resource_group_name=example.name,
* location=example.location,
* source_arm_resource_id=example_account.id,
* topic_type="Microsoft.Storage.StorageAccounts")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAccount = new Azure.Storage.Account("example", new()
* {
* Name = "examplestoracct",
* ResourceGroupName = example.Name,
* Location = example.Location,
* AccountTier = "Standard",
* AccountReplicationType = "LRS",
* Tags =
* {
* { "environment", "staging" },
* },
* });
* var exampleSystemTopic = new Azure.EventGrid.SystemTopic("example", new()
* {
* Name = "example-topic",
* ResourceGroupName = example.Name,
* Location = example.Location,
* SourceArmResourceId = exampleAccount.Id,
* TopicType = "Microsoft.Storage.StorageAccounts",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventgrid"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
* Name: pulumi.String("examplestoracct"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* AccountTier: pulumi.String("Standard"),
* AccountReplicationType: pulumi.String("LRS"),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("staging"),
* },
* })
* if err != nil {
* return err
* }
* _, err = eventgrid.NewSystemTopic(ctx, "example", &eventgrid.SystemTopicArgs{
* Name: pulumi.String("example-topic"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* SourceArmResourceId: exampleAccount.ID(),
* TopicType: pulumi.String("Microsoft.Storage.StorageAccounts"),
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.eventgrid.SystemTopic;
* import com.pulumi.azure.eventgrid.SystemTopicArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("examplestoracct")
* .resourceGroupName(example.name())
* .location(example.location())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .tags(Map.of("environment", "staging"))
* .build());
* var exampleSystemTopic = new SystemTopic("exampleSystemTopic", SystemTopicArgs.builder()
* .name("example-topic")
* .resourceGroupName(example.name())
* .location(example.location())
* .sourceArmResourceId(exampleAccount.id())
* .topicType("Microsoft.Storage.StorageAccounts")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:storage:Account
* name: example
* properties:
* name: examplestoracct
* resourceGroupName: ${example.name}
* location: ${example.location}
* accountTier: Standard
* accountReplicationType: LRS
* tags:
* environment: staging
* exampleSystemTopic:
* type: azure:eventgrid:SystemTopic
* name: example
* properties:
* name: example-topic
* resourceGroupName: ${example.name}
* location: ${example.location}
* sourceArmResourceId: ${exampleAccount.id}
* topicType: Microsoft.Storage.StorageAccounts
* ```
*
* ## Import
* Event Grid System Topic can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:eventgrid/systemTopic:SystemTopic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/systemTopic1
* ```
* @property identity An `identity` block as defined below.
* @property location The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
* @property name The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
* @property resourceGroupName The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
* @property sourceArmResourceId The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
* @property tags
* @property topicType The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
* > **NOTE:** Some `topic_type`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
* > **NOTE:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
*/
public data class SystemTopicArgs(
public val identity: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val sourceArmResourceId: Output? = null,
public val tags: Output>? = null,
public val topicType: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.eventgrid.SystemTopicArgs =
com.pulumi.azure.eventgrid.SystemTopicArgs.builder()
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sourceArmResourceId(sourceArmResourceId?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.topicType(topicType?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SystemTopicArgs].
*/
@PulumiTagMarker
public class SystemTopicArgsBuilder internal constructor() {
private var identity: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var sourceArmResourceId: Output? = null
private var tags: Output>? = null
private var topicType: Output? = null
/**
* @param value An `identity` block as defined below.
*/
@JvmName("aylyavfrbqeitoak")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("alifqblpufdahlia")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("gmxghvhcqphijufr")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("exjmwdagemmdeusu")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("guyyvdgwbbnfykjj")
public suspend fun sourceArmResourceId(`value`: Output) {
this.sourceArmResourceId = value
}
/**
* @param value
*/
@JvmName("wttniydlkbxgctbx")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
* > **NOTE:** Some `topic_type`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
* > **NOTE:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
*/
@JvmName("ceiimyjhjgkoxvnb")
public suspend fun topicType(`value`: Output) {
this.topicType = value
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("suasjbgqxvrupkvj")
public suspend fun identity(`value`: SystemTopicIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
*/
@JvmName("clxeqhwvipfwubgg")
public suspend fun identity(argument: suspend SystemTopicIdentityArgsBuilder.() -> Unit) {
val toBeMapped = SystemTopicIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("qkdhnxfpgqcmnjdw")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("tdrhutobpmjxpjdy")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("tukyajafqbuvfpyc")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
*/
@JvmName("shtmcxnpmkkbbmjo")
public suspend fun sourceArmResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceArmResourceId = mapped
}
/**
* @param value
*/
@JvmName("jcljdrgirbggvigl")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values
*/
@JvmName("chwbnakcpgedfinm")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
* > **NOTE:** Some `topic_type`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
* > **NOTE:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
*/
@JvmName("uyiagbbdhvvbqhyr")
public suspend fun topicType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.topicType = mapped
}
internal fun build(): SystemTopicArgs = SystemTopicArgs(
identity = identity,
location = location,
name = name,
resourceGroupName = resourceGroupName,
sourceArmResourceId = sourceArmResourceId,
tags = tags,
topicType = topicType,
)
}