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

com.pulumi.azurenative.machinelearningservices.kotlin.inputs.KubernetesOnlineDeploymentArgs.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.machinelearningservices.kotlin.inputs

import com.pulumi.azurenative.machinelearningservices.inputs.KubernetesOnlineDeploymentArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.enums.EgressPublicNetworkAccessType
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Properties specific to a KubernetesOnlineDeployment.
 * @property appInsightsEnabled If true, enables Application Insights logging.
 * @property codeConfiguration Code configuration for the endpoint deployment.
 * @property containerResourceRequirements The resource requirements for the container (cpu and memory).
 * @property description Description of the endpoint deployment.
 * @property egressPublicNetworkAccess If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.
 * @property endpointComputeType Enum to determine endpoint compute type.
 * Expected value is 'Kubernetes'.
 * @property environmentId ARM resource ID or AssetId of the environment specification for the endpoint deployment.
 * @property environmentVariables Environment variables configuration for the deployment.
 * @property instanceType Compute instance type.
 * @property livenessProbe Liveness probe monitors the health of the container regularly.
 * @property model The URI path to the model.
 * @property modelMountPath The path to mount the model in custom container.
 * @property properties Property dictionary. Properties can be added, but not removed or altered.
 * @property readinessProbe Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.
 * @property requestSettings Request settings for the deployment.
 * @property scaleSettings Scale settings for the deployment.
 * If it is null or not provided,
 * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment
 * and to DefaultScaleSettings for ManagedOnlineDeployment.
 */
public data class KubernetesOnlineDeploymentArgs(
    public val appInsightsEnabled: Output? = null,
    public val codeConfiguration: Output? = null,
    public val containerResourceRequirements: Output? = null,
    public val description: Output? = null,
    public val egressPublicNetworkAccess: Output>? =
        null,
    public val endpointComputeType: Output,
    public val environmentId: Output? = null,
    public val environmentVariables: Output>? = null,
    public val instanceType: Output? = null,
    public val livenessProbe: Output? = null,
    public val model: Output? = null,
    public val modelMountPath: Output? = null,
    public val properties: Output>? = null,
    public val readinessProbe: Output? = null,
    public val requestSettings: Output? = null,
    public val scaleSettings: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.KubernetesOnlineDeploymentArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.KubernetesOnlineDeploymentArgs.builder()
            .appInsightsEnabled(appInsightsEnabled?.applyValue({ args0 -> args0 }))
            .codeConfiguration(codeConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .containerResourceRequirements(
                containerResourceRequirements?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .egressPublicNetworkAccess(
                egressPublicNetworkAccess?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .endpointComputeType(endpointComputeType.applyValue({ args0 -> args0 }))
            .environmentId(environmentId?.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .instanceType(instanceType?.applyValue({ args0 -> args0 }))
            .livenessProbe(livenessProbe?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .model(model?.applyValue({ args0 -> args0 }))
            .modelMountPath(modelMountPath?.applyValue({ args0 -> args0 }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .readinessProbe(readinessProbe?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .requestSettings(requestSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .scaleSettings(
                scaleSettings?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            ).build()
}

/**
 * Builder for [KubernetesOnlineDeploymentArgs].
 */
@PulumiTagMarker
public class KubernetesOnlineDeploymentArgsBuilder internal constructor() {
    private var appInsightsEnabled: Output? = null

    private var codeConfiguration: Output? = null

    private var containerResourceRequirements: Output? = null

    private var description: Output? = null

    private var egressPublicNetworkAccess: Output>? =
        null

    private var endpointComputeType: Output? = null

    private var environmentId: Output? = null

    private var environmentVariables: Output>? = null

    private var instanceType: Output? = null

    private var livenessProbe: Output? = null

    private var model: Output? = null

    private var modelMountPath: Output? = null

    private var properties: Output>? = null

    private var readinessProbe: Output? = null

    private var requestSettings: Output? = null

    private var scaleSettings:
        Output>? = null

    /**
     * @param value If true, enables Application Insights logging.
     */
    @JvmName("toxkkinsxqonwfqq")
    public suspend fun appInsightsEnabled(`value`: Output) {
        this.appInsightsEnabled = value
    }

    /**
     * @param value Code configuration for the endpoint deployment.
     */
    @JvmName("mufosqbrclpujoba")
    public suspend fun codeConfiguration(`value`: Output) {
        this.codeConfiguration = value
    }

    /**
     * @param value The resource requirements for the container (cpu and memory).
     */
    @JvmName("dlhiqxrjviobeuji")
    public suspend fun containerResourceRequirements(`value`: Output) {
        this.containerResourceRequirements = value
    }

    /**
     * @param value Description of the endpoint deployment.
     */
    @JvmName("slqhapgssuskyryg")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.
     */
    @JvmName("sqvdmiutsxasacwx")
    public suspend fun egressPublicNetworkAccess(`value`: Output>) {
        this.egressPublicNetworkAccess = value
    }

    /**
     * @param value Enum to determine endpoint compute type.
     * Expected value is 'Kubernetes'.
     */
    @JvmName("plynpxnphykqfpsp")
    public suspend fun endpointComputeType(`value`: Output) {
        this.endpointComputeType = value
    }

    /**
     * @param value ARM resource ID or AssetId of the environment specification for the endpoint deployment.
     */
    @JvmName("mqonipqdcwpcitbm")
    public suspend fun environmentId(`value`: Output) {
        this.environmentId = value
    }

    /**
     * @param value Environment variables configuration for the deployment.
     */
    @JvmName("xwasldvnabqxwsoy")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value Compute instance type.
     */
    @JvmName("wrvckkodmcbyjpik")
    public suspend fun instanceType(`value`: Output) {
        this.instanceType = value
    }

    /**
     * @param value Liveness probe monitors the health of the container regularly.
     */
    @JvmName("rasqwohsrjridiyf")
    public suspend fun livenessProbe(`value`: Output) {
        this.livenessProbe = value
    }

    /**
     * @param value The URI path to the model.
     */
    @JvmName("lpofshqcijqkdicr")
    public suspend fun model(`value`: Output) {
        this.model = value
    }

    /**
     * @param value The path to mount the model in custom container.
     */
    @JvmName("mwjifhwibnfdxabi")
    public suspend fun modelMountPath(`value`: Output) {
        this.modelMountPath = value
    }

    /**
     * @param value Property dictionary. Properties can be added, but not removed or altered.
     */
    @JvmName("urngcgapqnxuxubd")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.
     */
    @JvmName("seyycmlsonjrskgh")
    public suspend fun readinessProbe(`value`: Output) {
        this.readinessProbe = value
    }

    /**
     * @param value Request settings for the deployment.
     */
    @JvmName("rxoxrnwltyrtklie")
    public suspend fun requestSettings(`value`: Output) {
        this.requestSettings = value
    }

    /**
     * @param value Scale settings for the deployment.
     * If it is null or not provided,
     * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment
     * and to DefaultScaleSettings for ManagedOnlineDeployment.
     */
    @JvmName("yuyhgmilvmdffjwc")
    public suspend fun scaleSettings(`value`: Output>) {
        this.scaleSettings = value
    }

    /**
     * @param value If true, enables Application Insights logging.
     */
    @JvmName("ulmvjkrxyrharsgv")
    public suspend fun appInsightsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appInsightsEnabled = mapped
    }

    /**
     * @param value Code configuration for the endpoint deployment.
     */
    @JvmName("svynblphmvwiciet")
    public suspend fun codeConfiguration(`value`: CodeConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.codeConfiguration = mapped
    }

    /**
     * @param argument Code configuration for the endpoint deployment.
     */
    @JvmName("hvrlembeootbjeft")
    public suspend fun codeConfiguration(argument: suspend CodeConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = CodeConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.codeConfiguration = mapped
    }

    /**
     * @param value The resource requirements for the container (cpu and memory).
     */
    @JvmName("gktavcqwktkxrrng")
    public suspend fun containerResourceRequirements(`value`: ContainerResourceRequirementsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerResourceRequirements = mapped
    }

    /**
     * @param argument The resource requirements for the container (cpu and memory).
     */
    @JvmName("qfhollhjyunqquqp")
    public suspend fun containerResourceRequirements(argument: suspend ContainerResourceRequirementsArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerResourceRequirementsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.containerResourceRequirements = mapped
    }

    /**
     * @param value Description of the endpoint deployment.
     */
    @JvmName("vbxkstvnntodxrqf")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.
     */
    @JvmName("gxkhicchafihuwgq")
    public suspend fun egressPublicNetworkAccess(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.egressPublicNetworkAccess = mapped
    }

    /**
     * @param value If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.
     */
    @JvmName("gboyprrbchdngsht")
    public fun egressPublicNetworkAccess(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.egressPublicNetworkAccess = mapped
    }

    /**
     * @param value If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.
     */
    @JvmName("oooxxxwplngnnlkp")
    public fun egressPublicNetworkAccess(`value`: EgressPublicNetworkAccessType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.egressPublicNetworkAccess = mapped
    }

    /**
     * @param value Enum to determine endpoint compute type.
     * Expected value is 'Kubernetes'.
     */
    @JvmName("rfobejdvpbmdvdqb")
    public suspend fun endpointComputeType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.endpointComputeType = mapped
    }

    /**
     * @param value ARM resource ID or AssetId of the environment specification for the endpoint deployment.
     */
    @JvmName("bgvkmvdenltomaon")
    public suspend fun environmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentId = mapped
    }

    /**
     * @param value Environment variables configuration for the deployment.
     */
    @JvmName("jrbxlansajpaatwp")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values Environment variables configuration for the deployment.
     */
    @JvmName("bfqeglgiikacsiue")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Compute instance type.
     */
    @JvmName("sqoeiicqrfkorgai")
    public suspend fun instanceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceType = mapped
    }

    /**
     * @param value Liveness probe monitors the health of the container regularly.
     */
    @JvmName("aggnepqogndnjsji")
    public suspend fun livenessProbe(`value`: ProbeSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.livenessProbe = mapped
    }

    /**
     * @param argument Liveness probe monitors the health of the container regularly.
     */
    @JvmName("cndpullqpojkrtae")
    public suspend fun livenessProbe(argument: suspend ProbeSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = ProbeSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.livenessProbe = mapped
    }

    /**
     * @param value The URI path to the model.
     */
    @JvmName("diebachqwgpagmsf")
    public suspend fun model(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.model = mapped
    }

    /**
     * @param value The path to mount the model in custom container.
     */
    @JvmName("gtgidtyysbhviaxx")
    public suspend fun modelMountPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.modelMountPath = mapped
    }

    /**
     * @param value Property dictionary. Properties can be added, but not removed or altered.
     */
    @JvmName("ieqpxcoxjfimgali")
    public suspend fun properties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param values Property dictionary. Properties can be added, but not removed or altered.
     */
    @JvmName("xuvgobjwqiwwcrhx")
    public fun properties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.
     */
    @JvmName("uckvijeyyqpsqvqp")
    public suspend fun readinessProbe(`value`: ProbeSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.readinessProbe = mapped
    }

    /**
     * @param argument Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.
     */
    @JvmName("ljsoihrqfbbdllpw")
    public suspend fun readinessProbe(argument: suspend ProbeSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = ProbeSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.readinessProbe = mapped
    }

    /**
     * @param value Request settings for the deployment.
     */
    @JvmName("quvykdwxaqbcgnyd")
    public suspend fun requestSettings(`value`: OnlineRequestSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestSettings = mapped
    }

    /**
     * @param argument Request settings for the deployment.
     */
    @JvmName("suuolhtqhooxyegn")
    public suspend fun requestSettings(argument: suspend OnlineRequestSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = OnlineRequestSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.requestSettings = mapped
    }

    /**
     * @param value Scale settings for the deployment.
     * If it is null or not provided,
     * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment
     * and to DefaultScaleSettings for ManagedOnlineDeployment.
     */
    @JvmName("vfcjegkhsdkupsay")
    public suspend fun scaleSettings(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scaleSettings = mapped
    }

    /**
     * @param value Scale settings for the deployment.
     * If it is null or not provided,
     * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment
     * and to DefaultScaleSettings for ManagedOnlineDeployment.
     */
    @JvmName("jacrrdabjwovstcq")
    public fun scaleSettings(`value`: DefaultScaleSettingsArgs) {
        val toBeMapped = Either.ofLeft<
            DefaultScaleSettingsArgs,
            TargetUtilizationScaleSettingsArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scaleSettings = mapped
    }

    /**
     * @param value Scale settings for the deployment.
     * If it is null or not provided,
     * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment
     * and to DefaultScaleSettings for ManagedOnlineDeployment.
     */
    @JvmName("aabhijbworhvyiwx")
    public fun scaleSettings(`value`: TargetUtilizationScaleSettingsArgs) {
        val toBeMapped = Either.ofRight<
            DefaultScaleSettingsArgs,
            TargetUtilizationScaleSettingsArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scaleSettings = mapped
    }

    internal fun build(): KubernetesOnlineDeploymentArgs = KubernetesOnlineDeploymentArgs(
        appInsightsEnabled = appInsightsEnabled,
        codeConfiguration = codeConfiguration,
        containerResourceRequirements = containerResourceRequirements,
        description = description,
        egressPublicNetworkAccess = egressPublicNetworkAccess,
        endpointComputeType = endpointComputeType ?: throw PulumiNullFieldException("endpointComputeType"),
        environmentId = environmentId,
        environmentVariables = environmentVariables,
        instanceType = instanceType,
        livenessProbe = livenessProbe,
        model = model,
        modelMountPath = modelMountPath,
        properties = properties,
        readinessProbe = readinessProbe,
        requestSettings = requestSettings,
        scaleSettings = scaleSettings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy