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

com.pulumi.googlenative.securitycenter.v1.kotlin.CustomModule.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.securitycenter.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.securitycenter.v1.kotlin.outputs.GoogleCloudSecuritycenterV1CustomConfigResponse
import com.pulumi.googlenative.securitycenter.v1.kotlin.outputs.GoogleCloudSecuritycenterV1CustomConfigResponse.Companion.toKotlin
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 [CustomModule].
 */
@PulumiTagMarker
public class CustomModuleResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: CustomModuleArgs = CustomModuleArgs()

    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 CustomModuleArgsBuilder.() -> Unit) {
        val builder = CustomModuleArgsBuilder()
        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(): CustomModule {
        val builtJavaResource =
            com.pulumi.googlenative.securitycenter.v1.CustomModule(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return CustomModule(builtJavaResource)
    }
}

/**
 * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.
 * Auto-naming is currently not supported for this resource.
 */
public class CustomModule internal constructor(
    override val javaResource: com.pulumi.googlenative.securitycenter.v1.CustomModule,
) : KotlinCustomResource(javaResource, CustomModuleMapper) {
    /**
     * If empty, indicates that the custom module was created in the organization, folder, or project in which you are viewing the custom module. Otherwise, `ancestor_module` specifies the organization or folder from which the custom module is inherited.
     */
    public val ancestorModule: Output
        get() = javaResource.ancestorModule().applyValue({ args0 -> args0 })

    /**
     * The user specified custom configuration for the module.
     */
    public val customConfig: Output
        get() = javaResource.customConfig().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })

    /**
     * The display name of the Security Health Analytics custom module. This display name becomes the finding category for all findings that are returned by this custom module. The display name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * The enablement state of the custom module.
     */
    public val enablementState: Output
        get() = javaResource.enablementState().applyValue({ args0 -> args0 })

    /**
     * The editor that last updated the custom module.
     */
    public val lastEditor: Output
        get() = javaResource.lastEditor().applyValue({ args0 -> args0 })

    /**
     * Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The time at which the custom module was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object CustomModuleMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.securitycenter.v1.CustomModule::class == javaResource::class

    override fun map(javaResource: Resource): CustomModule = CustomModule(
        javaResource as
            com.pulumi.googlenative.securitycenter.v1.CustomModule,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy