com.pulumi.awsnative.securitylake.kotlin.AwsLogSource.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.securitylake.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
import kotlin.collections.List
/**
* Builder for [AwsLogSource].
*/
@PulumiTagMarker
public class AwsLogSourceResourceBuilder internal constructor() {
public var name: String? = null
public var args: AwsLogSourceArgs = AwsLogSourceArgs()
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 AwsLogSourceArgsBuilder.() -> Unit) {
val builder = AwsLogSourceArgsBuilder()
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(): AwsLogSource {
val builtJavaResource = com.pulumi.awsnative.securitylake.AwsLogSource(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AwsLogSource(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SecurityLake::AwsLogSource
*/
public class AwsLogSource internal constructor(
override val javaResource: com.pulumi.awsnative.securitylake.AwsLogSource,
) : KotlinCustomResource(javaResource, AwsLogSourceMapper) {
/**
* AWS account where you want to collect logs from.
*/
public val accounts: Output>?
get() = javaResource.accounts().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The ARN for the data lake.
*/
public val dataLakeArn: Output
get() = javaResource.dataLakeArn().applyValue({ args0 -> args0 })
/**
* The name for a AWS source. This must be a Regionally unique value.
*/
public val sourceName: Output
get() = javaResource.sourceName().applyValue({ args0 -> args0 })
/**
* The version for a AWS source. This must be a Regionally unique value.
*/
public val sourceVersion: Output
get() = javaResource.sourceVersion().applyValue({ args0 -> args0 })
}
public object AwsLogSourceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.securitylake.AwsLogSource::class == javaResource::class
override fun map(javaResource: Resource): AwsLogSource = AwsLogSource(
javaResource as
com.pulumi.awsnative.securitylake.AwsLogSource,
)
}
/**
* @see [AwsLogSource].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AwsLogSource].
*/
public suspend fun awsLogSource(
name: String,
block: suspend AwsLogSourceResourceBuilder.() -> Unit,
): AwsLogSource {
val builder = AwsLogSourceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AwsLogSource].
* @param name The _unique_ name of the resulting resource.
*/
public fun awsLogSource(name: String): AwsLogSource {
val builder = AwsLogSourceResourceBuilder()
builder.name(name)
return builder.build()
}