
com.pulumi.vault.managed.kotlin.Keys.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-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.vault.managed.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 com.pulumi.vault.managed.kotlin.outputs.KeysAw
import com.pulumi.vault.managed.kotlin.outputs.KeysAzure
import com.pulumi.vault.managed.kotlin.outputs.KeysPkc
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.vault.managed.kotlin.outputs.KeysAw.Companion.toKotlin as keysAwToKotlin
import com.pulumi.vault.managed.kotlin.outputs.KeysAzure.Companion.toKotlin as keysAzureToKotlin
import com.pulumi.vault.managed.kotlin.outputs.KeysPkc.Companion.toKotlin as keysPkcToKotlin
/**
* Builder for [Keys].
*/
@PulumiTagMarker
public class KeysResourceBuilder internal constructor() {
public var name: String? = null
public var args: KeysArgs = KeysArgs()
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 KeysArgsBuilder.() -> Unit) {
val builder = KeysArgsBuilder()
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(): Keys {
val builtJavaResource = com.pulumi.vault.managed.Keys(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Keys(builtJavaResource)
}
}
/**
* A resource that manages the lifecycle of all [Managed Keys](https://www.vaultproject.io/docs/enterprise/managed-keys) in Vault.
* **Note** this feature is available only with Vault Enterprise.
* ## Import
* Mounts can be imported using the `id` of `default`, e.g.
* ```sh
* $ pulumi import vault:managed/keys:Keys keys default
* ```
*/
public class Keys internal constructor(
override val javaResource: com.pulumi.vault.managed.Keys,
) : KotlinCustomResource(javaResource, KeysMapper) {
/**
* Configuration block for AWS Managed Keys
*/
public val aws: Output>?
get() = javaResource.aws().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> keysAwToKotlin(args0) })
})
}).orElse(null)
})
/**
* Configuration block for Azure Managed Keys
*/
public val azures: Output>?
get() = javaResource.azures().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> keysAzureToKotlin(args0) })
})
}).orElse(null)
})
/**
* Target namespace. (requires Enterprise)
*/
public val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Configuration block for PKCS Managed Keys
*/
public val pkcs: Output>?
get() = javaResource.pkcs().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> keysPkcToKotlin(args0) })
})
}).orElse(null)
})
}
public object KeysMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.managed.Keys::class == javaResource::class
override fun map(javaResource: Resource): Keys = Keys(
javaResource as
com.pulumi.vault.managed.Keys,
)
}
/**
* @see [Keys].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Keys].
*/
public suspend fun keys(name: String, block: suspend KeysResourceBuilder.() -> Unit): Keys {
val builder = KeysResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Keys].
* @param name The _unique_ name of the resulting resource.
*/
public fun keys(name: String): Keys {
val builder = KeysResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy