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

com.pulumi.awsnative.organizations.kotlin.AccountArgs.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.organizations.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.organizations.AccountArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * You can use AWS::Organizations::Account to manage accounts in organization.
 * @property accountName The friendly name of the member account.
 * @property email The email address of the owner to assign to the new member account.
 * @property parentIds List of parent nodes for the member account. Currently only one parent at a time is supported. Default is root.
 * @property roleName The name of an IAM role that AWS Organizations automatically preconfigures in the new member account. Default name is OrganizationAccountAccessRole if not specified.
 * @property tags A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
 */
public data class AccountArgs(
    public val accountName: Output? = null,
    public val email: Output? = null,
    public val parentIds: Output>? = null,
    public val roleName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.organizations.AccountArgs =
        com.pulumi.awsnative.organizations.AccountArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .email(email?.applyValue({ args0 -> args0 }))
            .parentIds(parentIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .roleName(roleName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AccountArgs].
 */
@PulumiTagMarker
public class AccountArgsBuilder internal constructor() {
    private var accountName: Output? = null

    private var email: Output? = null

    private var parentIds: Output>? = null

    private var roleName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The friendly name of the member account.
     */
    @JvmName("udgecinqdqhyromy")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value The email address of the owner to assign to the new member account.
     */
    @JvmName("ypbhsvytctududuh")
    public suspend fun email(`value`: Output) {
        this.email = value
    }

    /**
     * @param value List of parent nodes for the member account. Currently only one parent at a time is supported. Default is root.
     */
    @JvmName("fsbffebaonqivaaw")
    public suspend fun parentIds(`value`: Output>) {
        this.parentIds = value
    }

    @JvmName("gdefowelpjcugthd")
    public suspend fun parentIds(vararg values: Output) {
        this.parentIds = Output.all(values.asList())
    }

    /**
     * @param values List of parent nodes for the member account. Currently only one parent at a time is supported. Default is root.
     */
    @JvmName("dlgcalmpdilqcdjm")
    public suspend fun parentIds(values: List>) {
        this.parentIds = Output.all(values)
    }

    /**
     * @param value The name of an IAM role that AWS Organizations automatically preconfigures in the new member account. Default name is OrganizationAccountAccessRole if not specified.
     */
    @JvmName("rofpjkebkmatgkpm")
    public suspend fun roleName(`value`: Output) {
        this.roleName = value
    }

    /**
     * @param value A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("vnhwlfelduhccduf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("mgvncddevejqpmkt")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("dbdgkklyppeomidj")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The friendly name of the member account.
     */
    @JvmName("xcbsrtojqkwwnkni")
    public suspend fun accountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountName = mapped
    }

    /**
     * @param value The email address of the owner to assign to the new member account.
     */
    @JvmName("ytdbortheffpfuio")
    public suspend fun email(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.email = mapped
    }

    /**
     * @param value List of parent nodes for the member account. Currently only one parent at a time is supported. Default is root.
     */
    @JvmName("satkxisfcxbmfdgm")
    public suspend fun parentIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentIds = mapped
    }

    /**
     * @param values List of parent nodes for the member account. Currently only one parent at a time is supported. Default is root.
     */
    @JvmName("vapisnnkleyjhshb")
    public suspend fun parentIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parentIds = mapped
    }

    /**
     * @param value The name of an IAM role that AWS Organizations automatically preconfigures in the new member account. Default name is OrganizationAccountAccessRole if not specified.
     */
    @JvmName("pnkbpjrfrxhxdygl")
    public suspend fun roleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleName = mapped
    }

    /**
     * @param value A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("xljlelucblndosou")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("yrvdlpdxigoaltah")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("owophilplyiofbsh")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("cxnwelmkrvtxoygg")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value.
     */
    @JvmName("tvrdfspcmjdlkvyu")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AccountArgs = AccountArgs(
        accountName = accountName,
        email = email,
        parentIds = parentIds,
        roleName = roleName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy