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

com.pulumi.awsnative.kotlin.inputs.ProviderAssumeRoleArgs.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.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("gbtfjoltxudrltxc")
    public suspend fun durationSeconds(`value`: Output) {
        this.durationSeconds = value
    }

    /**
     * @param value External identifier to use when assuming the role.
     */
    @JvmName("jtenwpkjnymdbdsl")
    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("rtotxidwttxxkmwv")
    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("klvexmbcuijjdhsn")
    public suspend fun policyArns(`value`: Output>) {
        this.policyArns = value
    }

    @JvmName("edtihwlvyleaagki")
    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("wpvbjvnnfqlgfcqf")
    public suspend fun policyArns(values: List>) {
        this.policyArns = Output.all(values)
    }

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

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

    /**
     * @param value Map of assume role session tags.
     */
    @JvmName("rglduoaeiiafcbch")
    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("yltjglcquashnxmb")
    public suspend fun transitiveTagKeys(`value`: Output>) {
        this.transitiveTagKeys = value
    }

    @JvmName("jpgbubxmyqbxcecv")
    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("hconmjltigdslhbk")
    public suspend fun transitiveTagKeys(values: List>) {
        this.transitiveTagKeys = Output.all(values)
    }

    /**
     * @param value Number of seconds to restrict the assume role session duration.
     */
    @JvmName("pkilvjytkymwdwvf")
    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("gmfxqblwfwuepfjf")
    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("mvqqbhpacugeqjbr")
    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("blydbusbbxudabrr")
    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("jbctasciqkbyuswu")
    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("suxijdwilokuwxje")
    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("rybijfwbkjrcfusn")
    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("cjeyjagfnbmtngfo")
    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("ibdwtwvuffdcfnlw")
    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("sqtbcsmwowegushi")
    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("knukctsonilyquya")
    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