com.pulumi.awsnative.rolesanywhere.kotlin.Profile.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.rolesanywhere.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.rolesanywhere.kotlin.outputs.ProfileAttributeMapping
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.Boolean
import kotlin.Double
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.rolesanywhere.kotlin.outputs.ProfileAttributeMapping.Companion.toKotlin as profileAttributeMappingToKotlin
/**
* Builder for [Profile].
*/
@PulumiTagMarker
public class ProfileResourceBuilder internal constructor() {
public var name: String? = null
public var args: ProfileArgs = ProfileArgs()
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 ProfileArgsBuilder.() -> Unit) {
val builder = ProfileArgsBuilder()
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(): Profile {
val builtJavaResource = com.pulumi.awsnative.rolesanywhere.Profile(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Profile(builtJavaResource)
}
}
/**
* Definition of AWS::RolesAnywhere::Profile Resource Type
*/
public class Profile internal constructor(
override val javaResource: com.pulumi.awsnative.rolesanywhere.Profile,
) : KotlinCustomResource(javaResource, ProfileMapper) {
/**
* A mapping applied to the authenticating end-entity certificate.
*/
public val attributeMappings: Output>?
get() = javaResource.attributeMappings().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
profileAttributeMappingToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The number of seconds vended session credentials will be valid for
*/
public val durationSeconds: Output?
get() = javaResource.durationSeconds().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The enabled status of the resource.
*/
public val enabled: Output?
get() = javaResource.enabled().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* A list of managed policy ARNs. Managed policies identified by this list will be applied to the vended session credentials.
*/
public val managedPolicyArns: Output>?
get() = javaResource.managedPolicyArns().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The customer specified name of the resource.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ARN of the profile.
*/
public val profileArn: Output
get() = javaResource.profileArn().applyValue({ args0 -> args0 })
/**
* The unique primary identifier of the Profile
*/
public val profileId: Output
get() = javaResource.profileId().applyValue({ args0 -> args0 })
/**
* Specifies whether instance properties are required in CreateSession requests with this profile.
*/
public val requireInstanceProperties: Output?
get() = javaResource.requireInstanceProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A list of IAM role ARNs that can be assumed when this profile is specified in a CreateSession request.
*/
public val roleArns: Output>
get() = javaResource.roleArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* A session policy that will applied to the trust boundary of the vended session credentials.
*/
public val sessionPolicy: Output?
get() = javaResource.sessionPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A list of Tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ProfileMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.rolesanywhere.Profile::class == javaResource::class
override fun map(javaResource: Resource): Profile = Profile(
javaResource as
com.pulumi.awsnative.rolesanywhere.Profile,
)
}
/**
* @see [Profile].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Profile].
*/
public suspend fun profile(name: String, block: suspend ProfileResourceBuilder.() -> Unit): Profile {
val builder = ProfileResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Profile].
* @param name The _unique_ name of the resulting resource.
*/
public fun profile(name: String): Profile {
val builder = ProfileResourceBuilder()
builder.name(name)
return builder.build()
}