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

com.pulumi.azure.loadtest.kotlin.LoadTestArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.loadtest.kotlin

import com.pulumi.azure.loadtest.LoadTestArgs.builder
import com.pulumi.azure.loadtest.kotlin.inputs.LoadTestEncryptionArgs
import com.pulumi.azure.loadtest.kotlin.inputs.LoadTestEncryptionArgsBuilder
import com.pulumi.azure.loadtest.kotlin.inputs.LoadTestIdentityArgs
import com.pulumi.azure.loadtest.kotlin.inputs.LoadTestIdentityArgsBuilder
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 a Load Test Service.
 * ## 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 exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const exampleLoadTest = new azure.loadtest.LoadTest("example", {
 *     location: example.location,
 *     name: "example",
 *     resourceGroupName: example.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
 *     name="example",
 *     resource_group_name=example.name,
 *     location=example.location)
 * example_load_test = azure.loadtest.LoadTest("example",
 *     location=example.location,
 *     name="example",
 *     resource_group_name=example.name)
 * ```
 * ```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 exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var exampleLoadTest = new Azure.LoadTest.LoadTest("example", new()
 *     {
 *         Location = example.Location,
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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 := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = loadtest.NewLoadTest(ctx, "example", &loadtest.LoadTestArgs{
 * 			Location:          example.Location,
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		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.authorization.UserAssignedIdentity;
 * import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
 * import com.pulumi.azure.loadtest.LoadTest;
 * import com.pulumi.azure.loadtest.LoadTestArgs;
 * 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 exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var exampleLoadTest = new LoadTest("exampleLoadTest", LoadTestArgs.builder()
 *             .location(example.location())
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleUserAssignedIdentity:
 *     type: azure:authorization:UserAssignedIdentity
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   exampleLoadTest:
 *     type: azure:loadtest:LoadTest
 *     name: example
 *     properties:
 *       location: ${example.location}
 *       name: example
 *       resourceGroupName: ${example.name}
 * ```
 * 
 * ## Import
 * An existing Load Test can be imported into Terraform using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:loadtest/loadTest:LoadTest example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName}
 * ```
 * * Where `{subscriptionId}` is the ID of the Azure Subscription where the Load Test exists. For example `12345678-1234-9876-4563-123456789012`.
 * * Where `{resourceGroupName}` is the name of Resource Group where this Load Test exists. For example `example-resource-group`.
 * * Where `{loadTestName}` is the name of the Load Test. For example `loadTestValue`.
 * @property description Description of the resource. Changing this forces a new Load Test to be created.
 * @property encryption An `encryption` block as defined below. Changing this forces a new Load Test to be created.
 * @property identity An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
 * @property location The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
 * @property name Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
 * @property resourceGroupName Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
 * @property tags A mapping of tags which should be assigned to the Load Test.
 */
public data class LoadTestArgs(
    public val description: Output? = null,
    public val encryption: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.loadtest.LoadTestArgs =
        com.pulumi.azure.loadtest.LoadTestArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LoadTestArgs].
 */
@PulumiTagMarker
public class LoadTestArgsBuilder internal constructor() {
    private var description: Output? = null

    private var encryption: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Description of the resource. Changing this forces a new Load Test to be created.
     */
    @JvmName("cehcdfbsrkmsdwda")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value An `encryption` block as defined below. Changing this forces a new Load Test to be created.
     */
    @JvmName("gktosgimdgywflkd")
    public suspend fun encryption(`value`: Output) {
        this.encryption = value
    }

    /**
     * @param value An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
     */
    @JvmName("pkwbfsecdeqbacaf")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
     */
    @JvmName("cfubhgtuysmtmauy")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
     */
    @JvmName("umtbcgtakrjnwhlb")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
     */
    @JvmName("sewlivqbihkanlrn")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Load Test.
     */
    @JvmName("tjilqueklkegucrp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Description of the resource. Changing this forces a new Load Test to be created.
     */
    @JvmName("shdvnwgbcpsfyabd")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value An `encryption` block as defined below. Changing this forces a new Load Test to be created.
     */
    @JvmName("mkjscvyyqyhysqsj")
    public suspend fun encryption(`value`: LoadTestEncryptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param argument An `encryption` block as defined below. Changing this forces a new Load Test to be created.
     */
    @JvmName("vxewvxcycvmnucrs")
    public suspend fun encryption(argument: suspend LoadTestEncryptionArgsBuilder.() -> Unit) {
        val toBeMapped = LoadTestEncryptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryption = mapped
    }

    /**
     * @param value An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
     */
    @JvmName("eqiakrkkeqtwvgni")
    public suspend fun identity(`value`: LoadTestIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
     */
    @JvmName("binpgvhflllfnyok")
    public suspend fun identity(argument: suspend LoadTestIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = LoadTestIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
     */
    @JvmName("qwpmorkfdwtmfevh")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
     */
    @JvmName("cwfuuphkhfblliuj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
     */
    @JvmName("baoyccgoninrkvko")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Load Test.
     */
    @JvmName("thaaihxhatrucrny")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Load Test.
     */
    @JvmName("cyvpsswtwfdenfdc")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LoadTestArgs = LoadTestArgs(
        description = description,
        encryption = encryption,
        identity = identity,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy