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

com.pulumi.awsnative.guardduty.kotlin.MalwareProtectionPlan.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.guardduty.kotlin

import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnActions
import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnProtectedResource
import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnStatusReasons
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnActions.Companion.toKotlin as malwareProtectionPlanCfnActionsToKotlin
import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnProtectedResource.Companion.toKotlin as malwareProtectionPlanCfnProtectedResourceToKotlin
import com.pulumi.awsnative.guardduty.kotlin.outputs.MalwareProtectionPlanCfnStatusReasons.Companion.toKotlin as malwareProtectionPlanCfnStatusReasonsToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: MalwareProtectionPlanArgs = MalwareProtectionPlanArgs()

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

/**
 * Resource Type definition for AWS::GuardDuty::MalwareProtectionPlan
 */
public class MalwareProtectionPlan internal constructor(
    override val javaResource: com.pulumi.awsnative.guardduty.MalwareProtectionPlan,
) : KotlinCustomResource(javaResource, MalwareProtectionPlanMapper) {
    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     */
    public val actions: Output?
        get() = javaResource.actions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    malwareProtectionPlanCfnActionsToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Amazon Resource Name (ARN) of the protected resource.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The timestamp when the Malware Protection plan resource was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * A unique identifier associated with Malware Protection plan resource.
     */
    public val malwareProtectionPlanId: Output
        get() = javaResource.malwareProtectionPlanId().applyValue({ args0 -> args0 })

    /**
     * Information about the protected resource. Presently, S3Bucket is the only supported protected resource.
     */
    public val protectedResource: Output
        get() = javaResource.protectedResource().applyValue({ args0 ->
            args0.let({ args0 ->
                malwareProtectionPlanCfnProtectedResourceToKotlin(args0)
            })
        })

    /**
     * IAM role that includes the permissions required to scan and (optionally) add tags to the associated protected resource.
     */
    public val role: Output
        get() = javaResource.role().applyValue({ args0 -> args0 })

    /**
     * Status of the Malware Protection plan resource.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 -> args0 })

    /**
     * Status details associated with the Malware Protection plan resource status.
     */
    public val statusReasons: Output>
        get() = javaResource.statusReasons().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> malwareProtectionPlanCfnStatusReasonsToKotlin(args0) })
            })
        })

    /**
     * The tags to be added to the created Malware Protection plan resource. Each tag consists of a key and an optional value, both of which you need to specify.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy