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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.chaosstudio.kotlin
import com.pulumi.azure.chaosstudio.TargetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* Manages a Chaos Studio Target.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const example = new azure.containerservice.KubernetesCluster("example", {
* name: "example",
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.name,
* dnsPrefix: "acctestaksexample",
* defaultNodePool: {
* name: "example-value",
* nodeCount: "example-value",
* vmSize: "example-value",
* upgradeSettings: {
* maxSurge: "example-value",
* },
* },
* identity: {
* type: "example-value",
* },
* });
* const exampleTarget = new azure.chaosstudio.Target("example", {
* location: exampleResourceGroup.location,
* targetResourceId: example.id,
* targetType: "example-value",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example = azure.containerservice.KubernetesCluster("example",
* name="example",
* location=example_resource_group.location,
* resource_group_name=example_resource_group.name,
* dns_prefix="acctestaksexample",
* default_node_pool={
* "name": "example-value",
* "node_count": "example-value",
* "vm_size": "example-value",
* "upgrade_settings": {
* "max_surge": "example-value",
* },
* },
* identity={
* "type": "example-value",
* })
* example_target = azure.chaosstudio.Target("example",
* location=example_resource_group.location,
* target_resource_id=example.id,
* target_type="example-value")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var example = new Azure.ContainerService.KubernetesCluster("example", new()
* {
* Name = "example",
* Location = exampleResourceGroup.Location,
* ResourceGroupName = exampleResourceGroup.Name,
* DnsPrefix = "acctestaksexample",
* DefaultNodePool = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolArgs
* {
* Name = "example-value",
* NodeCount = "example-value",
* VmSize = "example-value",
* UpgradeSettings = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs
* {
* MaxSurge = "example-value",
* },
* },
* Identity = new Azure.ContainerService.Inputs.KubernetesClusterIdentityArgs
* {
* Type = "example-value",
* },
* });
* var exampleTarget = new Azure.ChaosStudio.Target("example", new()
* {
* Location = exampleResourceGroup.Location,
* TargetResourceId = example.Id,
* TargetType = "example-value",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/chaosstudio"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* example, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
* Name: pulumi.String("example"),
* Location: exampleResourceGroup.Location,
* ResourceGroupName: exampleResourceGroup.Name,
* DnsPrefix: pulumi.String("acctestaksexample"),
* DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
* Name: pulumi.String("example-value"),
* NodeCount: pulumi.Int("example-value"),
* VmSize: pulumi.String("example-value"),
* UpgradeSettings: &containerservice.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs{
* MaxSurge: pulumi.String("example-value"),
* },
* },
* Identity: &containerservice.KubernetesClusterIdentityArgs{
* Type: pulumi.String("example-value"),
* },
* })
* if err != nil {
* return err
* }
* _, err = chaosstudio.NewTarget(ctx, "example", &chaosstudio.TargetArgs{
* Location: exampleResourceGroup.Location,
* TargetResourceId: example.ID(),
* TargetType: pulumi.String("example-value"),
* })
* 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.containerservice.KubernetesCluster;
* import com.pulumi.azure.containerservice.KubernetesClusterArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
* import com.pulumi.azure.chaosstudio.Target;
* import com.pulumi.azure.chaosstudio.TargetArgs;
* 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
* .name("example")
* .location(exampleResourceGroup.location())
* .resourceGroupName(exampleResourceGroup.name())
* .dnsPrefix("acctestaksexample")
* .defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
* .name("example-value")
* .nodeCount("example-value")
* .vmSize("example-value")
* .upgradeSettings(KubernetesClusterDefaultNodePoolUpgradeSettingsArgs.builder()
* .maxSurge("example-value")
* .build())
* .build())
* .identity(KubernetesClusterIdentityArgs.builder()
* .type("example-value")
* .build())
* .build());
* var exampleTarget = new Target("exampleTarget", TargetArgs.builder()
* .location(exampleResourceGroup.location())
* .targetResourceId(example.id())
* .targetType("example-value")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:containerservice:KubernetesCluster
* properties:
* name: example
* location: ${exampleResourceGroup.location}
* resourceGroupName: ${exampleResourceGroup.name}
* dnsPrefix: acctestaksexample
* defaultNodePool:
* name: example-value
* nodeCount: example-value
* vmSize: example-value
* upgradeSettings:
* maxSurge: example-value
* identity:
* type: example-value
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleTarget:
* type: azure:chaosstudio:Target
* name: example
* properties:
* location: ${exampleResourceGroup.location}
* targetResourceId: ${example.id}
* targetType: example-value
* ```
*
* ## Import
* An existing Chaos Studio Target can be imported into Terraform using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:chaosstudio/target:Target example /{scope}/providers/Microsoft.Chaos/targets/{targetName}
* ```
* * Where `{scope}` is the ID of the Azure Resource under which the Chaos Studio Target exists. For example `/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group`.
* * Where `{targetName}` is the name of the Target. For example `targetValue`.
* @property location The Azure Region where the Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
* @property targetResourceId Specifies the Target Resource Id within which this Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
* @property targetType The name of the Chaos Studio Target. This has the format of [publisher]-[targetType] e.g. `Microsoft-StorageAccount`. For supported values please see this Target Type column in [this table](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-providers). Changing this forces a new Chaos Studio Target to be created.
*/
public data class TargetArgs(
public val location: Output? = null,
public val targetResourceId: Output? = null,
public val targetType: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.chaosstudio.TargetArgs =
com.pulumi.azure.chaosstudio.TargetArgs.builder()
.location(location?.applyValue({ args0 -> args0 }))
.targetResourceId(targetResourceId?.applyValue({ args0 -> args0 }))
.targetType(targetType?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TargetArgs].
*/
@PulumiTagMarker
public class TargetArgsBuilder internal constructor() {
private var location: Output? = null
private var targetResourceId: Output? = null
private var targetType: Output? = null
/**
* @param value The Azure Region where the Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("qmyjmjknvasutimg")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the Target Resource Id within which this Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("cgqhpfcnbvycljds")
public suspend fun targetResourceId(`value`: Output) {
this.targetResourceId = value
}
/**
* @param value The name of the Chaos Studio Target. This has the format of [publisher]-[targetType] e.g. `Microsoft-StorageAccount`. For supported values please see this Target Type column in [this table](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-providers). Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("chckvlytxfiuxuak")
public suspend fun targetType(`value`: Output) {
this.targetType = value
}
/**
* @param value The Azure Region where the Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("ipeckavoxhattvmx")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the Target Resource Id within which this Chaos Studio Target should exist. Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("teacryqxvvrhjyui")
public suspend fun targetResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetResourceId = mapped
}
/**
* @param value The name of the Chaos Studio Target. This has the format of [publisher]-[targetType] e.g. `Microsoft-StorageAccount`. For supported values please see this Target Type column in [this table](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-providers). Changing this forces a new Chaos Studio Target to be created.
*/
@JvmName("lgnxmdwydbrhilvr")
public suspend fun targetType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetType = mapped
}
internal fun build(): TargetArgs = TargetArgs(
location = location,
targetResourceId = targetResourceId,
targetType = targetType,
)
}