![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.loadtest.kotlin.LoadTest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.loadtest.kotlin
import com.pulumi.azure.loadtest.kotlin.outputs.LoadTestEncryption
import com.pulumi.azure.loadtest.kotlin.outputs.LoadTestIdentity
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.azure.loadtest.kotlin.outputs.LoadTestEncryption.Companion.toKotlin as loadTestEncryptionToKotlin
import com.pulumi.azure.loadtest.kotlin.outputs.LoadTestIdentity.Companion.toKotlin as loadTestIdentityToKotlin
/**
* Builder for [LoadTest].
*/
@PulumiTagMarker
public class LoadTestResourceBuilder internal constructor() {
public var name: String? = null
public var args: LoadTestArgs = LoadTestArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend LoadTestArgsBuilder.() -> Unit) {
val builder = LoadTestArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): LoadTest {
val builtJavaResource = com.pulumi.azure.loadtest.LoadTest(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LoadTest(builtJavaResource)
}
}
/**
*
* 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`.
*/
public class LoadTest internal constructor(
override val javaResource: com.pulumi.azure.loadtest.LoadTest,
) : KotlinCustomResource(javaResource, LoadTestMapper) {
/**
* Resource data plane URI.
*/
public val dataPlaneUri: Output
get() = javaResource.dataPlaneUri().applyValue({ args0 -> args0 })
/**
* Description of the resource. Changing this forces a new Load Test to be created.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An `encryption` block as defined below. Changing this forces a new Load Test to be created.
*/
public val encryption: Output?
get() = javaResource.encryption().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
loadTestEncryptionToKotlin(args0)
})
}).orElse(null)
})
/**
* An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
loadTestIdentityToKotlin(args0)
})
}).orElse(null)
})
/**
* The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Specifies the name of this Load Test. Changing this forces a new Load Test to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the Load Test.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy