com.pulumi.cloudflare.kotlin.AccessKeysConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AccessKeysConfiguration].
*/
@PulumiTagMarker
public class AccessKeysConfigurationResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccessKeysConfigurationArgs = AccessKeysConfigurationArgs()
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 AccessKeysConfigurationArgsBuilder.() -> Unit) {
val builder = AccessKeysConfigurationArgsBuilder()
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(): AccessKeysConfiguration {
val builtJavaResource = com.pulumi.cloudflare.AccessKeysConfiguration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AccessKeysConfiguration(builtJavaResource)
}
}
/**
* Access Keys Configuration defines the rotation policy for the keys
* that access will use to sign data.
*/
public class AccessKeysConfiguration internal constructor(
override val javaResource: com.pulumi.cloudflare.AccessKeysConfiguration,
) : KotlinCustomResource(javaResource, AccessKeysConfigurationMapper) {
/**
* The account identifier to target for the resource.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
/**
* Number of days to trigger a rotation of the keys.
*/
public val keyRotationIntervalDays: Output
get() = javaResource.keyRotationIntervalDays().applyValue({ args0 -> args0 })
}
public object AccessKeysConfigurationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.AccessKeysConfiguration::class == javaResource::class
override fun map(javaResource: Resource): AccessKeysConfiguration =
AccessKeysConfiguration(javaResource as com.pulumi.cloudflare.AccessKeysConfiguration)
}
/**
* @see [AccessKeysConfiguration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AccessKeysConfiguration].
*/
public suspend fun accessKeysConfiguration(
name: String,
block: suspend AccessKeysConfigurationResourceBuilder.() -> Unit,
): AccessKeysConfiguration {
val builder = AccessKeysConfigurationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AccessKeysConfiguration].
* @param name The _unique_ name of the resulting resource.
*/
public fun accessKeysConfiguration(name: String): AccessKeysConfiguration {
val builder = AccessKeysConfigurationResourceBuilder()
builder.name(name)
return builder.build()
}