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

com.pulumi.awsnative.sso.kotlin.PermissionSetArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.sso.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.sso.PermissionSetArgs.builder
import com.pulumi.awsnative.sso.kotlin.inputs.PermissionSetCustomerManagedPolicyReferenceArgs
import com.pulumi.awsnative.sso.kotlin.inputs.PermissionSetCustomerManagedPolicyReferenceArgsBuilder
import com.pulumi.awsnative.sso.kotlin.inputs.PermissionSetPermissionsBoundaryArgs
import com.pulumi.awsnative.sso.kotlin.inputs.PermissionSetPermissionsBoundaryArgsBuilder
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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for SSO PermissionSet
 * @property customerManagedPolicyReferences Specifies the names and paths of the customer managed policies that you have attached to your permission set.
 * @property description The permission set description.
 * @property inlinePolicy The inline policy to put in permission set.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSO::PermissionSet` for more information about the expected schema for this property.
 * @property instanceArn The sso instance arn that the permission set is owned.
 * @property managedPolicies A structure that stores the details of the AWS managed policy.
 * @property name The name you want to assign to this permission set.
 * @property permissionsBoundary Specifies the configuration of the AWS managed or customer managed policy that you want to set as a permissions boundary. Specify either `CustomerManagedPolicyReference` to use the name and path of a customer managed policy, or `ManagedPolicyArn` to use the ARN of an AWS managed policy. A permissions boundary represents the maximum permissions that any policy can grant your role. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide* .
 * > Policies used as permissions boundaries don't provide permissions. You must also attach an IAM policy to the role. To learn how the effective permissions for a role are evaluated, see [IAM JSON policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide* .
 * @property relayStateType The relay state URL that redirect links to any service in the AWS Management Console.
 * @property sessionDuration The length of time that a user can be signed in to an AWS account.
 * @property tags The tags to attach to the new `PermissionSet` .
 */
public data class PermissionSetArgs(
    public val customerManagedPolicyReferences: Output>? = null,
    public val description: Output? = null,
    public val inlinePolicy: Output? = null,
    public val instanceArn: Output? = null,
    public val managedPolicies: Output>? = null,
    public val name: Output? = null,
    public val permissionsBoundary: Output? = null,
    public val relayStateType: Output? = null,
    public val sessionDuration: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.sso.PermissionSetArgs =
        com.pulumi.awsnative.sso.PermissionSetArgs.builder()
            .customerManagedPolicyReferences(
                customerManagedPolicyReferences?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .inlinePolicy(inlinePolicy?.applyValue({ args0 -> args0 }))
            .instanceArn(instanceArn?.applyValue({ args0 -> args0 }))
            .managedPolicies(managedPolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .permissionsBoundary(
                permissionsBoundary?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .relayStateType(relayStateType?.applyValue({ args0 -> args0 }))
            .sessionDuration(sessionDuration?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PermissionSetArgs].
 */
@PulumiTagMarker
public class PermissionSetArgsBuilder internal constructor() {
    private var customerManagedPolicyReferences:
        Output>? = null

    private var description: Output? = null

    private var inlinePolicy: Output? = null

    private var instanceArn: Output? = null

    private var managedPolicies: Output>? = null

    private var name: Output? = null

    private var permissionsBoundary: Output? = null

    private var relayStateType: Output? = null

    private var sessionDuration: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("vxkxofqukwliotkk")
    public suspend fun customerManagedPolicyReferences(`value`: Output>) {
        this.customerManagedPolicyReferences = value
    }

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

    /**
     * @param values Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("mdriiphdtbrbqgcj")
    public suspend fun customerManagedPolicyReferences(values: List>) {
        this.customerManagedPolicyReferences = Output.all(values)
    }

    /**
     * @param value The permission set description.
     */
    @JvmName("djlmpbchhniigafy")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The inline policy to put in permission set.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSO::PermissionSet` for more information about the expected schema for this property.
     */
    @JvmName("fcbfbjqyuxylcleb")
    public suspend fun inlinePolicy(`value`: Output) {
        this.inlinePolicy = value
    }

    /**
     * @param value The sso instance arn that the permission set is owned.
     */
    @JvmName("yxclpcluxolamjcn")
    public suspend fun instanceArn(`value`: Output) {
        this.instanceArn = value
    }

    /**
     * @param value A structure that stores the details of the AWS managed policy.
     */
    @JvmName("hnrvdnhagbowtklo")
    public suspend fun managedPolicies(`value`: Output>) {
        this.managedPolicies = value
    }

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

    /**
     * @param values A structure that stores the details of the AWS managed policy.
     */
    @JvmName("lfmjjjqifuuibqhf")
    public suspend fun managedPolicies(values: List>) {
        this.managedPolicies = Output.all(values)
    }

    /**
     * @param value The name you want to assign to this permission set.
     */
    @JvmName("axqyqvppnjiptrfi")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the configuration of the AWS managed or customer managed policy that you want to set as a permissions boundary. Specify either `CustomerManagedPolicyReference` to use the name and path of a customer managed policy, or `ManagedPolicyArn` to use the ARN of an AWS managed policy. A permissions boundary represents the maximum permissions that any policy can grant your role. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide* .
     * > Policies used as permissions boundaries don't provide permissions. You must also attach an IAM policy to the role. To learn how the effective permissions for a role are evaluated, see [IAM JSON policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide* .
     */
    @JvmName("pejaeytbscncfrhb")
    public suspend fun permissionsBoundary(`value`: Output) {
        this.permissionsBoundary = value
    }

    /**
     * @param value The relay state URL that redirect links to any service in the AWS Management Console.
     */
    @JvmName("ehghtsqtthbutdtx")
    public suspend fun relayStateType(`value`: Output) {
        this.relayStateType = value
    }

    /**
     * @param value The length of time that a user can be signed in to an AWS account.
     */
    @JvmName("oqtsjwybpuplyfns")
    public suspend fun sessionDuration(`value`: Output) {
        this.sessionDuration = value
    }

    /**
     * @param value The tags to attach to the new `PermissionSet` .
     */
    @JvmName("dvpqqulaupdrkdyc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The tags to attach to the new `PermissionSet` .
     */
    @JvmName("nkcuqotocqpdbetl")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("surswtmgopofxnom")
    public suspend fun customerManagedPolicyReferences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerManagedPolicyReferences = mapped
    }

    /**
     * @param argument Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("msmtnmxbvsrbjaes")
    public suspend fun customerManagedPolicyReferences(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PermissionSetCustomerManagedPolicyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customerManagedPolicyReferences = mapped
    }

    /**
     * @param argument Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("axtlufbxldglakmr")
    public suspend fun customerManagedPolicyReferences(vararg argument: suspend PermissionSetCustomerManagedPolicyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PermissionSetCustomerManagedPolicyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customerManagedPolicyReferences = mapped
    }

    /**
     * @param argument Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("tofuvwjirtpiyucf")
    public suspend fun customerManagedPolicyReferences(argument: suspend PermissionSetCustomerManagedPolicyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PermissionSetCustomerManagedPolicyReferenceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.customerManagedPolicyReferences = mapped
    }

    /**
     * @param values Specifies the names and paths of the customer managed policies that you have attached to your permission set.
     */
    @JvmName("lciagdugjcjcwcww")
    public suspend fun customerManagedPolicyReferences(vararg values: PermissionSetCustomerManagedPolicyReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customerManagedPolicyReferences = mapped
    }

    /**
     * @param value The permission set description.
     */
    @JvmName("xmfguigxyasngryc")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The inline policy to put in permission set.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSO::PermissionSet` for more information about the expected schema for this property.
     */
    @JvmName("vmaxnfnedoithxyb")
    public suspend fun inlinePolicy(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inlinePolicy = mapped
    }

    /**
     * @param value The sso instance arn that the permission set is owned.
     */
    @JvmName("onhatkkjciqoyjmw")
    public suspend fun instanceArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceArn = mapped
    }

    /**
     * @param value A structure that stores the details of the AWS managed policy.
     */
    @JvmName("ydekvmqcjblicxss")
    public suspend fun managedPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedPolicies = mapped
    }

    /**
     * @param values A structure that stores the details of the AWS managed policy.
     */
    @JvmName("ksrwygsxpusnulvk")
    public suspend fun managedPolicies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.managedPolicies = mapped
    }

    /**
     * @param value The name you want to assign to this permission set.
     */
    @JvmName("admlylybjyypsjof")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the configuration of the AWS managed or customer managed policy that you want to set as a permissions boundary. Specify either `CustomerManagedPolicyReference` to use the name and path of a customer managed policy, or `ManagedPolicyArn` to use the ARN of an AWS managed policy. A permissions boundary represents the maximum permissions that any policy can grant your role. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide* .
     * > Policies used as permissions boundaries don't provide permissions. You must also attach an IAM policy to the role. To learn how the effective permissions for a role are evaluated, see [IAM JSON policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide* .
     */
    @JvmName("arsumbncnqpcpdtd")
    public suspend fun permissionsBoundary(`value`: PermissionSetPermissionsBoundaryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissionsBoundary = mapped
    }

    /**
     * @param argument Specifies the configuration of the AWS managed or customer managed policy that you want to set as a permissions boundary. Specify either `CustomerManagedPolicyReference` to use the name and path of a customer managed policy, or `ManagedPolicyArn` to use the ARN of an AWS managed policy. A permissions boundary represents the maximum permissions that any policy can grant your role. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide* .
     * > Policies used as permissions boundaries don't provide permissions. You must also attach an IAM policy to the role. To learn how the effective permissions for a role are evaluated, see [IAM JSON policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide* .
     */
    @JvmName("jcgqfogttennvdhe")
    public suspend fun permissionsBoundary(argument: suspend PermissionSetPermissionsBoundaryArgsBuilder.() -> Unit) {
        val toBeMapped = PermissionSetPermissionsBoundaryArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.permissionsBoundary = mapped
    }

    /**
     * @param value The relay state URL that redirect links to any service in the AWS Management Console.
     */
    @JvmName("wgafbbilwddejeyo")
    public suspend fun relayStateType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.relayStateType = mapped
    }

    /**
     * @param value The length of time that a user can be signed in to an AWS account.
     */
    @JvmName("yxoggrybexrimtag")
    public suspend fun sessionDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionDuration = mapped
    }

    /**
     * @param value The tags to attach to the new `PermissionSet` .
     */
    @JvmName("ihrlaftauhinhyii")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags to attach to the new `PermissionSet` .
     */
    @JvmName("scuvbmrhhocoirmb")
    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 The tags to attach to the new `PermissionSet` .
     */
    @JvmName("fiocpycobhpckmct")
    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 The tags to attach to the new `PermissionSet` .
     */
    @JvmName("irfwihspnpujxslt")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags to attach to the new `PermissionSet` .
     */
    @JvmName("trvndldrbfoudpqf")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): PermissionSetArgs = PermissionSetArgs(
        customerManagedPolicyReferences = customerManagedPolicyReferences,
        description = description,
        inlinePolicy = inlinePolicy,
        instanceArn = instanceArn,
        managedPolicies = managedPolicies,
        name = name,
        permissionsBoundary = permissionsBoundary,
        relayStateType = relayStateType,
        sessionDuration = sessionDuration,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy