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

com.pulumi.awsnative.guardduty.kotlin.ThreatIntelSet.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.guardduty.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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

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

    public var args: ThreatIntelSetArgs = ThreatIntelSetArgs()

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

/**
 * Resource Type definition for AWS::GuardDuty::ThreatIntelSet
 */
public class ThreatIntelSet internal constructor(
    override val javaResource: com.pulumi.awsnative.guardduty.ThreatIntelSet,
) : KotlinCustomResource(javaResource, ThreatIntelSetMapper) {
    /**
     * A Boolean value that indicates whether GuardDuty is to start using the uploaded ThreatIntelSet.
     */
    public val activate: Output?
        get() = javaResource.activate().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The unique ID of the `threatIntelSet` .
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The unique ID of the detector of the GuardDuty account that you want to create a threatIntelSet for.
     */
    public val detectorId: Output?
        get() = javaResource.detectorId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The format of the file that contains the ThreatIntelSet.
     */
    public val format: Output
        get() = javaResource.format().applyValue({ args0 -> args0 })

    /**
     * The URI of the file that contains the ThreatIntelSet.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * A user-friendly ThreatIntelSet name displayed in all findings that are generated by activity that involves IP addresses included in this ThreatIntelSet.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The tags to be added to a new threat list resource. Each tag consists of a key and an optional value, both of which you define.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ThreatIntelSetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.guardduty.ThreatIntelSet::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy