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

com.pulumi.awsnative.securityhub.kotlin.FindingAggregator.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.securityhub.kotlin

import com.pulumi.awsnative.securityhub.kotlin.enums.FindingAggregatorRegionLinkingMode
import com.pulumi.awsnative.securityhub.kotlin.enums.FindingAggregatorRegionLinkingMode.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 [FindingAggregator].
 */
@PulumiTagMarker
public class FindingAggregatorResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: FindingAggregatorArgs = FindingAggregatorArgs()

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

/**
 * The AWS::SecurityHub::FindingAggregator resource represents the AWS Security Hub Finding Aggregator in your account. One finding aggregator resource is created for each account in non opt-in region in which you configure region linking mode.
 */
public class FindingAggregator internal constructor(
    override val javaResource: com.pulumi.awsnative.securityhub.FindingAggregator,
) : KotlinCustomResource(javaResource, FindingAggregatorMapper) {
    /**
     * The aggregation Region of the FindingAggregator
     */
    public val findingAggregationRegion: Output
        get() = javaResource.findingAggregationRegion().applyValue({ args0 -> args0 })

    /**
     * The ARN of the FindingAggregator being created and assigned as the unique identifier
     */
    public val findingAggregatorArn: Output
        get() = javaResource.findingAggregatorArn().applyValue({ args0 -> args0 })

    /**
     * Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions
     */
    public val regionLinkingMode: Output
        get() = javaResource.regionLinkingMode().applyValue({ args0 ->
            args0.let({ args0 ->
                toKotlin(args0)
            })
        })

    /**
     * The list of excluded Regions or included Regions
     */
    public val regions: Output>?
        get() = javaResource.regions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }).orElse(null)
        })
}

public object FindingAggregatorMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.securityhub.FindingAggregator::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy