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

com.pulumi.awsnative.imagebuilder.kotlin.inputs.DistributionConfigurationAmiDistributionConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.imagebuilder.kotlin.inputs

import com.pulumi.awsnative.imagebuilder.inputs.DistributionConfigurationAmiDistributionConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
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 specific AMI settings (for example, launch permissions, AMI tags).
 * @property amiTags The tags to apply to AMIs distributed to this Region.
 * @property description The description of the AMI distribution configuration.
 * @property kmsKeyId The KMS key identifier used to encrypt the distributed image.
 * @property launchPermissionConfiguration Launch permissions can be used to configure which AWS account s can use the AMI to launch instances.
 * @property name The name of the AMI distribution configuration.
 * @property targetAccountIds The ID of accounts to which you want to distribute an image.
 */
public data class DistributionConfigurationAmiDistributionConfigurationArgs(
    public val amiTags: Output>? = null,
    public val description: Output? = null,
    public val kmsKeyId: Output? = null,
    public val launchPermissionConfiguration: Output? = null,
    public val name: Output? = null,
    public val targetAccountIds: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.imagebuilder.inputs.DistributionConfigurationAmiDistributionConfigurationArgs =
        com.pulumi.awsnative.imagebuilder.inputs.DistributionConfigurationAmiDistributionConfigurationArgs.builder()
            .amiTags(amiTags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .description(description?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .launchPermissionConfiguration(
                launchPermissionConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .targetAccountIds(targetAccountIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var description: Output? = null

    private var kmsKeyId: Output? = null

    private var launchPermissionConfiguration:
        Output? = null

    private var name: Output? = null

    private var targetAccountIds: Output>? = null

    /**
     * @param value The tags to apply to AMIs distributed to this Region.
     */
    @JvmName("bfeevoekmdxaqsrt")
    public suspend fun amiTags(`value`: Output>) {
        this.amiTags = value
    }

    /**
     * @param value The description of the AMI distribution configuration.
     */
    @JvmName("vbmjigtklwmdyilu")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The KMS key identifier used to encrypt the distributed image.
     */
    @JvmName("yecdpuewccbxprwv")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value Launch permissions can be used to configure which AWS account s can use the AMI to launch instances.
     */
    @JvmName("hhidvkxwnfithtix")
    public suspend fun launchPermissionConfiguration(`value`: Output) {
        this.launchPermissionConfiguration = value
    }

    /**
     * @param value The name of the AMI distribution configuration.
     */
    @JvmName("ewbfrsctpfptlsrf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of accounts to which you want to distribute an image.
     */
    @JvmName("ivlmfyeofveoybah")
    public suspend fun targetAccountIds(`value`: Output>) {
        this.targetAccountIds = value
    }

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

    /**
     * @param values The ID of accounts to which you want to distribute an image.
     */
    @JvmName("ubjskwbkohgvcped")
    public suspend fun targetAccountIds(values: List>) {
        this.targetAccountIds = Output.all(values)
    }

    /**
     * @param value The tags to apply to AMIs distributed to this Region.
     */
    @JvmName("kcokjvsjgdrbubxf")
    public suspend fun amiTags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.amiTags = mapped
    }

    /**
     * @param values The tags to apply to AMIs distributed to this Region.
     */
    @JvmName("ilcfelaffmrbqnmt")
    public fun amiTags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.amiTags = mapped
    }

    /**
     * @param value The description of the AMI distribution configuration.
     */
    @JvmName("gyftejshsycihokj")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The KMS key identifier used to encrypt the distributed image.
     */
    @JvmName("wturmdrtidxkblql")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value Launch permissions can be used to configure which AWS account s can use the AMI to launch instances.
     */
    @JvmName("srgmubnhdvvbyokk")
    public suspend fun launchPermissionConfiguration(`value`: DistributionConfigurationLaunchPermissionConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchPermissionConfiguration = mapped
    }

    /**
     * @param argument Launch permissions can be used to configure which AWS account s can use the AMI to launch instances.
     */
    @JvmName("nxmrsdchtgckiqae")
    public suspend fun launchPermissionConfiguration(argument: suspend DistributionConfigurationLaunchPermissionConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped =
            DistributionConfigurationLaunchPermissionConfigurationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.launchPermissionConfiguration = mapped
    }

    /**
     * @param value The name of the AMI distribution configuration.
     */
    @JvmName("dbbiieaehveohiga")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of accounts to which you want to distribute an image.
     */
    @JvmName("btwiblshpcneunxd")
    public suspend fun targetAccountIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetAccountIds = mapped
    }

    /**
     * @param values The ID of accounts to which you want to distribute an image.
     */
    @JvmName("lwamgbreujayelib")
    public suspend fun targetAccountIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetAccountIds = mapped
    }

    internal fun build(): DistributionConfigurationAmiDistributionConfigurationArgs =
        DistributionConfigurationAmiDistributionConfigurationArgs(
            amiTags = amiTags,
            description = description,
            kmsKeyId = kmsKeyId,
            launchPermissionConfiguration = launchPermissionConfiguration,
            name = name,
            targetAccountIds = targetAccountIds,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy