com.pulumi.awsnative.iot.kotlin.SecurityProfile.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.iot.kotlin
import com.pulumi.awsnative.iot.kotlin.outputs.MetricsExportConfigProperties
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileAlertTarget
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileBehavior
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileMetricToRetain
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 kotlin.collections.Map
import com.pulumi.awsnative.iot.kotlin.outputs.MetricsExportConfigProperties.Companion.toKotlin as metricsExportConfigPropertiesToKotlin
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileAlertTarget.Companion.toKotlin as securityProfileAlertTargetToKotlin
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileBehavior.Companion.toKotlin as securityProfileBehaviorToKotlin
import com.pulumi.awsnative.iot.kotlin.outputs.SecurityProfileMetricToRetain.Companion.toKotlin as securityProfileMetricToRetainToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [SecurityProfile].
*/
@PulumiTagMarker
public class SecurityProfileResourceBuilder internal constructor() {
public var name: String? = null
public var args: SecurityProfileArgs = SecurityProfileArgs()
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 SecurityProfileArgsBuilder.() -> Unit) {
val builder = SecurityProfileArgsBuilder()
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(): SecurityProfile {
val builtJavaResource = com.pulumi.awsnative.iot.SecurityProfile(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SecurityProfile(builtJavaResource)
}
}
/**
* A security profile defines a set of expected behaviors for devices in your account.
*/
public class SecurityProfile internal constructor(
override val javaResource: com.pulumi.awsnative.iot.SecurityProfile,
) : KotlinCustomResource(javaResource, SecurityProfileMapper) {
/**
* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.
*/
public val additionalMetricsToRetainV2: Output>?
get() = javaResource.additionalMetricsToRetainV2().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
securityProfileMetricToRetainToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Specifies the destinations to which alerts are sent.
*/
public val alertTargets: Output