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

com.pulumi.awsnative.apigateway.kotlin.ApiKeyArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apigateway.kotlin

import com.pulumi.awsnative.apigateway.ApiKeyArgs.builder
import com.pulumi.awsnative.apigateway.kotlin.inputs.ApiKeyStageKeyArgs
import com.pulumi.awsnative.apigateway.kotlin.inputs.ApiKeyStageKeyArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The ``AWS::ApiGateway::ApiKey`` resource creates a unique key that you can distribute to clients who are executing API Gateway ``Method`` resources that require an API key. To specify which API key clients must use, map the API key with the ``RestApi`` and ``Stage`` resources that include the methods that require a key.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property customerId An MKT customer identifier, when integrating with the AWS SaaS Marketplace.
 * @property description The description of the ApiKey.
 * @property enabled Specifies whether the ApiKey can be used by callers.
 * @property generateDistinctId Specifies whether (``true``) or not (``false``) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.
 * @property name A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
 *  If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
 * @property stageKeys DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
 * @property tags The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
 * @property value Specifies a value of the API key.
 */
public data class ApiKeyArgs(
    public val customerId: Output? = null,
    public val description: Output? = null,
    public val enabled: Output? = null,
    public val generateDistinctId: Output? = null,
    public val name: Output? = null,
    public val stageKeys: Output>? = null,
    public val tags: Output>? = null,
    public val `value`: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apigateway.ApiKeyArgs =
        com.pulumi.awsnative.apigateway.ApiKeyArgs.builder()
            .customerId(customerId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .generateDistinctId(generateDistinctId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .stageKeys(
                stageKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .`value`(`value`?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApiKeyArgs].
 */
@PulumiTagMarker
public class ApiKeyArgsBuilder internal constructor() {
    private var customerId: Output? = null

    private var description: Output? = null

    private var enabled: Output? = null

    private var generateDistinctId: Output? = null

    private var name: Output? = null

    private var stageKeys: Output>? = null

    private var tags: Output>? = null

    private var `value`: Output? = null

    /**
     * @param value An MKT customer identifier, when integrating with the AWS SaaS Marketplace.
     */
    @JvmName("gpxpodxseonyknqs")
    public suspend fun customerId(`value`: Output) {
        this.customerId = value
    }

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

    /**
     * @param value Specifies whether the ApiKey can be used by callers.
     */
    @JvmName("pohkykhqgpevxswc")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Specifies whether (``true``) or not (``false``) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.
     */
    @JvmName("edhpaktqwmxiiqdv")
    public suspend fun generateDistinctId(`value`: Output) {
        this.generateDistinctId = value
    }

    /**
     * @param value A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
     *  If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     */
    @JvmName("wlewfhlkxyqtdvec")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("mkwpkvupdpjvncas")
    public suspend fun stageKeys(`value`: Output>) {
        this.stageKeys = value
    }

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

    /**
     * @param values DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("dgkepiaewevdjvpd")
    public suspend fun stageKeys(values: List>) {
        this.stageKeys = Output.all(values)
    }

    /**
     * @param value The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("bulvvkoqjkdfymkc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("dxclpnpvyskcnojm")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies a value of the API key.
     */
    @JvmName("agqifgktsjgphymb")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value An MKT customer identifier, when integrating with the AWS SaaS Marketplace.
     */
    @JvmName("oosagjmdhmxqjmsu")
    public suspend fun customerId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerId = mapped
    }

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

    /**
     * @param value Specifies whether the ApiKey can be used by callers.
     */
    @JvmName("gvosmkijwcakcekb")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Specifies whether (``true``) or not (``false``) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.
     */
    @JvmName("ghwshguahibetylr")
    public suspend fun generateDistinctId(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.generateDistinctId = mapped
    }

    /**
     * @param value A name for the API key. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the API key name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
     *  If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     */
    @JvmName("dhdegsumhghpwvld")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("bevnriincmvxator")
    public suspend fun stageKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stageKeys = mapped
    }

    /**
     * @param argument DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("qortiuisdcfdkdmd")
    public suspend fun stageKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiKeyStageKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.stageKeys = mapped
    }

    /**
     * @param argument DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("yujqseicukpbfqny")
    public suspend fun stageKeys(vararg argument: suspend ApiKeyStageKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApiKeyStageKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.stageKeys = mapped
    }

    /**
     * @param argument DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("bbogcileojishqph")
    public suspend fun stageKeys(argument: suspend ApiKeyStageKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ApiKeyStageKeyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.stageKeys = mapped
    }

    /**
     * @param values DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
     */
    @JvmName("qndxnpspvbklstaa")
    public suspend fun stageKeys(vararg values: ApiKeyStageKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stageKeys = mapped
    }

    /**
     * @param value The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("lekamkmjbgkriadg")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("tqpnopdxlqxbtett")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("xuelnsjlfuqiocvw")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("weamxrdryhixesxb")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.
     */
    @JvmName("rrsnfvteladmxtro")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies a value of the API key.
     */
    @JvmName("syeaojpkufhweiil")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    internal fun build(): ApiKeyArgs = ApiKeyArgs(
        customerId = customerId,
        description = description,
        enabled = enabled,
        generateDistinctId = generateDistinctId,
        name = name,
        stageKeys = stageKeys,
        tags = tags,
        `value` = `value`,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy