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

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

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

package com.pulumi.awsnative.guardduty.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

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

    public var args: MemberArgs = MemberArgs()

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

/**
 * Resource Type definition for AWS::GuardDuty::Member
 */
public class Member internal constructor(
    override val javaResource: com.pulumi.awsnative.guardduty.Member,
) : KotlinCustomResource(javaResource, MemberMapper) {
    /**
     * The ID of the detector associated with the GuardDuty service to add the member to.
     */
    public val detectorId: Output?
        get() = javaResource.detectorId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies whether or not to disable email notification for the member account that you invite.
     */
    public val disableEmailNotification: Output?
        get() = javaResource.disableEmailNotification().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The email address associated with the member account.
     */
    public val email: Output
        get() = javaResource.email().applyValue({ args0 -> args0 })

    /**
     * The AWS account ID of the account to designate as a member.
     */
    public val memberId: Output?
        get() = javaResource.memberId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The invitation message that you want to send to the accounts that you're inviting to GuardDuty as members.
     */
    public val message: Output?
        get() = javaResource.message().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * You can use the `Status` property to update the status of the relationship between the member account and its administrator account. Valid values are `Created` and `Invited` when using an `AWS::GuardDuty::Member` resource. If the value for this property is not provided or set to `Created` , a member account is created but not invited. If the value of this property is set to `Invited` , a member account is created and invited.
     */
    public val status: Output?
        get() = javaResource.status().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy