com.pulumi.awsnative.sso.kotlin.PermissionSet.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.sso.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.sso.kotlin.outputs.PermissionSetCustomerManagedPolicyReference
import com.pulumi.awsnative.sso.kotlin.outputs.PermissionSetPermissionsBoundary
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.sso.kotlin.outputs.PermissionSetCustomerManagedPolicyReference.Companion.toKotlin as permissionSetCustomerManagedPolicyReferenceToKotlin
import com.pulumi.awsnative.sso.kotlin.outputs.PermissionSetPermissionsBoundary.Companion.toKotlin as permissionSetPermissionsBoundaryToKotlin
/**
* Builder for [PermissionSet].
*/
@PulumiTagMarker
public class PermissionSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: PermissionSetArgs = PermissionSetArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend PermissionSetArgsBuilder.() -> Unit) {
val builder = PermissionSetArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): PermissionSet {
val builtJavaResource = com.pulumi.awsnative.sso.PermissionSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PermissionSet(builtJavaResource)
}
}
/**
* Resource Type definition for SSO PermissionSet
*/
public class PermissionSet internal constructor(
override val javaResource: com.pulumi.awsnative.sso.PermissionSet,
) : KotlinCustomResource(javaResource, PermissionSetMapper) {
/**
* Specifies the names and paths of the customer managed policies that you have attached to your permission set.
*/
public val customerManagedPolicyReferences:
Output>?
get() = javaResource.customerManagedPolicyReferences().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
permissionSetCustomerManagedPolicyReferenceToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The permission set description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val inlinePolicy: Output?
get() = javaResource.inlinePolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The sso instance arn that the permission set is owned.
*/
public val instanceArn: Output
get() = javaResource.instanceArn().applyValue({ args0 -> args0 })
/**
* A structure that stores the details of the AWS managed policy.
*/
public val managedPolicies: Output>?
get() = javaResource.managedPolicies().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The name you want to assign to this permission set.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The permission set that the policy will be attached to
*/
public val permissionSetArn: Output
get() = javaResource.permissionSetArn().applyValue({ args0 -> args0 })
/**
* 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* .
*/
public val permissionsBoundary: Output?
get() = javaResource.permissionsBoundary().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> permissionSetPermissionsBoundaryToKotlin(args0) })
}).orElse(null)
})
/**
* The relay state URL that redirect links to any service in the AWS Management Console.
*/
public val relayStateType: Output?
get() = javaResource.relayStateType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The length of time that a user can be signed in to an AWS account.
*/
public val sessionDuration: Output?
get() = javaResource.sessionDuration().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The tags to attach to the new `PermissionSet` .
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object PermissionSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sso.PermissionSet::class == javaResource::class
override fun map(javaResource: Resource): PermissionSet = PermissionSet(
javaResource as
com.pulumi.awsnative.sso.PermissionSet,
)
}
/**
* @see [PermissionSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PermissionSet].
*/
public suspend fun permissionSet(
name: String,
block: suspend PermissionSetResourceBuilder.() -> Unit,
): PermissionSet {
val builder = PermissionSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PermissionSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun permissionSet(name: String): PermissionSet {
val builder = PermissionSetResourceBuilder()
builder.name(name)
return builder.build()
}