com.pulumi.awsnative.connect.kotlin.SecurityKey.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.connect.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [SecurityKey].
*/
@PulumiTagMarker
public class SecurityKeyResourceBuilder internal constructor() {
public var name: String? = null
public var args: SecurityKeyArgs = SecurityKeyArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend SecurityKeyArgsBuilder.() -> Unit) {
val builder = SecurityKeyArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): SecurityKey {
val builtJavaResource = com.pulumi.awsnative.connect.SecurityKey(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SecurityKey(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Connect::SecurityKey
* ## Example Usage
* ### Example
* No Java example available.
*/
public class SecurityKey internal constructor(
override val javaResource: com.pulumi.awsnative.connect.SecurityKey,
) : KotlinCustomResource(javaResource, SecurityKeyMapper) {
/**
* An `AssociationId` is automatically generated when a storage config is associated with an instance.
*/
public val associationId: Output
get() = javaResource.associationId().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the instance.
* *Minimum* : `1`
* *Maximum* : `100`
*/
public val instanceId: Output
get() = javaResource.instanceId().applyValue({ args0 -> args0 })
/**
* A valid security key in PEM format. For example:
* `"-----BEGIN PUBLIC KEY-----\ [a lot of characters] ----END PUBLIC KEY-----"`
* *Minimum* : `1`
* *Maximum* : `1024`
*/
public val key: Output
get() = javaResource.key().applyValue({ args0 -> args0 })
}
public object SecurityKeyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.connect.SecurityKey::class == javaResource::class
override fun map(javaResource: Resource): SecurityKey = SecurityKey(
javaResource as
com.pulumi.awsnative.connect.SecurityKey,
)
}
/**
* @see [SecurityKey].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SecurityKey].
*/
public suspend fun securityKey(name: String, block: suspend SecurityKeyResourceBuilder.() -> Unit): SecurityKey {
val builder = SecurityKeyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SecurityKey].
* @param name The _unique_ name of the resulting resource.
*/
public fun securityKey(name: String): SecurityKey {
val builder = SecurityKeyResourceBuilder()
builder.name(name)
return builder.build()
}