com.pulumi.awsnative.controltower.kotlin.EnabledBaseline.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.controltower.kotlin
import com.pulumi.awsnative.controltower.kotlin.outputs.EnabledBaselineParameter
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import kotlin.collections.List
import com.pulumi.awsnative.controltower.kotlin.outputs.EnabledBaselineParameter.Companion.toKotlin as enabledBaselineParameterToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [EnabledBaseline].
*/
@PulumiTagMarker
public class EnabledBaselineResourceBuilder internal constructor() {
public var name: String? = null
public var args: EnabledBaselineArgs = EnabledBaselineArgs()
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 EnabledBaselineArgsBuilder.() -> Unit) {
val builder = EnabledBaselineArgsBuilder()
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(): EnabledBaseline {
val builtJavaResource =
com.pulumi.awsnative.controltower.EnabledBaseline(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EnabledBaseline(builtJavaResource)
}
}
/**
* Definition of AWS::ControlTower::EnabledBaseline Resource Type
*/
public class EnabledBaseline internal constructor(
override val javaResource: com.pulumi.awsnative.controltower.EnabledBaseline,
) : KotlinCustomResource(javaResource, EnabledBaselineMapper) {
/**
* The specific `Baseline` enabled as part of the `EnabledBaseline` resource.
*/
public val baselineIdentifier: Output
get() = javaResource.baselineIdentifier().applyValue({ args0 -> args0 })
/**
* The enabled version of the `Baseline` .
*/
public val baselineVersion: Output
get() = javaResource.baselineVersion().applyValue({ args0 -> args0 })
/**
* The ARN of the `EnabledBaseline` resource.
*/
public val enabledBaselineIdentifier: Output
get() = javaResource.enabledBaselineIdentifier().applyValue({ args0 -> args0 })
/**
* Parameters that are applied when enabling this `Baseline` . These parameters configure the behavior of the baseline.
*/
public val parameters: Output>?
get() = javaResource.parameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> enabledBaselineParameterToKotlin(args0) })
})
}).orElse(null)
})
/**
* Tags associated with input to `EnableBaseline` .
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The target on which to enable the `Baseline` .
*/
public val targetIdentifier: Output
get() = javaResource.targetIdentifier().applyValue({ args0 -> args0 })
}
public object EnabledBaselineMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.controltower.EnabledBaseline::class == javaResource::class
override fun map(javaResource: Resource): EnabledBaseline = EnabledBaseline(
javaResource as
com.pulumi.awsnative.controltower.EnabledBaseline,
)
}
/**
* @see [EnabledBaseline].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EnabledBaseline].
*/
public suspend fun enabledBaseline(
name: String,
block: suspend EnabledBaselineResourceBuilder.() -> Unit,
): EnabledBaseline {
val builder = EnabledBaselineResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EnabledBaseline].
* @param name The _unique_ name of the resulting resource.
*/
public fun enabledBaseline(name: String): EnabledBaseline {
val builder = EnabledBaselineResourceBuilder()
builder.name(name)
return builder.build()
}