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

com.pulumi.gcp.dataloss.kotlin.PreventionDiscoveryConfigArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.dataloss.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataloss.PreventionDiscoveryConfigArgs.builder
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigActionArgs
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigActionArgsBuilder
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigOrgConfigArgs
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigOrgConfigArgsBuilder
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigTargetArgs
import com.pulumi.gcp.dataloss.kotlin.inputs.PreventionDiscoveryConfigTargetArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Configuration for discovery to scan resources for profile generation. Only one discovery configuration may exist per organization, folder, or project.
 * To get more information about DiscoveryConfig, see:
 * * [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.locations.discoveryConfigs)
 * * How-to Guides
 *     * [Schedule inspection scan](https://cloud.google.com/dlp/docs/schedule-inspection-scan)
 * ## Example Usage
 * ## Import
 * DiscoveryConfig can be imported using any of these accepted formats:
 * * `{{parent}}/discoveryConfigs/{{name}}`
 * * `{{parent}}/{{name}}`
 * When using the `pulumi import` command, DiscoveryConfig can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:dataloss/preventionDiscoveryConfig:PreventionDiscoveryConfig default {{parent}}/discoveryConfigs/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataloss/preventionDiscoveryConfig:PreventionDiscoveryConfig default {{parent}}/{{name}}
 * ```
 * @property actions Actions to execute at the completion of scanning
 * Structure is documented below.
 * @property displayName Display Name (max 1000 Chars)
 * @property inspectTemplates Detection logic for profile generation
 * @property location Location to create the discovery config in.
 * - - -
 * @property orgConfig A nested object resource
 * Structure is documented below.
 * @property parent The parent of the discovery config in any of the following formats:
 * * `projects/{{project}}/locations/{{location}}`
 * * `organizations/{{organization_id}}/locations/{{location}}`
 * @property status Required. A status for this configuration
 * Possible values are: `RUNNING`, `PAUSED`.
 * @property targets Target to match against for determining what to scan and how frequently
 * Structure is documented below.
 */
public data class PreventionDiscoveryConfigArgs(
    public val actions: Output>? = null,
    public val displayName: Output? = null,
    public val inspectTemplates: Output>? = null,
    public val location: Output? = null,
    public val orgConfig: Output? = null,
    public val parent: Output? = null,
    public val status: Output? = null,
    public val targets: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataloss.PreventionDiscoveryConfigArgs =
        com.pulumi.gcp.dataloss.PreventionDiscoveryConfigArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .inspectTemplates(inspectTemplates?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .orgConfig(orgConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .parent(parent?.applyValue({ args0 -> args0 }))
            .status(status?.applyValue({ args0 -> args0 }))
            .targets(
                targets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PreventionDiscoveryConfigArgs].
 */
@PulumiTagMarker
public class PreventionDiscoveryConfigArgsBuilder internal constructor() {
    private var actions: Output>? = null

    private var displayName: Output? = null

    private var inspectTemplates: Output>? = null

    private var location: Output? = null

    private var orgConfig: Output? = null

    private var parent: Output? = null

    private var status: Output? = null

    private var targets: Output>? = null

    /**
     * @param value Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("cmnlgktrtuhlwmit")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("sgpscisuyhlrblms")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value Display Name (max 1000 Chars)
     */
    @JvmName("xvlnsctsafffgonr")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Detection logic for profile generation
     */
    @JvmName("lpugtgyqxqcvlicc")
    public suspend fun inspectTemplates(`value`: Output>) {
        this.inspectTemplates = value
    }

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

    /**
     * @param values Detection logic for profile generation
     */
    @JvmName("ubebxdparygkldtc")
    public suspend fun inspectTemplates(values: List>) {
        this.inspectTemplates = Output.all(values)
    }

    /**
     * @param value Location to create the discovery config in.
     * - - -
     */
    @JvmName("wymrmamsnixpfyrw")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A nested object resource
     * Structure is documented below.
     */
    @JvmName("vuumipbusukbqxne")
    public suspend fun orgConfig(`value`: Output) {
        this.orgConfig = value
    }

    /**
     * @param value The parent of the discovery config in any of the following formats:
     * * `projects/{{project}}/locations/{{location}}`
     * * `organizations/{{organization_id}}/locations/{{location}}`
     */
    @JvmName("xqfoupfoatgulpjv")
    public suspend fun parent(`value`: Output) {
        this.parent = value
    }

    /**
     * @param value Required. A status for this configuration
     * Possible values are: `RUNNING`, `PAUSED`.
     */
    @JvmName("ohufqpptffeicaex")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("cjuffydknsoqmlhs")
    public suspend fun targets(`value`: Output>) {
        this.targets = value
    }

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

    /**
     * @param values Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("mugciqscppjrdfje")
    public suspend fun targets(values: List>) {
        this.targets = Output.all(values)
    }

    /**
     * @param value Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("hphevlwexecyrtde")
    public suspend fun actions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("ofmhrgoaftnrlhuh")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PreventionDiscoveryConfigActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("ohxaiyyrhvmixpla")
    public suspend fun actions(vararg argument: suspend PreventionDiscoveryConfigActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PreventionDiscoveryConfigActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("tergmtrotluddecb")
    public suspend fun actions(argument: suspend PreventionDiscoveryConfigActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PreventionDiscoveryConfigActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values Actions to execute at the completion of scanning
     * Structure is documented below.
     */
    @JvmName("cgmucqslsiplygjm")
    public suspend fun actions(vararg values: PreventionDiscoveryConfigActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value Display Name (max 1000 Chars)
     */
    @JvmName("orjnblwanxkaxylf")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Detection logic for profile generation
     */
    @JvmName("qkwegtxemaowiqce")
    public suspend fun inspectTemplates(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inspectTemplates = mapped
    }

    /**
     * @param values Detection logic for profile generation
     */
    @JvmName("bcmudqwmajndulyo")
    public suspend fun inspectTemplates(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inspectTemplates = mapped
    }

    /**
     * @param value Location to create the discovery config in.
     * - - -
     */
    @JvmName("gygurdmlqayyboyt")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A nested object resource
     * Structure is documented below.
     */
    @JvmName("xaicegtptpwvnjyh")
    public suspend fun orgConfig(`value`: PreventionDiscoveryConfigOrgConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orgConfig = mapped
    }

    /**
     * @param argument A nested object resource
     * Structure is documented below.
     */
    @JvmName("urbxyeacgfpgyiqa")
    public suspend fun orgConfig(argument: suspend PreventionDiscoveryConfigOrgConfigArgsBuilder.() -> Unit) {
        val toBeMapped = PreventionDiscoveryConfigOrgConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.orgConfig = mapped
    }

    /**
     * @param value The parent of the discovery config in any of the following formats:
     * * `projects/{{project}}/locations/{{location}}`
     * * `organizations/{{organization_id}}/locations/{{location}}`
     */
    @JvmName("uecykjhuoxsqnixg")
    public suspend fun parent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parent = mapped
    }

    /**
     * @param value Required. A status for this configuration
     * Possible values are: `RUNNING`, `PAUSED`.
     */
    @JvmName("pgwlugwevekghkxt")
    public suspend fun status(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("qqbhrrcnufjyiuth")
    public suspend fun targets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targets = mapped
    }

    /**
     * @param argument Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("ipyfcbblolmyuacn")
    public suspend fun targets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PreventionDiscoveryConfigTargetArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param argument Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("hcxvxjngagligqlj")
    public suspend fun targets(vararg argument: suspend PreventionDiscoveryConfigTargetArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PreventionDiscoveryConfigTargetArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param argument Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("xgpkjeitcgwaomse")
    public suspend fun targets(argument: suspend PreventionDiscoveryConfigTargetArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PreventionDiscoveryConfigTargetArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.targets = mapped
    }

    /**
     * @param values Target to match against for determining what to scan and how frequently
     * Structure is documented below.
     */
    @JvmName("rqgalgfofjmyomqg")
    public suspend fun targets(vararg values: PreventionDiscoveryConfigTargetArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targets = mapped
    }

    internal fun build(): PreventionDiscoveryConfigArgs = PreventionDiscoveryConfigArgs(
        actions = actions,
        displayName = displayName,
        inspectTemplates = inspectTemplates,
        location = location,
        orgConfig = orgConfig,
        parent = parent,
        status = status,
        targets = targets,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy