![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.iot.kotlin.RoleAlias.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.iot.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [RoleAlias].
*/
@PulumiTagMarker
public class RoleAliasResourceBuilder internal constructor() {
public var name: String? = null
public var args: RoleAliasArgs = RoleAliasArgs()
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 RoleAliasArgsBuilder.() -> Unit) {
val builder = RoleAliasArgsBuilder()
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(): RoleAlias {
val builtJavaResource = com.pulumi.awsnative.iot.RoleAlias(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RoleAlias(builtJavaResource)
}
}
/**
* Use the AWS::IoT::RoleAlias resource to declare an AWS IoT RoleAlias.
*/
public class RoleAlias internal constructor(
override val javaResource: com.pulumi.awsnative.iot.RoleAlias,
) : KotlinCustomResource(javaResource, RoleAliasMapper) {
/**
* The number of seconds for which the credential is valid.
*/
public val credentialDurationSeconds: Output?
get() = javaResource.credentialDurationSeconds().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The role alias.
*/
public val roleAlias: Output?
get() = javaResource.roleAlias().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The role alias ARN.
*/
public val roleAliasArn: Output
get() = javaResource.roleAliasArn().applyValue({ args0 -> args0 })
/**
* The role ARN.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* An array of key-value pairs to apply to this resource.
* For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object RoleAliasMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.iot.RoleAlias::class == javaResource::class
override fun map(javaResource: Resource): RoleAlias = RoleAlias(
javaResource as
com.pulumi.awsnative.iot.RoleAlias,
)
}
/**
* @see [RoleAlias].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [RoleAlias].
*/
public suspend fun roleAlias(name: String, block: suspend RoleAliasResourceBuilder.() -> Unit): RoleAlias {
val builder = RoleAliasResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [RoleAlias].
* @param name The _unique_ name of the resulting resource.
*/
public fun roleAlias(name: String): RoleAlias {
val builder = RoleAliasResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy