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

com.pulumi.azurenative.machinelearningservices.kotlin.inputs.OnlineEndpointArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.machinelearningservices.kotlin.inputs

import com.pulumi.azurenative.machinelearningservices.inputs.OnlineEndpointArgs.builder
import com.pulumi.azurenative.machinelearningservices.kotlin.enums.EndpointAuthMode
import com.pulumi.azurenative.machinelearningservices.kotlin.enums.PublicNetworkAccessType
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Online endpoint configuration
 * @property authMode [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.
 * @property compute ARM resource ID of the compute if it exists.
 * optional
 * @property description Description of the inference endpoint.
 * @property keys EndpointAuthKeys to set initially on an Endpoint.
 * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API.
 * @property mirrorTraffic Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.
 * @property properties Property dictionary. Properties can be added, but not removed or altered.
 * @property publicNetworkAccess Set to "Enabled" for endpoints that should allow public access when Private Link is enabled.
 * @property traffic Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.
 */
public data class OnlineEndpointArgs(
    public val authMode: Output>,
    public val compute: Output? = null,
    public val description: Output? = null,
    public val keys: Output? = null,
    public val mirrorTraffic: Output>? = null,
    public val properties: Output>? = null,
    public val publicNetworkAccess: Output>? = null,
    public val traffic: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.machinelearningservices.inputs.OnlineEndpointArgs =
        com.pulumi.azurenative.machinelearningservices.inputs.OnlineEndpointArgs.builder()
            .authMode(
                authMode.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .compute(compute?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .keys(keys?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mirrorTraffic(
                mirrorTraffic?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .publicNetworkAccess(
                publicNetworkAccess?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .traffic(
                traffic?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var compute: Output? = null

    private var description: Output? = null

    private var keys: Output? = null

    private var mirrorTraffic: Output>? = null

    private var properties: Output>? = null

    private var publicNetworkAccess: Output>? = null

    private var traffic: Output>? = null

    /**
     * @param value [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.
     */
    @JvmName("nqsanqahgtootufr")
    public suspend fun authMode(`value`: Output>) {
        this.authMode = value
    }

    /**
     * @param value ARM resource ID of the compute if it exists.
     * optional
     */
    @JvmName("bfoitgkxhjrlxwod")
    public suspend fun compute(`value`: Output) {
        this.compute = value
    }

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

    /**
     * @param value EndpointAuthKeys to set initially on an Endpoint.
     * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API.
     */
    @JvmName("utqarhsvmvwmrdws")
    public suspend fun keys(`value`: Output) {
        this.keys = value
    }

    /**
     * @param value Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.
     */
    @JvmName("nhkwdrjvjicygypq")
    public suspend fun mirrorTraffic(`value`: Output>) {
        this.mirrorTraffic = value
    }

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

    /**
     * @param value Set to "Enabled" for endpoints that should allow public access when Private Link is enabled.
     */
    @JvmName("bjtwogmamegpivse")
    public suspend fun publicNetworkAccess(`value`: Output>) {
        this.publicNetworkAccess = value
    }

    /**
     * @param value Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.
     */
    @JvmName("hxfylwxgmwrjetuh")
    public suspend fun traffic(`value`: Output>) {
        this.traffic = value
    }

    /**
     * @param value [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.
     */
    @JvmName("rfgulvrptrshqoqd")
    public suspend fun authMode(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authMode = mapped
    }

    /**
     * @param value [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.
     */
    @JvmName("xxjmwjbnblbnjklq")
    public fun authMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authMode = mapped
    }

    /**
     * @param value [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.
     */
    @JvmName("xtdtiwjcpfudsqps")
    public fun authMode(`value`: EndpointAuthMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authMode = mapped
    }

    /**
     * @param value ARM resource ID of the compute if it exists.
     * optional
     */
    @JvmName("dbxukaxknjhcyana")
    public suspend fun compute(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compute = mapped
    }

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

    /**
     * @param value EndpointAuthKeys to set initially on an Endpoint.
     * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API.
     */
    @JvmName("pycaqdgakmirdrvm")
    public suspend fun keys(`value`: EndpointAuthKeysArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keys = mapped
    }

    /**
     * @param argument EndpointAuthKeys to set initially on an Endpoint.
     * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API.
     */
    @JvmName("sdygpmmhqmjeaupc")
    public suspend fun keys(argument: suspend EndpointAuthKeysArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointAuthKeysArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.keys = mapped
    }

    /**
     * @param value Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.
     */
    @JvmName("wykgqbhwtgrlcmif")
    public suspend fun mirrorTraffic(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mirrorTraffic = mapped
    }

    /**
     * @param values Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.
     */
    @JvmName("glxurlvdvahltdwp")
    public fun mirrorTraffic(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mirrorTraffic = mapped
    }

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

    /**
     * @param value Set to "Enabled" for endpoints that should allow public access when Private Link is enabled.
     */
    @JvmName("njrumvwelmolwyym")
    public suspend fun publicNetworkAccess(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value Set to "Enabled" for endpoints that should allow public access when Private Link is enabled.
     */
    @JvmName("iaaoyyufeootmwyo")
    public fun publicNetworkAccess(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value Set to "Enabled" for endpoints that should allow public access when Private Link is enabled.
     */
    @JvmName("wqxhgmirofeuirqd")
    public fun publicNetworkAccess(`value`: PublicNetworkAccessType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.
     */
    @JvmName("dafjstwffulhafux")
    public suspend fun traffic(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    /**
     * @param values Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.
     */
    @JvmName("juymobviqclfmdqx")
    public fun traffic(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    internal fun build(): OnlineEndpointArgs = OnlineEndpointArgs(
        authMode = authMode ?: throw PulumiNullFieldException("authMode"),
        compute = compute,
        description = description,
        keys = keys,
        mirrorTraffic = mirrorTraffic,
        properties = properties,
        publicNetworkAccess = publicNetworkAccess,
        traffic = traffic,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy