com.pulumi.awsnative.pcaconnectorscep.kotlin.Connector.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.pcaconnectorscep.kotlin
import com.pulumi.awsnative.pcaconnectorscep.kotlin.enums.ConnectorType
import com.pulumi.awsnative.pcaconnectorscep.kotlin.outputs.ConnectorMobileDeviceManagement
import com.pulumi.awsnative.pcaconnectorscep.kotlin.outputs.ConnectorOpenIdConfiguration
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.Map
import com.pulumi.awsnative.pcaconnectorscep.kotlin.enums.ConnectorType.Companion.toKotlin as connectorTypeToKotlin
import com.pulumi.awsnative.pcaconnectorscep.kotlin.outputs.ConnectorMobileDeviceManagement.Companion.toKotlin as connectorMobileDeviceManagementToKotlin
import com.pulumi.awsnative.pcaconnectorscep.kotlin.outputs.ConnectorOpenIdConfiguration.Companion.toKotlin as connectorOpenIdConfigurationToKotlin
/**
* Builder for [Connector].
*/
@PulumiTagMarker
public class ConnectorResourceBuilder internal constructor() {
public var name: String? = null
public var args: ConnectorArgs = ConnectorArgs()
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 ConnectorArgsBuilder.() -> Unit) {
val builder = ConnectorArgsBuilder()
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(): Connector {
val builtJavaResource = com.pulumi.awsnative.pcaconnectorscep.Connector(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Connector(builtJavaResource)
}
}
/**
* Represents a Connector that allows certificate issuance through Simple Certificate Enrollment Protocol (SCEP)
*/
public class Connector internal constructor(
override val javaResource: com.pulumi.awsnative.pcaconnectorscep.Connector,
) : KotlinCustomResource(javaResource, ConnectorMapper) {
public val certificateAuthorityArn: Output
get() = javaResource.certificateAuthorityArn().applyValue({ args0 -> args0 })
public val connectorArn: Output
get() = javaResource.connectorArn().applyValue({ args0 -> args0 })
public val endpoint: Output
get() = javaResource.endpoint().applyValue({ args0 -> args0 })
public val mobileDeviceManagement: Output?
get() = javaResource.mobileDeviceManagement().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> connectorMobileDeviceManagementToKotlin(args0) })
}).orElse(null)
})
public val openIdConfiguration: Output
get() = javaResource.openIdConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
connectorOpenIdConfigurationToKotlin(args0)
})
})
public val tags: Output