com.pulumi.awsnative.securityhub.kotlin.Insight.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.securityhub.kotlin
import com.pulumi.awsnative.securityhub.kotlin.outputs.InsightAwsSecurityFindingFilters
import com.pulumi.awsnative.securityhub.kotlin.outputs.InsightAwsSecurityFindingFilters.Companion.toKotlin
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
/**
* Builder for [Insight].
*/
@PulumiTagMarker
public class InsightResourceBuilder internal constructor() {
public var name: String? = null
public var args: InsightArgs = InsightArgs()
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 InsightArgsBuilder.() -> Unit) {
val builder = InsightArgsBuilder()
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(): Insight {
val builtJavaResource = com.pulumi.awsnative.securityhub.Insight(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Insight(builtJavaResource)
}
}
/**
* The AWS::SecurityHub::Insight resource represents the AWS Security Hub Insight in your account. An AWS Security Hub insight is a collection of related findings.
*/
public class Insight internal constructor(
override val javaResource: com.pulumi.awsnative.securityhub.Insight,
) : KotlinCustomResource(javaResource, InsightMapper) {
/**
* One or more attributes used to filter the findings included in the insight
*/
public val filters: Output
get() = javaResource.filters().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The grouping attribute for the insight's findings
*/
public val groupByAttribute: Output
get() = javaResource.groupByAttribute().applyValue({ args0 -> args0 })
/**
* The ARN of a Security Hub insight
*/
public val insightArn: Output
get() = javaResource.insightArn().applyValue({ args0 -> args0 })
/**
* The name of a Security Hub insight
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
}
public object InsightMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.securityhub.Insight::class == javaResource::class
override fun map(javaResource: Resource): Insight = Insight(
javaResource as
com.pulumi.awsnative.securityhub.Insight,
)
}
/**
* @see [Insight].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Insight].
*/
public suspend fun insight(name: String, block: suspend InsightResourceBuilder.() -> Unit): Insight {
val builder = InsightResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Insight].
* @param name The _unique_ name of the resulting resource.
*/
public fun insight(name: String): Insight {
val builder = InsightResourceBuilder()
builder.name(name)
return builder.build()
}