All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.inspectorv2.kotlin.CisScanConfiguration.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.inspectorv2.kotlin

import com.pulumi.awsnative.inspectorv2.kotlin.enums.CisScanConfigurationCisSecurityLevel
import com.pulumi.awsnative.inspectorv2.kotlin.outputs.CisScanConfigurationCisTargets
import com.pulumi.awsnative.inspectorv2.kotlin.outputs.CisScanConfigurationSchedule
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.Map
import com.pulumi.awsnative.inspectorv2.kotlin.enums.CisScanConfigurationCisSecurityLevel.Companion.toKotlin as cisScanConfigurationCisSecurityLevelToKotlin
import com.pulumi.awsnative.inspectorv2.kotlin.outputs.CisScanConfigurationCisTargets.Companion.toKotlin as cisScanConfigurationCisTargetsToKotlin
import com.pulumi.awsnative.inspectorv2.kotlin.outputs.CisScanConfigurationSchedule.Companion.toKotlin as cisScanConfigurationScheduleToKotlin

/**
 * Builder for [CisScanConfiguration].
 */
@PulumiTagMarker
public class CisScanConfigurationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: CisScanConfigurationArgs = CisScanConfigurationArgs()

    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 CisScanConfigurationArgsBuilder.() -> Unit) {
        val builder = CisScanConfigurationArgsBuilder()
        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(): CisScanConfiguration {
        val builtJavaResource =
            com.pulumi.awsnative.inspectorv2.CisScanConfiguration(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return CisScanConfiguration(builtJavaResource)
    }
}

/**
 * CIS Scan Configuration resource schema
 */
public class CisScanConfiguration internal constructor(
    override val javaResource: com.pulumi.awsnative.inspectorv2.CisScanConfiguration,
) : KotlinCustomResource(javaResource, CisScanConfigurationMapper) {
    /**
     * CIS Scan configuration unique identifier
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Name of the scan
     */
    public val scanName: Output?
        get() = javaResource.scanName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The CIS scan configuration's schedule.
     */
    public val schedule: Output?
        get() = javaResource.schedule().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    cisScanConfigurationScheduleToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The CIS scan configuration's CIS Benchmark level.
     */
    public val securityLevel: Output?
        get() = javaResource.securityLevel().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> cisScanConfigurationCisSecurityLevelToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The CIS scan configuration's tags.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The CIS scan configuration's targets.
     */
    public val targets: Output?
        get() = javaResource.targets().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    cisScanConfigurationCisTargetsToKotlin(args0)
                })
            }).orElse(null)
        })
}

public object CisScanConfigurationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.inspectorv2.CisScanConfiguration::class == javaResource::class

    override fun map(javaResource: Resource): CisScanConfiguration = CisScanConfiguration(
        javaResource
            as com.pulumi.awsnative.inspectorv2.CisScanConfiguration,
    )
}

/**
 * @see [CisScanConfiguration].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [CisScanConfiguration].
 */
public suspend fun cisScanConfiguration(
    name: String,
    block: suspend CisScanConfigurationResourceBuilder.() -> Unit,
): CisScanConfiguration {
    val builder = CisScanConfigurationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [CisScanConfiguration].
 * @param name The _unique_ name of the resulting resource.
 */
public fun cisScanConfiguration(name: String): CisScanConfiguration {
    val builder = CisScanConfigurationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy