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

com.pulumi.azurenative.testbase.kotlin.ImageDefinitionArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.testbase.kotlin

import com.pulumi.azurenative.testbase.ImageDefinitionArgs.builder
import com.pulumi.azurenative.testbase.kotlin.enums.ImageArchitecture
import com.pulumi.azurenative.testbase.kotlin.enums.ImageOSState
import com.pulumi.azurenative.testbase.kotlin.enums.ImageSecurityType
import com.pulumi.core.Either
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

/**
 * The test base image definition resource.
 * Azure REST API version: 2023-11-01-preview.
 * ## Example Usage
 * ### ImageDefinitionCreate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var imageDefinition = new AzureNative.TestBase.ImageDefinition("imageDefinition", new()
 *     {
 *         Architecture = AzureNative.TestBase.ImageArchitecture.X64,
 *         ImageDefinitionName = "contoso-image-def",
 *         OsState = AzureNative.TestBase.ImageOSState.Generalized,
 *         ResourceGroupName = "contoso-rg1",
 *         SecurityType = AzureNative.TestBase.ImageSecurityType.Standard,
 *         TestBaseAccountName = "contoso-testBaseAccount1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	testbase "github.com/pulumi/pulumi-azure-native-sdk/testbase/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := testbase.NewImageDefinition(ctx, "imageDefinition", &testbase.ImageDefinitionArgs{
 * 			Architecture:        pulumi.String(testbase.ImageArchitectureX64),
 * 			ImageDefinitionName: pulumi.String("contoso-image-def"),
 * 			OsState:             pulumi.String(testbase.ImageOSStateGeneralized),
 * 			ResourceGroupName:   pulumi.String("contoso-rg1"),
 * 			SecurityType:        pulumi.String(testbase.ImageSecurityTypeStandard),
 * 			TestBaseAccountName: pulumi.String("contoso-testBaseAccount1"),
 * 		})
 * 		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.testbase.ImageDefinition;
 * import com.pulumi.azurenative.testbase.ImageDefinitionArgs;
 * 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 imageDefinition = new ImageDefinition("imageDefinition", ImageDefinitionArgs.builder()
 *             .architecture("x64")
 *             .imageDefinitionName("contoso-image-def")
 *             .osState("Generalized")
 *             .resourceGroupName("contoso-rg1")
 *             .securityType("Standard")
 *             .testBaseAccountName("contoso-testBaseAccount1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:testbase:ImageDefinition contoso-image-def /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/imageDefinitions/{imageDefinitionName}
 * ```
 * @property architecture Custom image architecture.
 * @property imageDefinitionName The resource name of the test base image definition.
 * @property osState Custom image OS state.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property securityType Custom image security type.
 * @property testBaseAccountName The resource name of the Test Base Account.
 */
public data class ImageDefinitionArgs(
    public val architecture: Output>? = null,
    public val imageDefinitionName: Output? = null,
    public val osState: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val securityType: Output>? = null,
    public val testBaseAccountName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.testbase.ImageDefinitionArgs =
        com.pulumi.azurenative.testbase.ImageDefinitionArgs.builder()
            .architecture(
                architecture?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .imageDefinitionName(imageDefinitionName?.applyValue({ args0 -> args0 }))
            .osState(
                osState?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .securityType(
                securityType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .testBaseAccountName(testBaseAccountName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ImageDefinitionArgs].
 */
@PulumiTagMarker
public class ImageDefinitionArgsBuilder internal constructor() {
    private var architecture: Output>? = null

    private var imageDefinitionName: Output? = null

    private var osState: Output>? = null

    private var resourceGroupName: Output? = null

    private var securityType: Output>? = null

    private var testBaseAccountName: Output? = null

    /**
     * @param value Custom image architecture.
     */
    @JvmName("ixlkdoqannalyuvc")
    public suspend fun architecture(`value`: Output>) {
        this.architecture = value
    }

    /**
     * @param value The resource name of the test base image definition.
     */
    @JvmName("lvwwdfdwygsbosyv")
    public suspend fun imageDefinitionName(`value`: Output) {
        this.imageDefinitionName = value
    }

    /**
     * @param value Custom image OS state.
     */
    @JvmName("empusnbhtdmtljyn")
    public suspend fun osState(`value`: Output>) {
        this.osState = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("nbiedxshpvwuutpu")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Custom image security type.
     */
    @JvmName("skkwnjqbtqlnhmul")
    public suspend fun securityType(`value`: Output>) {
        this.securityType = value
    }

    /**
     * @param value The resource name of the Test Base Account.
     */
    @JvmName("jjtomavubvauueum")
    public suspend fun testBaseAccountName(`value`: Output) {
        this.testBaseAccountName = value
    }

    /**
     * @param value Custom image architecture.
     */
    @JvmName("jfwjbgdflkokpehj")
    public suspend fun architecture(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.architecture = mapped
    }

    /**
     * @param value Custom image architecture.
     */
    @JvmName("qmsybokbhaoiwmum")
    public fun architecture(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.architecture = mapped
    }

    /**
     * @param value Custom image architecture.
     */
    @JvmName("iymoufcqqbxrqdmp")
    public fun architecture(`value`: ImageArchitecture) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.architecture = mapped
    }

    /**
     * @param value The resource name of the test base image definition.
     */
    @JvmName("xsnisueqoymmaogb")
    public suspend fun imageDefinitionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageDefinitionName = mapped
    }

    /**
     * @param value Custom image OS state.
     */
    @JvmName("kkfyccusswxxpyip")
    public suspend fun osState(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osState = mapped
    }

    /**
     * @param value Custom image OS state.
     */
    @JvmName("grdpsrccgpnxymbw")
    public fun osState(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.osState = mapped
    }

    /**
     * @param value Custom image OS state.
     */
    @JvmName("msdrjudpgpbhdijp")
    public fun osState(`value`: ImageOSState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.osState = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("tpkrhnaqcanfqmud")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Custom image security type.
     */
    @JvmName("gdvfqkpnluwdeafu")
    public suspend fun securityType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityType = mapped
    }

    /**
     * @param value Custom image security type.
     */
    @JvmName("mauhwenlnlwcqvsk")
    public fun securityType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityType = mapped
    }

    /**
     * @param value Custom image security type.
     */
    @JvmName("qquigsvgpirepphb")
    public fun securityType(`value`: ImageSecurityType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityType = mapped
    }

    /**
     * @param value The resource name of the Test Base Account.
     */
    @JvmName("ukcgaplklyagrxhj")
    public suspend fun testBaseAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.testBaseAccountName = mapped
    }

    internal fun build(): ImageDefinitionArgs = ImageDefinitionArgs(
        architecture = architecture,
        imageDefinitionName = imageDefinitionName,
        osState = osState,
        resourceGroupName = resourceGroupName,
        securityType = securityType,
        testBaseAccountName = testBaseAccountName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy