![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.rolesanywhere.kotlin.TrustAnchor.kt Maven / Gradle / Ivy
@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.TrustAnchorNotificationSetting
import com.pulumi.awsnative.rolesanywhere.kotlin.outputs.TrustAnchorSource
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.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.TrustAnchorNotificationSetting.Companion.toKotlin as trustAnchorNotificationSettingToKotlin
import com.pulumi.awsnative.rolesanywhere.kotlin.outputs.TrustAnchorSource.Companion.toKotlin as trustAnchorSourceToKotlin
/**
* Builder for [TrustAnchor].
*/
@PulumiTagMarker
public class TrustAnchorResourceBuilder internal constructor() {
public var name: String? = null
public var args: TrustAnchorArgs = TrustAnchorArgs()
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 TrustAnchorArgsBuilder.() -> Unit) {
val builder = TrustAnchorArgsBuilder()
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(): TrustAnchor {
val builtJavaResource = com.pulumi.awsnative.rolesanywhere.TrustAnchor(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TrustAnchor(builtJavaResource)
}
}
/**
* Definition of AWS::RolesAnywhere::TrustAnchor Resource Type.
*/
public class TrustAnchor internal constructor(
override val javaResource: com.pulumi.awsnative.rolesanywhere.TrustAnchor,
) : KotlinCustomResource(javaResource, TrustAnchorMapper) {
/**
* Indicates whether the trust anchor is enabled.
*/
public val enabled: Output?
get() = javaResource.enabled().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the trust anchor.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A list of notification settings to be associated to the trust anchor.
*/
public val notificationSettings: Output>?
get() = javaResource.notificationSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
trustAnchorNotificationSettingToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The trust anchor type and its related certificate data.
*/
public val source: Output
get() = javaResource.source().applyValue({ args0 ->
args0.let({ args0 ->
trustAnchorSourceToKotlin(args0)
})
})
/**
* The tags to attach to the trust anchor.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The ARN of the trust anchor.
*/
public val trustAnchorArn: Output
get() = javaResource.trustAnchorArn().applyValue({ args0 -> args0 })
/**
* The unique identifier of the trust anchor.
*/
public val trustAnchorId: Output
get() = javaResource.trustAnchorId().applyValue({ args0 -> args0 })
}
public object TrustAnchorMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.rolesanywhere.TrustAnchor::class == javaResource::class
override fun map(javaResource: Resource): TrustAnchor = TrustAnchor(
javaResource as
com.pulumi.awsnative.rolesanywhere.TrustAnchor,
)
}
/**
* @see [TrustAnchor].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TrustAnchor].
*/
public suspend fun trustAnchor(name: String, block: suspend TrustAnchorResourceBuilder.() -> Unit): TrustAnchor {
val builder = TrustAnchorResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TrustAnchor].
* @param name The _unique_ name of the resulting resource.
*/
public fun trustAnchor(name: String): TrustAnchor {
val builder = TrustAnchorResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy