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

com.pulumi.azurenative.chaos.kotlin.TargetArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.chaos.kotlin

import com.pulumi.azurenative.chaos.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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Model that represents a Target resource.
 * Azure REST API version: 2023-04-15-preview. Prior API version in Azure Native 1.x: 2021-09-15-preview.
 * Other available API versions: 2023-09-01-preview, 2023-10-27-preview, 2023-11-01, 2024-01-01, 2024-03-22-preview.
 * ## Example Usage
 * ### Create/update a Target that extends a virtual machine resource.
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var target = new AzureNative.Chaos.Target("target", new()
 *     {
 *         ParentProviderNamespace = "Microsoft.Compute",
 *         ParentResourceName = "exampleVM",
 *         ParentResourceType = "virtualMachines",
 *         Properties = new Dictionary
 *         {
 *             ["identities"] = new[]
 *             {
 *                 new Dictionary
 *                 {
 *                     ["subject"] = "CN=example.subject",
 *                     ["type"] = "CertificateSubjectIssuer",
 *                 },
 *             },
 *         },
 *         ResourceGroupName = "exampleRG",
 *         TargetName = "Microsoft-Agent",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	chaos "github.com/pulumi/pulumi-azure-native-sdk/chaos/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := chaos.NewTarget(ctx, "target", &chaos.TargetArgs{
 * 			ParentProviderNamespace: pulumi.String("Microsoft.Compute"),
 * 			ParentResourceName:      pulumi.String("exampleVM"),
 * 			ParentResourceType:      pulumi.String("virtualMachines"),
 * 			Properties: pulumi.Any(map[string]interface{}{
 * 				"identities": []map[string]interface{}{
 * 					map[string]interface{}{
 * 						"subject": "CN=example.subject",
 * 						"type":    "CertificateSubjectIssuer",
 * 					},
 * 				},
 * 			}),
 * 			ResourceGroupName: pulumi.String("exampleRG"),
 * 			TargetName:        pulumi.String("Microsoft-Agent"),
 * 		})
 * 		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.azurenative.chaos.Target;
 * import com.pulumi.azurenative.chaos.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 target = new Target("target", TargetArgs.builder()
 *             .parentProviderNamespace("Microsoft.Compute")
 *             .parentResourceName("exampleVM")
 *             .parentResourceType("virtualMachines")
 *             .properties(Map.of("identities", Map.ofEntries(
 *                 Map.entry("subject", "CN=example.subject"),
 *                 Map.entry("type", "CertificateSubjectIssuer")
 *             )))
 *             .resourceGroupName("exampleRG")
 *             .targetName("Microsoft-Agent")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:chaos:Target Microsoft-Agent /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}
 * ```
 * @property location Location of the target resource.
 * @property parentProviderNamespace String that represents a resource provider namespace.
 * @property parentResourceName String that represents a resource name.
 * @property parentResourceType String that represents a resource type.
 * @property properties The properties of the target resource.
 * @property resourceGroupName String that represents an Azure resource group.
 * @property targetName String that represents a Target resource name.
 */
public data class TargetArgs(
    public val location: Output? = null,
    public val parentProviderNamespace: Output? = null,
    public val parentResourceName: Output? = null,
    public val parentResourceType: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val targetName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.chaos.TargetArgs =
        com.pulumi.azurenative.chaos.TargetArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .parentProviderNamespace(parentProviderNamespace?.applyValue({ args0 -> args0 }))
            .parentResourceName(parentResourceName?.applyValue({ args0 -> args0 }))
            .parentResourceType(parentResourceType?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .targetName(targetName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TargetArgs].
 */
@PulumiTagMarker
public class TargetArgsBuilder internal constructor() {
    private var location: Output? = null

    private var parentProviderNamespace: Output? = null

    private var parentResourceName: Output? = null

    private var parentResourceType: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var targetName: Output? = null

    /**
     * @param value Location of the target resource.
     */
    @JvmName("mplvecongvkerhsl")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value String that represents a resource provider namespace.
     */
    @JvmName("bhiqyhljuuosjmvd")
    public suspend fun parentProviderNamespace(`value`: Output) {
        this.parentProviderNamespace = value
    }

    /**
     * @param value String that represents a resource name.
     */
    @JvmName("pjosicqicmghmqty")
    public suspend fun parentResourceName(`value`: Output) {
        this.parentResourceName = value
    }

    /**
     * @param value String that represents a resource type.
     */
    @JvmName("unjnhheeaermicdi")
    public suspend fun parentResourceType(`value`: Output) {
        this.parentResourceType = value
    }

    /**
     * @param value The properties of the target resource.
     */
    @JvmName("leudvfrbfwqxnony")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value String that represents an Azure resource group.
     */
    @JvmName("ajgsuplqconnjrqs")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value String that represents a Target resource name.
     */
    @JvmName("tmvpxlsdwsrrrogr")
    public suspend fun targetName(`value`: Output) {
        this.targetName = value
    }

    /**
     * @param value Location of the target resource.
     */
    @JvmName("gujfrchrnxqjrnpa")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value String that represents a resource provider namespace.
     */
    @JvmName("mbjlvtycxkssxwif")
    public suspend fun parentProviderNamespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentProviderNamespace = mapped
    }

    /**
     * @param value String that represents a resource name.
     */
    @JvmName("snxshfhrqywmsxni")
    public suspend fun parentResourceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentResourceName = mapped
    }

    /**
     * @param value String that represents a resource type.
     */
    @JvmName("bxrlycrhyiyfspyv")
    public suspend fun parentResourceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentResourceType = mapped
    }

    /**
     * @param value The properties of the target resource.
     */
    @JvmName("airkfvqjaajladye")
    public suspend fun properties(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value String that represents an Azure resource group.
     */
    @JvmName("uihcrexilkhqixwx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value String that represents a Target resource name.
     */
    @JvmName("iljnyxubivvwuoqp")
    public suspend fun targetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetName = mapped
    }

    internal fun build(): TargetArgs = TargetArgs(
        location = location,
        parentProviderNamespace = parentProviderNamespace,
        parentResourceName = parentResourceName,
        parentResourceType = parentResourceType,
        properties = properties,
        resourceGroupName = resourceGroupName,
        targetName = targetName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy