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

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

package com.pulumi.awsnative.securityhub.kotlin

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.Map

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

    public var args: HubArgs = HubArgs()

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

/**
 * The AWS::SecurityHub::Hub resource represents the implementation of the AWS Security Hub service in your account. One hub resource is created for each Region in which you enable Security Hub.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class Hub internal constructor(
    override val javaResource: com.pulumi.awsnative.securityhub.Hub,
) : KotlinCustomResource(javaResource, HubMapper) {
    /**
     * An ARN is automatically created for the customer.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Whether to automatically enable new controls when they are added to standards that are enabled
     */
    public val autoEnableControls: Output?
        get() = javaResource.autoEnableControls().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * This field, used when enabling Security Hub, specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.  If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.
     */
    public val controlFindingGenerator: Output?
        get() = javaResource.controlFindingGenerator().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Whether to enable the security standards that Security Hub has designated as automatically enabled.
     */
    public val enableDefaultStandards: Output?
        get() = javaResource.enableDefaultStandards().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The date and time when Security Hub was enabled in the account.
     */
    public val subscribedAt: Output
        get() = javaResource.subscribedAt().applyValue({ args0 -> args0 })

    /**
     * An array of key-value pairs to apply to this resource.
     * 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.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy