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

com.pulumi.azurenative.compute.kotlin.inputs.GalleryApplicationVersionPublishingProfileArgs.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.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.GalleryApplicationVersionPublishingProfileArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.ReplicationMode
import com.pulumi.azurenative.compute.kotlin.enums.StorageAccountType
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The publishing profile of a gallery image version.
 * @property advancedSettings Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.
 * @property customActions A list of custom actions that can be performed with this Gallery Application Version.
 * @property enableHealthCheck Optional. Whether or not this application reports health.
 * @property endOfLifeDate The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
 * @property excludeFromLatest If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
 * @property manageActions
 * @property replicaCount The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
 * @property replicationMode Optional parameter which specifies the mode to be used for replication. This property is not updatable.
 * @property settings Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.
 * @property source The source image from which the Image Version is going to be created.
 * @property storageAccountType Specifies the storage account type to be used to store the image. This property is not updatable.
 * @property targetExtendedLocations The target extended locations where the Image Version is going to be replicated to. This property is updatable.
 * @property targetRegions The target regions where the Image Version is going to be replicated to. This property is updatable.
 */
public data class GalleryApplicationVersionPublishingProfileArgs(
    public val advancedSettings: Output>? = null,
    public val customActions: Output>? = null,
    public val enableHealthCheck: Output? = null,
    public val endOfLifeDate: Output? = null,
    public val excludeFromLatest: Output? = null,
    public val manageActions: Output? = null,
    public val replicaCount: Output? = null,
    public val replicationMode: Output>? = null,
    public val settings: Output? = null,
    public val source: Output,
    public val storageAccountType: Output>? = null,
    public val targetExtendedLocations: Output>? = null,
    public val targetRegions: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.inputs.GalleryApplicationVersionPublishingProfileArgs =
        com.pulumi.azurenative.compute.inputs.GalleryApplicationVersionPublishingProfileArgs.builder()
            .advancedSettings(
                advancedSettings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .customActions(
                customActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enableHealthCheck(enableHealthCheck?.applyValue({ args0 -> args0 }))
            .endOfLifeDate(endOfLifeDate?.applyValue({ args0 -> args0 }))
            .excludeFromLatest(excludeFromLatest?.applyValue({ args0 -> args0 }))
            .manageActions(manageActions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .replicaCount(replicaCount?.applyValue({ args0 -> args0 }))
            .replicationMode(
                replicationMode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .settings(settings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .source(source.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageAccountType(
                storageAccountType?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .targetExtendedLocations(
                targetExtendedLocations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .targetRegions(
                targetRegions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var customActions: Output>? = null

    private var enableHealthCheck: Output? = null

    private var endOfLifeDate: Output? = null

    private var excludeFromLatest: Output? = null

    private var manageActions: Output? = null

    private var replicaCount: Output? = null

    private var replicationMode: Output>? = null

    private var settings: Output? = null

    private var source: Output? = null

    private var storageAccountType: Output>? = null

    private var targetExtendedLocations: Output>? = null

    private var targetRegions: Output>? = null

    /**
     * @param value Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.
     */
    @JvmName("obgltrifowipiplv")
    public suspend fun advancedSettings(`value`: Output>) {
        this.advancedSettings = value
    }

    /**
     * @param value A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("jejwpckrxcsxccxx")
    public suspend fun customActions(`value`: Output>) {
        this.customActions = value
    }

    @JvmName("xubyugpjlpeqijno")
    public suspend fun customActions(vararg values: Output) {
        this.customActions = Output.all(values.asList())
    }

    /**
     * @param values A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("nhpuklvnxlmtjvic")
    public suspend fun customActions(values: List>) {
        this.customActions = Output.all(values)
    }

    /**
     * @param value Optional. Whether or not this application reports health.
     */
    @JvmName("sbufksaygmnukskt")
    public suspend fun enableHealthCheck(`value`: Output) {
        this.enableHealthCheck = value
    }

    /**
     * @param value The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
     */
    @JvmName("lippenmotpmydraq")
    public suspend fun endOfLifeDate(`value`: Output) {
        this.endOfLifeDate = value
    }

    /**
     * @param value If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
     */
    @JvmName("hcjidubthwymckce")
    public suspend fun excludeFromLatest(`value`: Output) {
        this.excludeFromLatest = value
    }

    /**
     * @param value
     */
    @JvmName("yanamgmafnmvwoad")
    public suspend fun manageActions(`value`: Output) {
        this.manageActions = value
    }

    /**
     * @param value The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
     */
    @JvmName("nsnyhicinkhsqvfy")
    public suspend fun replicaCount(`value`: Output) {
        this.replicaCount = value
    }

    /**
     * @param value Optional parameter which specifies the mode to be used for replication. This property is not updatable.
     */
    @JvmName("aadacjdxtlredrlu")
    public suspend fun replicationMode(`value`: Output>) {
        this.replicationMode = value
    }

    /**
     * @param value Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.
     */
    @JvmName("cojqralhnlpykovr")
    public suspend fun settings(`value`: Output) {
        this.settings = value
    }

    /**
     * @param value The source image from which the Image Version is going to be created.
     */
    @JvmName("iqxpedbwmxlwbhsy")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Specifies the storage account type to be used to store the image. This property is not updatable.
     */
    @JvmName("eprejwowvglfqriw")
    public suspend fun storageAccountType(`value`: Output>) {
        this.storageAccountType = value
    }

    /**
     * @param value The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("wxbrhinhawmaooyb")
    public suspend fun targetExtendedLocations(`value`: Output>) {
        this.targetExtendedLocations = value
    }

    @JvmName("cypypccqqufputaq")
    public suspend fun targetExtendedLocations(vararg values: Output) {
        this.targetExtendedLocations = Output.all(values.asList())
    }

    /**
     * @param values The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("lkcdcsyufqqprujc")
    public suspend fun targetExtendedLocations(values: List>) {
        this.targetExtendedLocations = Output.all(values)
    }

    /**
     * @param value The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("dqqhmoltvyvcfbyr")
    public suspend fun targetRegions(`value`: Output>) {
        this.targetRegions = value
    }

    @JvmName("xbhasxluyxvgdpeq")
    public suspend fun targetRegions(vararg values: Output) {
        this.targetRegions = Output.all(values.asList())
    }

    /**
     * @param values The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("lbhehmripxqmwagm")
    public suspend fun targetRegions(values: List>) {
        this.targetRegions = Output.all(values)
    }

    /**
     * @param value Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.
     */
    @JvmName("kkonnmiickyhshpp")
    public suspend fun advancedSettings(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedSettings = mapped
    }

    /**
     * @param values Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.
     */
    @JvmName("sbmosoixkkkcghdd")
    public fun advancedSettings(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.advancedSettings = mapped
    }

    /**
     * @param value A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("kirhxxjnlcfdqcsw")
    public suspend fun customActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customActions = mapped
    }

    /**
     * @param argument A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("nfmuqnpupwrybeww")
    public suspend fun customActions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GalleryApplicationCustomActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customActions = mapped
    }

    /**
     * @param argument A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("jwnwoascsukojaqc")
    public suspend fun customActions(vararg argument: suspend GalleryApplicationCustomActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GalleryApplicationCustomActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customActions = mapped
    }

    /**
     * @param argument A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("qrnodxersqfeaiuk")
    public suspend fun customActions(argument: suspend GalleryApplicationCustomActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GalleryApplicationCustomActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.customActions = mapped
    }

    /**
     * @param values A list of custom actions that can be performed with this Gallery Application Version.
     */
    @JvmName("mbpvbjidxakfkota")
    public suspend fun customActions(vararg values: GalleryApplicationCustomActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customActions = mapped
    }

    /**
     * @param value Optional. Whether or not this application reports health.
     */
    @JvmName("nffrlpnaqlvarobx")
    public suspend fun enableHealthCheck(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableHealthCheck = mapped
    }

    /**
     * @param value The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
     */
    @JvmName("iinttbkcgiyvxwoe")
    public suspend fun endOfLifeDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endOfLifeDate = mapped
    }

    /**
     * @param value If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
     */
    @JvmName("ghckmpuudeoilnap")
    public suspend fun excludeFromLatest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeFromLatest = mapped
    }

    /**
     * @param value
     */
    @JvmName("knkpawppgvkfhnjr")
    public suspend fun manageActions(`value`: UserArtifactManageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.manageActions = mapped
    }

    /**
     * @param argument
     */
    @JvmName("kshqmjblsmupfypp")
    public suspend fun manageActions(argument: suspend UserArtifactManageArgsBuilder.() -> Unit) {
        val toBeMapped = UserArtifactManageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.manageActions = mapped
    }

    /**
     * @param value The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
     */
    @JvmName("ognqpmfexwarqsoi")
    public suspend fun replicaCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicaCount = mapped
    }

    /**
     * @param value Optional parameter which specifies the mode to be used for replication. This property is not updatable.
     */
    @JvmName("uxpuvtrliuwpewcc")
    public suspend fun replicationMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicationMode = mapped
    }

    /**
     * @param value Optional parameter which specifies the mode to be used for replication. This property is not updatable.
     */
    @JvmName("snkujqoosopdqvst")
    public fun replicationMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.replicationMode = mapped
    }

    /**
     * @param value Optional parameter which specifies the mode to be used for replication. This property is not updatable.
     */
    @JvmName("sufmexvasijeeipf")
    public fun replicationMode(`value`: ReplicationMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.replicationMode = mapped
    }

    /**
     * @param value Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.
     */
    @JvmName("lavhkpmgvoxucffb")
    public suspend fun settings(`value`: UserArtifactSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.settings = mapped
    }

    /**
     * @param argument Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.
     */
    @JvmName("rjwqcxrjpyxhnnuv")
    public suspend fun settings(argument: suspend UserArtifactSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = UserArtifactSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    /**
     * @param value The source image from which the Image Version is going to be created.
     */
    @JvmName("dlcieftlixhjaomp")
    public suspend fun source(`value`: UserArtifactSourceArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param argument The source image from which the Image Version is going to be created.
     */
    @JvmName("mpmbwwdqqyodrhxg")
    public suspend fun source(argument: suspend UserArtifactSourceArgsBuilder.() -> Unit) {
        val toBeMapped = UserArtifactSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.source = mapped
    }

    /**
     * @param value Specifies the storage account type to be used to store the image. This property is not updatable.
     */
    @JvmName("mfyyvlwhucjtnoju")
    public suspend fun storageAccountType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountType = mapped
    }

    /**
     * @param value Specifies the storage account type to be used to store the image. This property is not updatable.
     */
    @JvmName("bgufrryaitibfdlw")
    public fun storageAccountType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storageAccountType = mapped
    }

    /**
     * @param value Specifies the storage account type to be used to store the image. This property is not updatable.
     */
    @JvmName("qvylffskabvpqhiy")
    public fun storageAccountType(`value`: StorageAccountType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storageAccountType = mapped
    }

    /**
     * @param value The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("kuuvddrhuwrcgtny")
    public suspend fun targetExtendedLocations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetExtendedLocations = mapped
    }

    /**
     * @param argument The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("aaibioqpxkoaujdv")
    public suspend fun targetExtendedLocations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GalleryTargetExtendedLocationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetExtendedLocations = mapped
    }

    /**
     * @param argument The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("aioriwcvtfsmlkmv")
    public suspend fun targetExtendedLocations(vararg argument: suspend GalleryTargetExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GalleryTargetExtendedLocationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetExtendedLocations = mapped
    }

    /**
     * @param argument The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("ajdlixcapleoubxf")
    public suspend fun targetExtendedLocations(argument: suspend GalleryTargetExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GalleryTargetExtendedLocationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.targetExtendedLocations = mapped
    }

    /**
     * @param values The target extended locations where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("paqmmtruevpnsgje")
    public suspend fun targetExtendedLocations(vararg values: GalleryTargetExtendedLocationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetExtendedLocations = mapped
    }

    /**
     * @param value The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("mljsobnetpudrkby")
    public suspend fun targetRegions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetRegions = mapped
    }

    /**
     * @param argument The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("raniakxkkeesfnxv")
    public suspend fun targetRegions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TargetRegionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param argument The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("pbyiuceyufqvgjhf")
    public suspend fun targetRegions(vararg argument: suspend TargetRegionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TargetRegionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param argument The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("cciejovdxhrjvqeg")
    public suspend fun targetRegions(argument: suspend TargetRegionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TargetRegionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param values The target regions where the Image Version is going to be replicated to. This property is updatable.
     */
    @JvmName("mcjpctanfkhitedq")
    public suspend fun targetRegions(vararg values: TargetRegionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetRegions = mapped
    }

    internal fun build(): GalleryApplicationVersionPublishingProfileArgs =
        GalleryApplicationVersionPublishingProfileArgs(
            advancedSettings = advancedSettings,
            customActions = customActions,
            enableHealthCheck = enableHealthCheck,
            endOfLifeDate = endOfLifeDate,
            excludeFromLatest = excludeFromLatest,
            manageActions = manageActions,
            replicaCount = replicaCount,
            replicationMode = replicationMode,
            settings = settings,
            source = source ?: throw PulumiNullFieldException("source"),
            storageAccountType = storageAccountType,
            targetExtendedLocations = targetExtendedLocations,
            targetRegions = targetRegions,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy