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.EventgridFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.eventgrid.kotlin
import com.pulumi.azure.eventgrid.EventgridFunctions.getDomainPlain
import com.pulumi.azure.eventgrid.EventgridFunctions.getDomainTopicPlain
import com.pulumi.azure.eventgrid.EventgridFunctions.getSystemTopicPlain
import com.pulumi.azure.eventgrid.EventgridFunctions.getTopicPlain
import com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainPlainArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainPlainArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainTopicPlainArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainTopicPlainArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.GetSystemTopicPlainArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.GetSystemTopicPlainArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.inputs.GetTopicPlainArgs
import com.pulumi.azure.eventgrid.kotlin.inputs.GetTopicPlainArgsBuilder
import com.pulumi.azure.eventgrid.kotlin.outputs.GetDomainResult
import com.pulumi.azure.eventgrid.kotlin.outputs.GetDomainTopicResult
import com.pulumi.azure.eventgrid.kotlin.outputs.GetSystemTopicResult
import com.pulumi.azure.eventgrid.kotlin.outputs.GetTopicResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.eventgrid.kotlin.outputs.GetDomainResult.Companion.toKotlin as getDomainResultToKotlin
import com.pulumi.azure.eventgrid.kotlin.outputs.GetDomainTopicResult.Companion.toKotlin as getDomainTopicResultToKotlin
import com.pulumi.azure.eventgrid.kotlin.outputs.GetSystemTopicResult.Companion.toKotlin as getSystemTopicResultToKotlin
import com.pulumi.azure.eventgrid.kotlin.outputs.GetTopicResult.Companion.toKotlin as getTopicResultToKotlin
public object EventgridFunctions {
/**
* Use this data source to access information about an existing EventGrid Domain
* ## Example Usage
*
* ```typescript
* 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);
* ```
* ```python
* 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)
* ```
* ```csharp
* 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
* {
* ["eventgridDomainMappingTopic"] = example.Apply(getDomainResult => getDomainResult.InputMappingFields[0]?.Topic),
* };
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:eventgrid:getDomain
* Arguments:
* name: my-eventgrid-domain
* resourceGroupName: example-resources
* outputs:
* eventgridDomainMappingTopic: ${example.inputMappingFields[0].topic}
* ```
*
* @param argument A collection of arguments for invoking getDomain.
* @return A collection of values returned by getDomain.
*/
public suspend fun getDomain(argument: GetDomainPlainArgs): GetDomainResult =
getDomainResultToKotlin(getDomainPlain(argument.toJava()).await())
/**
* @see [getDomain].
* @param name The name of the EventGrid Domain resource.
* @param resourceGroupName The name of the resource group in which the EventGrid Domain exists.
* @return A collection of values returned by getDomain.
*/
public suspend fun getDomain(name: String, resourceGroupName: String): GetDomainResult {
val argument = GetDomainPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getDomainResultToKotlin(getDomainPlain(argument.toJava()).await())
}
/**
* @see [getDomain].
* @param argument Builder for [com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainPlainArgs].
* @return A collection of values returned by getDomain.
*/
public suspend fun getDomain(argument: suspend GetDomainPlainArgsBuilder.() -> Unit): GetDomainResult {
val builder = GetDomainPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDomainResultToKotlin(getDomainPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing EventGrid Domain Topic
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.eventgrid.getDomainTopic({
* name: "my-eventgrid-domain-topic",
* resourceGroupName: "example-resources",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.eventgrid.get_domain_topic(name="my-eventgrid-domain-topic",
* resource_group_name="example-resources")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.EventGrid.GetDomainTopic.Invoke(new()
* {
* Name = "my-eventgrid-domain-topic",
* ResourceGroupName = "example-resources",
* });
* });
* ```
* ```go
* 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 {
* _, err := eventgrid.LookupDomainTopic(ctx, &eventgrid.LookupDomainTopicArgs{
* Name: "my-eventgrid-domain-topic",
* ResourceGroupName: "example-resources",
* }, nil)
* 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.eventgrid.EventgridFunctions;
* import com.pulumi.azure.eventgrid.inputs.GetDomainTopicArgs;
* 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.getDomainTopic(GetDomainTopicArgs.builder()
* .name("my-eventgrid-domain-topic")
* .resourceGroupName("example-resources")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:eventgrid:getDomainTopic
* Arguments:
* name: my-eventgrid-domain-topic
* resourceGroupName: example-resources
* ```
*
* @param argument A collection of arguments for invoking getDomainTopic.
* @return A collection of values returned by getDomainTopic.
*/
public suspend fun getDomainTopic(argument: GetDomainTopicPlainArgs): GetDomainTopicResult =
getDomainTopicResultToKotlin(getDomainTopicPlain(argument.toJava()).await())
/**
* @see [getDomainTopic].
* @param domainName The name of the EventGrid Domain Topic domain.
* @param name The name of the EventGrid Domain Topic resource.
* @param resourceGroupName The name of the resource group in which the EventGrid Domain Topic exists.
* @return A collection of values returned by getDomainTopic.
*/
public suspend fun getDomainTopic(
domainName: String,
name: String,
resourceGroupName: String,
): GetDomainTopicResult {
val argument = GetDomainTopicPlainArgs(
domainName = domainName,
name = name,
resourceGroupName = resourceGroupName,
)
return getDomainTopicResultToKotlin(getDomainTopicPlain(argument.toJava()).await())
}
/**
* @see [getDomainTopic].
* @param argument Builder for [com.pulumi.azure.eventgrid.kotlin.inputs.GetDomainTopicPlainArgs].
* @return A collection of values returned by getDomainTopic.
*/
public suspend fun getDomainTopic(argument: suspend GetDomainTopicPlainArgsBuilder.() -> Unit): GetDomainTopicResult {
val builder = GetDomainTopicPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDomainTopicResultToKotlin(getDomainTopicPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing EventGrid System Topic
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.eventgrid.getSystemTopic({
* name: "eventgrid-system-topic",
* resourceGroupName: "example-resources",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.eventgrid.get_system_topic(name="eventgrid-system-topic",
* resource_group_name="example-resources")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.EventGrid.GetSystemTopic.Invoke(new()
* {
* Name = "eventgrid-system-topic",
* ResourceGroupName = "example-resources",
* });
* });
* ```
* ```go
* 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 {
* _, err := eventgrid.LookupSystemTopic(ctx, &eventgrid.LookupSystemTopicArgs{
* Name: "eventgrid-system-topic",
* ResourceGroupName: "example-resources",
* }, nil)
* 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.eventgrid.EventgridFunctions;
* import com.pulumi.azure.eventgrid.inputs.GetSystemTopicArgs;
* 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.getSystemTopic(GetSystemTopicArgs.builder()
* .name("eventgrid-system-topic")
* .resourceGroupName("example-resources")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:eventgrid:getSystemTopic
* Arguments:
* name: eventgrid-system-topic
* resourceGroupName: example-resources
* ```
*
* @param argument A collection of arguments for invoking getSystemTopic.
* @return A collection of values returned by getSystemTopic.
*/
public suspend fun getSystemTopic(argument: GetSystemTopicPlainArgs): GetSystemTopicResult =
getSystemTopicResultToKotlin(getSystemTopicPlain(argument.toJava()).await())
/**
* @see [getSystemTopic].
* @param name The name of the EventGrid System Topic resource.
* @param resourceGroupName The name of the resource group in which the EventGrid System Topic exists.
* @return A collection of values returned by getSystemTopic.
*/
public suspend fun getSystemTopic(name: String, resourceGroupName: String): GetSystemTopicResult {
val argument = GetSystemTopicPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getSystemTopicResultToKotlin(getSystemTopicPlain(argument.toJava()).await())
}
/**
* @see [getSystemTopic].
* @param argument Builder for [com.pulumi.azure.eventgrid.kotlin.inputs.GetSystemTopicPlainArgs].
* @return A collection of values returned by getSystemTopic.
*/
public suspend fun getSystemTopic(argument: suspend GetSystemTopicPlainArgsBuilder.() -> Unit): GetSystemTopicResult {
val builder = GetSystemTopicPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getSystemTopicResultToKotlin(getSystemTopicPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing EventGrid Topic
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.eventgrid.getTopic({
* name: "my-eventgrid-topic",
* resourceGroupName: "example-resources",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.eventgrid.get_topic(name="my-eventgrid-topic",
* resource_group_name="example-resources")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.EventGrid.GetTopic.Invoke(new()
* {
* Name = "my-eventgrid-topic",
* ResourceGroupName = "example-resources",
* });
* });
* ```
* ```go
* 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 {
* _, err := eventgrid.LookupTopic(ctx, &eventgrid.LookupTopicArgs{
* Name: "my-eventgrid-topic",
* ResourceGroupName: "example-resources",
* }, nil)
* 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.eventgrid.EventgridFunctions;
* import com.pulumi.azure.eventgrid.inputs.GetTopicArgs;
* 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.getTopic(GetTopicArgs.builder()
* .name("my-eventgrid-topic")
* .resourceGroupName("example-resources")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:eventgrid:getTopic
* Arguments:
* name: my-eventgrid-topic
* resourceGroupName: example-resources
* ```
*
* @param argument A collection of arguments for invoking getTopic.
* @return A collection of values returned by getTopic.
*/
public suspend fun getTopic(argument: GetTopicPlainArgs): GetTopicResult =
getTopicResultToKotlin(getTopicPlain(argument.toJava()).await())
/**
* @see [getTopic].
* @param name The name of the EventGrid Topic resource.
* @param resourceGroupName The name of the resource group in which the EventGrid Topic exists.
* @return A collection of values returned by getTopic.
*/
public suspend fun getTopic(name: String, resourceGroupName: String): GetTopicResult {
val argument = GetTopicPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getTopicResultToKotlin(getTopicPlain(argument.toJava()).await())
}
/**
* @see [getTopic].
* @param argument Builder for [com.pulumi.azure.eventgrid.kotlin.inputs.GetTopicPlainArgs].
* @return A collection of values returned by getTopic.
*/
public suspend fun getTopic(argument: suspend GetTopicPlainArgsBuilder.() -> Unit): GetTopicResult {
val builder = GetTopicPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getTopicResultToKotlin(getTopicPlain(builtArgument.toJava()).await())
}
}