com.pulumi.awsnative.athena.kotlin.WorkGroup.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.athena.kotlin
import com.pulumi.awsnative.athena.kotlin.enums.WorkGroupState
import com.pulumi.awsnative.athena.kotlin.outputs.WorkGroupConfiguration
import com.pulumi.awsnative.athena.kotlin.outputs.WorkGroupConfigurationUpdates
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.athena.kotlin.enums.WorkGroupState.Companion.toKotlin as workGroupStateToKotlin
import com.pulumi.awsnative.athena.kotlin.outputs.WorkGroupConfiguration.Companion.toKotlin as workGroupConfigurationToKotlin
import com.pulumi.awsnative.athena.kotlin.outputs.WorkGroupConfigurationUpdates.Companion.toKotlin as workGroupConfigurationUpdatesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [WorkGroup].
*/
@PulumiTagMarker
public class WorkGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: WorkGroupArgs = WorkGroupArgs()
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 WorkGroupArgsBuilder.() -> Unit) {
val builder = WorkGroupArgsBuilder()
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(): WorkGroup {
val builtJavaResource = com.pulumi.awsnative.athena.WorkGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return WorkGroup(builtJavaResource)
}
}
/**
* Resource schema for AWS::Athena::WorkGroup
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class WorkGroup internal constructor(
override val javaResource: com.pulumi.awsnative.athena.WorkGroup,
) : KotlinCustomResource(javaResource, WorkGroupMapper) {
/**
* The date and time the workgroup was created.
*/
public val creationTime: Output
get() = javaResource.creationTime().applyValue({ args0 -> args0 })
/**
* The workgroup description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The workGroup name.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The option to delete the workgroup and its contents even if the workgroup contains any named queries.
*/
public val recursiveDeleteOption: Output?
get() = javaResource.recursiveDeleteOption().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The state of the workgroup: ENABLED or DISABLED.
*/
public val state: Output?
get() = javaResource.state().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
workGroupStateToKotlin(args0)
})
}).orElse(null)
})
/**
* One or more tags, separated by commas, that you want to attach to the workgroup as you create it
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The workgroup configuration
*/
public val workGroupConfiguration: Output?
get() = javaResource.workGroupConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> workGroupConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The workgroup configuration update object
*/
public val workGroupConfigurationUpdates: Output?
get() = javaResource.workGroupConfigurationUpdates().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> workGroupConfigurationUpdatesToKotlin(args0) })
}).orElse(null)
})
}
public object WorkGroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.athena.WorkGroup::class == javaResource::class
override fun map(javaResource: Resource): WorkGroup = WorkGroup(
javaResource as
com.pulumi.awsnative.athena.WorkGroup,
)
}
/**
* @see [WorkGroup].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [WorkGroup].
*/
public suspend fun workGroup(name: String, block: suspend WorkGroupResourceBuilder.() -> Unit): WorkGroup {
val builder = WorkGroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [WorkGroup].
* @param name The _unique_ name of the resulting resource.
*/
public fun workGroup(name: String): WorkGroup {
val builder = WorkGroupResourceBuilder()
builder.name(name)
return builder.build()
}