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

com.pulumi.googlenative.websecurityscanner.v1.kotlin.ScanConfigArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.websecurityscanner.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.websecurityscanner.v1.ScanConfigArgs.builder
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.enums.ScanConfigExportToSecurityCommandCenter
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.enums.ScanConfigRiskLevel
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.enums.ScanConfigUserAgent
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.inputs.AuthenticationArgs
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.inputs.AuthenticationArgsBuilder
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.inputs.ScheduleArgs
import com.pulumi.googlenative.websecurityscanner.v1.kotlin.inputs.ScheduleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a new ScanConfig.
 * @property authentication The authentication configuration. If specified, service will use the authentication configuration during scanning.
 * @property blacklistPatterns The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
 * @property displayName The user provided display name of the ScanConfig.
 * @property exportToSecurityCommandCenter Controls export of scan configurations and results to Security Command Center.
 * @property ignoreHttpStatusErrors Whether to keep scanning even if most requests return HTTP error codes.
 * @property managedScan Whether the scan config is managed by Web Security Scanner, output only.
 * @property maxQps The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
 * @property name The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
 * @property project
 * @property riskLevel The risk level selected for the scan
 * @property schedule The schedule of the ScanConfig.
 * @property startingUrls The starting URLs from which the scanner finds site pages.
 * @property staticIpScan Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.
 * @property userAgent The user agent used during scanning.
 */
public data class ScanConfigArgs(
    public val authentication: Output? = null,
    public val blacklistPatterns: Output>? = null,
    public val displayName: Output? = null,
    public val exportToSecurityCommandCenter: Output? = null,
    public val ignoreHttpStatusErrors: Output? = null,
    public val managedScan: Output? = null,
    public val maxQps: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val riskLevel: Output? = null,
    public val schedule: Output? = null,
    public val startingUrls: Output>? = null,
    public val staticIpScan: Output? = null,
    public val userAgent: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.websecurityscanner.v1.ScanConfigArgs =
        com.pulumi.googlenative.websecurityscanner.v1.ScanConfigArgs.builder()
            .authentication(authentication?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .blacklistPatterns(blacklistPatterns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .exportToSecurityCommandCenter(
                exportToSecurityCommandCenter?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .ignoreHttpStatusErrors(ignoreHttpStatusErrors?.applyValue({ args0 -> args0 }))
            .managedScan(managedScan?.applyValue({ args0 -> args0 }))
            .maxQps(maxQps?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .riskLevel(riskLevel?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schedule(schedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .startingUrls(startingUrls?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .staticIpScan(staticIpScan?.applyValue({ args0 -> args0 }))
            .userAgent(userAgent?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ScanConfigArgs].
 */
@PulumiTagMarker
public class ScanConfigArgsBuilder internal constructor() {
    private var authentication: Output? = null

    private var blacklistPatterns: Output>? = null

    private var displayName: Output? = null

    private var exportToSecurityCommandCenter: Output? = null

    private var ignoreHttpStatusErrors: Output? = null

    private var managedScan: Output? = null

    private var maxQps: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var riskLevel: Output? = null

    private var schedule: Output? = null

    private var startingUrls: Output>? = null

    private var staticIpScan: Output? = null

    private var userAgent: Output? = null

    /**
     * @param value The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("hxrvoyrpojgytsxv")
    public suspend fun authentication(`value`: Output) {
        this.authentication = value
    }

    /**
     * @param value The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("sjrxamxpmajhqexu")
    public suspend fun blacklistPatterns(`value`: Output>) {
        this.blacklistPatterns = value
    }

    @JvmName("ylfxdodxccvqtlhc")
    public suspend fun blacklistPatterns(vararg values: Output) {
        this.blacklistPatterns = Output.all(values.asList())
    }

    /**
     * @param values The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("ssykndeyjbbgongg")
    public suspend fun blacklistPatterns(values: List>) {
        this.blacklistPatterns = Output.all(values)
    }

    /**
     * @param value The user provided display name of the ScanConfig.
     */
    @JvmName("bjbwyykpalknsjxv")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Controls export of scan configurations and results to Security Command Center.
     */
    @JvmName("dqcbcemwqpuvgpmw")
    public suspend fun exportToSecurityCommandCenter(`value`: Output) {
        this.exportToSecurityCommandCenter = value
    }

    /**
     * @param value Whether to keep scanning even if most requests return HTTP error codes.
     */
    @JvmName("xyrarcekyfrmrqft")
    public suspend fun ignoreHttpStatusErrors(`value`: Output) {
        this.ignoreHttpStatusErrors = value
    }

    /**
     * @param value Whether the scan config is managed by Web Security Scanner, output only.
     */
    @JvmName("brwbpglscqiiwsss")
    public suspend fun managedScan(`value`: Output) {
        this.managedScan = value
    }

    /**
     * @param value The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
     */
    @JvmName("rgvolcsgxtpniriv")
    public suspend fun maxQps(`value`: Output) {
        this.maxQps = value
    }

    /**
     * @param value The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
     */
    @JvmName("itnileflwupxfbnq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("uqsnwvjyyycmvamn")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The risk level selected for the scan
     */
    @JvmName("ypvnptmardlkcwjg")
    public suspend fun riskLevel(`value`: Output) {
        this.riskLevel = value
    }

    /**
     * @param value The schedule of the ScanConfig.
     */
    @JvmName("xqptnpdonjrjqthw")
    public suspend fun schedule(`value`: Output) {
        this.schedule = value
    }

    /**
     * @param value The starting URLs from which the scanner finds site pages.
     */
    @JvmName("uwnvkljcyskaedkj")
    public suspend fun startingUrls(`value`: Output>) {
        this.startingUrls = value
    }

    @JvmName("vvextfrvkgjqejys")
    public suspend fun startingUrls(vararg values: Output) {
        this.startingUrls = Output.all(values.asList())
    }

    /**
     * @param values The starting URLs from which the scanner finds site pages.
     */
    @JvmName("wpiqoftxpeumjkvs")
    public suspend fun startingUrls(values: List>) {
        this.startingUrls = Output.all(values)
    }

    /**
     * @param value Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.
     */
    @JvmName("mrgtmxweeyrtrdws")
    public suspend fun staticIpScan(`value`: Output) {
        this.staticIpScan = value
    }

    /**
     * @param value The user agent used during scanning.
     */
    @JvmName("swmiyfmtbqwcgbng")
    public suspend fun userAgent(`value`: Output) {
        this.userAgent = value
    }

    /**
     * @param value The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("hwhyeucfpydvumjk")
    public suspend fun authentication(`value`: AuthenticationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authentication = mapped
    }

    /**
     * @param argument The authentication configuration. If specified, service will use the authentication configuration during scanning.
     */
    @JvmName("ulflllbpjwodabaj")
    public suspend fun authentication(argument: suspend AuthenticationArgsBuilder.() -> Unit) {
        val toBeMapped = AuthenticationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authentication = mapped
    }

    /**
     * @param value The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("aaeebddjkojeywex")
    public suspend fun blacklistPatterns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blacklistPatterns = mapped
    }

    /**
     * @param values The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
     */
    @JvmName("pgpvxsdapyvwvtff")
    public suspend fun blacklistPatterns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.blacklistPatterns = mapped
    }

    /**
     * @param value The user provided display name of the ScanConfig.
     */
    @JvmName("mcvhyphqsuaenxmb")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Controls export of scan configurations and results to Security Command Center.
     */
    @JvmName("bwrcuprtenmrabhp")
    public suspend fun exportToSecurityCommandCenter(`value`: ScanConfigExportToSecurityCommandCenter?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exportToSecurityCommandCenter = mapped
    }

    /**
     * @param value Whether to keep scanning even if most requests return HTTP error codes.
     */
    @JvmName("gedcjyentfhvtper")
    public suspend fun ignoreHttpStatusErrors(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ignoreHttpStatusErrors = mapped
    }

    /**
     * @param value Whether the scan config is managed by Web Security Scanner, output only.
     */
    @JvmName("jhnofrandowedkmf")
    public suspend fun managedScan(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedScan = mapped
    }

    /**
     * @param value The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
     */
    @JvmName("gtbwiqyqaljgymsq")
    public suspend fun maxQps(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxQps = mapped
    }

    /**
     * @param value The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
     */
    @JvmName("hymjrbyodkffaxfe")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("lvnsbuvdfpoxisxm")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The risk level selected for the scan
     */
    @JvmName("shjqxupafwcjmuff")
    public suspend fun riskLevel(`value`: ScanConfigRiskLevel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.riskLevel = mapped
    }

    /**
     * @param value The schedule of the ScanConfig.
     */
    @JvmName("sctypymriwejejqj")
    public suspend fun schedule(`value`: ScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedule = mapped
    }

    /**
     * @param argument The schedule of the ScanConfig.
     */
    @JvmName("hkinslrdqfydrksm")
    public suspend fun schedule(argument: suspend ScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schedule = mapped
    }

    /**
     * @param value The starting URLs from which the scanner finds site pages.
     */
    @JvmName("wlhofqtbarpvglpo")
    public suspend fun startingUrls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startingUrls = mapped
    }

    /**
     * @param values The starting URLs from which the scanner finds site pages.
     */
    @JvmName("hebgyhglgldvkdwn")
    public suspend fun startingUrls(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startingUrls = mapped
    }

    /**
     * @param value Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.
     */
    @JvmName("yoesbwusvnxninjo")
    public suspend fun staticIpScan(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.staticIpScan = mapped
    }

    /**
     * @param value The user agent used during scanning.
     */
    @JvmName("rrtetsurfotvsgmj")
    public suspend fun userAgent(`value`: ScanConfigUserAgent?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAgent = mapped
    }

    internal fun build(): ScanConfigArgs = ScanConfigArgs(
        authentication = authentication,
        blacklistPatterns = blacklistPatterns,
        displayName = displayName,
        exportToSecurityCommandCenter = exportToSecurityCommandCenter,
        ignoreHttpStatusErrors = ignoreHttpStatusErrors,
        managedScan = managedScan,
        maxQps = maxQps,
        name = name,
        project = project,
        riskLevel = riskLevel,
        schedule = schedule,
        startingUrls = startingUrls,
        staticIpScan = staticIpScan,
        userAgent = userAgent,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy