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

com.pulumi.awsnative.kotlin.inputs.ProviderAssumeRoleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.kotlin.inputs

import com.pulumi.awsnative.inputs.ProviderAssumeRoleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The configuration for a Provider to assume a role.
 * @property durationSeconds Number of seconds to restrict the assume role session duration.
 * @property externalId External identifier to use when assuming the role.
 * @property policy IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
 * @property policyArns Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.
 * @property roleArn Amazon Resource Name (ARN) of the IAM Role to assume.
 * @property sessionName Session name to use when assuming the role.
 * @property tags Map of assume role session tags.
 * @property transitiveTagKeys A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
 */
public data class ProviderAssumeRoleArgs(
    public val durationSeconds: Output? = null,
    public val externalId: Output? = null,
    public val policy: Output? = null,
    public val policyArns: Output>? = null,
    public val roleArn: Output? = null,
    public val sessionName: Output? = null,
    public val tags: Output>? = null,
    public val transitiveTagKeys: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.inputs.ProviderAssumeRoleArgs =
        com.pulumi.awsnative.inputs.ProviderAssumeRoleArgs.builder()
            .durationSeconds(durationSeconds?.applyValue({ args0 -> args0 }))
            .externalId(externalId?.applyValue({ args0 -> args0 }))
            .policy(policy?.applyValue({ args0 -> args0 }))
            .policyArns(policyArns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .sessionName(sessionName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .transitiveTagKeys(transitiveTagKeys?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ProviderAssumeRoleArgs].
 */
@PulumiTagMarker
public class ProviderAssumeRoleArgsBuilder internal constructor() {
    private var durationSeconds: Output? = null

    private var externalId: Output? = null

    private var policy: Output? = null

    private var policyArns: Output>? = null

    private var roleArn: Output? = null

    private var sessionName: Output? = null

    private var tags: Output>? = null

    private var transitiveTagKeys: Output>? = null

    /**
     * @param value Number of seconds to restrict the assume role session duration.
     */
    @JvmName("otuwyjndmnpklnvm")
    public suspend fun durationSeconds(`value`: Output) {
        this.durationSeconds = value
    }

    /**
     * @param value External identifier to use when assuming the role.
     */
    @JvmName("egaxwanbtnjgqtiu")
    public suspend fun externalId(`value`: Output) {
        this.externalId = value
    }

    /**
     * @param value IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
     */
    @JvmName("rkvxwgiplqqfuwbu")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.
     */
    @JvmName("qqqxgqshxvoexdel")
    public suspend fun policyArns(`value`: Output>) {
        this.policyArns = value
    }

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

    /**
     * @param values Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.
     */
    @JvmName("emnpvqkbjlxmfjgv")
    public suspend fun policyArns(values: List>) {
        this.policyArns = Output.all(values)
    }

    /**
     * @param value Amazon Resource Name (ARN) of the IAM Role to assume.
     */
    @JvmName("istxxdtylduthqib")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value Session name to use when assuming the role.
     */
    @JvmName("fdatgamyawbvtxpr")
    public suspend fun sessionName(`value`: Output) {
        this.sessionName = value
    }

    /**
     * @param value Map of assume role session tags.
     */
    @JvmName("wesprpsolapdyysh")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
     */
    @JvmName("driqidiltxxbwunv")
    public suspend fun transitiveTagKeys(`value`: Output>) {
        this.transitiveTagKeys = value
    }

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

    /**
     * @param values A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
     */
    @JvmName("eexqtrhsiagbyuuv")
    public suspend fun transitiveTagKeys(values: List>) {
        this.transitiveTagKeys = Output.all(values)
    }

    /**
     * @param value Number of seconds to restrict the assume role session duration.
     */
    @JvmName("jfqtusbowescrhtj")
    public suspend fun durationSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.durationSeconds = mapped
    }

    /**
     * @param value External identifier to use when assuming the role.
     */
    @JvmName("hsohwyyxufcngsmu")
    public suspend fun externalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalId = mapped
    }

    /**
     * @param value IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.
     */
    @JvmName("ihiumaelymmyyeua")
    public suspend fun policy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param value Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.
     */
    @JvmName("ramfonfdcjbvxkmr")
    public suspend fun policyArns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyArns = mapped
    }

    /**
     * @param values Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.
     */
    @JvmName("iorxiwgfvofwdrja")
    public suspend fun policyArns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyArns = mapped
    }

    /**
     * @param value Amazon Resource Name (ARN) of the IAM Role to assume.
     */
    @JvmName("kpkbalwrrrdnhrlu")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value Session name to use when assuming the role.
     */
    @JvmName("feygvcyyibmqeuhb")
    public suspend fun sessionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionName = mapped
    }

    /**
     * @param value Map of assume role session tags.
     */
    @JvmName("kxbmkrmleibckkfe")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of assume role session tags.
     */
    @JvmName("nxtyfatbsdvyuyfq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
     */
    @JvmName("varkdgfwvuhkvvcq")
    public suspend fun transitiveTagKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitiveTagKeys = mapped
    }

    /**
     * @param values A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
     */
    @JvmName("whbncqukirfpcwjr")
    public suspend fun transitiveTagKeys(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transitiveTagKeys = mapped
    }

    internal fun build(): ProviderAssumeRoleArgs = ProviderAssumeRoleArgs(
        durationSeconds = durationSeconds,
        externalId = externalId,
        policy = policy,
        policyArns = policyArns,
        roleArn = roleArn,
        sessionName = sessionName,
        tags = tags,
        transitiveTagKeys = transitiveTagKeys,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy