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

com.pulumi.azure.loadtest.kotlin.LoadtestFunctions.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.loadtest.kotlin

import com.pulumi.azure.loadtest.LoadtestFunctions.getPlain
import com.pulumi.azure.loadtest.kotlin.inputs.GetPlainArgs
import com.pulumi.azure.loadtest.kotlin.inputs.GetPlainArgsBuilder
import com.pulumi.azure.loadtest.kotlin.outputs.GetResult
import com.pulumi.azure.loadtest.kotlin.outputs.GetResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

public object LoadtestFunctions {
    /**
     * Use this data source to access information about a Load Test Service.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.loadtest.get({
     *     resourceGroupName: "example-resources",
     *     name: "example-load-test",
     * });
     * export const loadTestId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.loadtest.get(resource_group_name="example-resources",
     *     name="example-load-test")
     * pulumi.export("loadTestId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.LoadTest.Get.Invoke(new()
     *     {
     *         ResourceGroupName = "example-resources",
     *         Name = "example-load-test",
     *     });
     *     return new Dictionary
     *     {
     *         ["loadTestId"] = example.Apply(getResult => getResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/loadtest"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := loadtest.Get(ctx, &loadtest.GetArgs{
     * 			ResourceGroupName: "example-resources",
     * 			Name:              "example-load-test",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("loadTestId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.loadtest.LoadtestFunctions;
     * import com.pulumi.azure.loadtest.inputs.GetArgs;
     * 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 = LoadtestFunctions.get(GetArgs.builder()
     *             .resourceGroupName("example-resources")
     *             .name("example-load-test")
     *             .build());
     *         ctx.export("loadTestId", example.applyValue(getResult -> getResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:loadtest:get
     *       Arguments:
     *         resourceGroupName: example-resources
     *         name: example-load-test
     * outputs:
     *   loadTestId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking get.
     * @return A collection of values returned by get.
     */
    public suspend fun `get`(argument: GetPlainArgs): GetResult =
        toKotlin(getPlain(argument.toJava()).await())

    /**
     * @see [get].
     * @param name The name of the Load Test Service.
     * @param resourceGroupName The name of the Resource Group in which the Load Test Service exists.
     * @return A collection of values returned by get.
     */
    public suspend fun `get`(name: String, resourceGroupName: String): GetResult {
        val argument = GetPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return toKotlin(getPlain(argument.toJava()).await())
    }

    /**
     * @see [get].
     * @param argument Builder for [com.pulumi.azure.loadtest.kotlin.inputs.GetPlainArgs].
     * @return A collection of values returned by get.
     */
    public suspend fun `get`(argument: suspend GetPlainArgsBuilder.() -> Unit): GetResult {
        val builder = GetPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return toKotlin(getPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy