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

com.pulumi.aws.ec2.kotlin.inputs.GetKeyPairPlainArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ec2.kotlin.inputs

import com.pulumi.aws.ec2.inputs.GetKeyPairPlainArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A collection of arguments for invoking getKeyPair.
 * @property filters Custom filter block as described below.
 * @property includePublicKey Whether to include the public key material in the response.
 * @property keyName Key Pair name.
 * @property keyPairId Key Pair ID.
 * @property tags Any tags assigned to the Key Pair.
 */
public data class GetKeyPairPlainArgs(
    public val filters: List? = null,
    public val includePublicKey: Boolean? = null,
    public val keyName: String? = null,
    public val keyPairId: String? = null,
    public val tags: Map? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.inputs.GetKeyPairPlainArgs =
        com.pulumi.aws.ec2.inputs.GetKeyPairPlainArgs.builder()
            .filters(filters?.let({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .includePublicKey(includePublicKey?.let({ args0 -> args0 }))
            .keyName(keyName?.let({ args0 -> args0 }))
            .keyPairId(keyPairId?.let({ args0 -> args0 }))
            .tags(tags?.let({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() })).build()
}

/**
 * Builder for [GetKeyPairPlainArgs].
 */
@PulumiTagMarker
public class GetKeyPairPlainArgsBuilder internal constructor() {
    private var filters: List? = null

    private var includePublicKey: Boolean? = null

    private var keyName: String? = null

    private var keyPairId: String? = null

    private var tags: Map? = null

    /**
     * @param value Custom filter block as described below.
     */
    @JvmName("wesyephelruunqxe")
    public suspend fun filters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.filters = mapped
    }

    /**
     * @param argument Custom filter block as described below.
     */
    @JvmName("dggctgdjnwbevyic")
    public suspend fun filters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GetKeyPairFilterBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param argument Custom filter block as described below.
     */
    @JvmName("iwkdskvxvvcdfkma")
    public suspend fun filters(vararg argument: suspend GetKeyPairFilterBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GetKeyPairFilterBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param argument Custom filter block as described below.
     */
    @JvmName("oytgtxxhlmqhepvo")
    public suspend fun filters(argument: suspend GetKeyPairFilterBuilder.() -> Unit) {
        val toBeMapped = listOf(GetKeyPairFilterBuilder().applySuspend { argument() }.build())
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param values Custom filter block as described below.
     */
    @JvmName("flfgbwfbqjtnxsta")
    public suspend fun filters(vararg values: GetKeyPairFilter) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.filters = mapped
    }

    /**
     * @param value Whether to include the public key material in the response.
     */
    @JvmName("yecpficceovyjtxg")
    public suspend fun includePublicKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.includePublicKey = mapped
    }

    /**
     * @param value Key Pair name.
     */
    @JvmName("hayjuufflomodlhp")
    public suspend fun keyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.keyName = mapped
    }

    /**
     * @param value Key Pair ID.
     */
    @JvmName("lufntlohgdgwdkce")
    public suspend fun keyPairId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.keyPairId = mapped
    }

    /**
     * @param value Any tags assigned to the Key Pair.
     */
    @JvmName("mmgjqutcpdilmkul")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.tags = mapped
    }

    /**
     * @param values Any tags assigned to the Key Pair.
     */
    @JvmName("mpkhysooffvwhvsv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.tags = mapped
    }

    internal fun build(): GetKeyPairPlainArgs = GetKeyPairPlainArgs(
        filters = filters,
        includePublicKey = includePublicKey,
        keyName = keyName,
        keyPairId = keyPairId,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy