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

com.pulumi.awsnative.organizations.kotlin.OrganizationalUnitArgs.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.OrganizationalUnitArgs.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 organizational units (OUs) to group accounts together to administer as a single unit. This greatly simplifies the management of your accounts. For example, you can attach a policy-based control to an OU, and all accounts within the OU automatically inherit the policy. You can create multiple OUs within a single organization, and you can create OUs within other OUs. Each OU can contain multiple accounts, and you can move accounts from one OU to another. However, OU names must be unique within a parent OU or root.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property name The friendly name of this OU.
 * @property parentId The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
 * @property tags A list of tags that you want to attach to the newly created OU.
 */
public data class OrganizationalUnitArgs(
    public val name: Output? = null,
    public val parentId: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.organizations.OrganizationalUnitArgs =
        com.pulumi.awsnative.organizations.OrganizationalUnitArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .parentId(parentId?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [OrganizationalUnitArgs].
 */
@PulumiTagMarker
public class OrganizationalUnitArgsBuilder internal constructor() {
    private var name: Output? = null

    private var parentId: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The friendly name of this OU.
     */
    @JvmName("fwtlsodycuarwgkk")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
     */
    @JvmName("qrbdmmnsmlpwassc")
    public suspend fun parentId(`value`: Output) {
        this.parentId = value
    }

    /**
     * @param value A list of tags that you want to attach to the newly created OU.
     */
    @JvmName("ugcvrkgaljglpgvp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("hfpasjpccdnkxxln")
    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 OU.
     */
    @JvmName("xureqjpvxoeratqn")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

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

    /**
     * @param value The unique identifier (ID) of the parent root or OU that you want to create the new OU in.
     */
    @JvmName("rshfyajakpnddkvi")
    public suspend fun parentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentId = mapped
    }

    /**
     * @param value A list of tags that you want to attach to the newly created OU.
     */
    @JvmName("ldhjnpkfinoxnqnv")
    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 OU.
     */
    @JvmName("rjfrxkatiespfbgu")
    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 OU.
     */
    @JvmName("gladqoudnelreryh")
    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 OU.
     */
    @JvmName("jojgvtacvsrtwyxp")
    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 OU.
     */
    @JvmName("cblrecguotiytbeu")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): OrganizationalUnitArgs = OrganizationalUnitArgs(
        name = name,
        parentId = parentId,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy