com.pulumi.awsnative.apigateway.kotlin.ApiKeyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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