All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.signalr.kotlin.SignalrFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.signalr.kotlin

import com.pulumi.azure.signalr.SignalrFunctions.getServicePlain
import com.pulumi.azure.signalr.kotlin.inputs.GetServicePlainArgs
import com.pulumi.azure.signalr.kotlin.inputs.GetServicePlainArgsBuilder
import com.pulumi.azure.signalr.kotlin.outputs.GetServiceResult
import com.pulumi.azure.signalr.kotlin.outputs.GetServiceResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

public object SignalrFunctions {
    /**
     * Use this data source to access information about an existing Azure SignalR service.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.signalr.getService({
     *     name: "test-signalr",
     *     resourceGroupName: "signalr-resource-group",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.signalr.get_service(name="test-signalr",
     *     resource_group_name="signalr-resource-group")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.SignalR.GetService.Invoke(new()
     *     {
     *         Name = "test-signalr",
     *         ResourceGroupName = "signalr-resource-group",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/signalr"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := signalr.LookupService(ctx, &signalr.LookupServiceArgs{
     * 			Name:              "test-signalr",
     * 			ResourceGroupName: "signalr-resource-group",
     * 		}, 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.signalr.SignalrFunctions;
     * import com.pulumi.azure.signalr.inputs.GetServiceArgs;
     * 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 = SignalrFunctions.getService(GetServiceArgs.builder()
     *             .name("test-signalr")
     *             .resourceGroupName("signalr-resource-group")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:signalr:getService
     *       Arguments:
     *         name: test-signalr
     *         resourceGroupName: signalr-resource-group
     * ```
     * 
     * @param argument A collection of arguments for invoking getService.
     * @return A collection of values returned by getService.
     */
    public suspend fun getService(argument: GetServicePlainArgs): GetServiceResult =
        toKotlin(getServicePlain(argument.toJava()).await())

    /**
     * @see [getService].
     * @param name Specifies the name of the SignalR service.
     * @param resourceGroupName Specifies the name of the resource group the SignalR service is located in.
     * @return A collection of values returned by getService.
     */
    public suspend fun getService(name: String, resourceGroupName: String): GetServiceResult {
        val argument = GetServicePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return toKotlin(getServicePlain(argument.toJava()).await())
    }

    /**
     * @see [getService].
     * @param argument Builder for [com.pulumi.azure.signalr.kotlin.inputs.GetServicePlainArgs].
     * @return A collection of values returned by getService.
     */
    public suspend fun getService(argument: suspend GetServicePlainArgsBuilder.() -> Unit):
        GetServiceResult {
        val builder = GetServicePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return toKotlin(getServicePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy