
com.pulumi.awsnative.iotevents.kotlin.Input.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.iotevents.kotlin
import com.pulumi.awsnative.iotevents.kotlin.outputs.InputDefinition
import com.pulumi.awsnative.kotlin.outputs.Tag
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.iotevents.kotlin.outputs.InputDefinition.Companion.toKotlin as inputDefinitionToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Input].
*/
@PulumiTagMarker
public class InputResourceBuilder internal constructor() {
public var name: String? = null
public var args: InputArgs = InputArgs()
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 InputArgsBuilder.() -> Unit) {
val builder = InputArgsBuilder()
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(): Input {
val builtJavaResource = com.pulumi.awsnative.iotevents.Input(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Input(builtJavaResource)
}
}
/**
* The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into AWS IoT Events. This is done by sending messages as *inputs* to AWS IoT Events. For more information, see [How to Use AWS IoT Events](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *AWS IoT Events Developer Guide*.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Input internal constructor(
override val javaResource: com.pulumi.awsnative.iotevents.Input,
) : KotlinCustomResource(javaResource, InputMapper) {
/**
* The definition of the input.
*/
public val inputDefinition: Output
get() = javaResource.inputDefinition().applyValue({ args0 ->
args0.let({ args0 ->
inputDefinitionToKotlin(args0)
})
})
/**
* A brief description of the input.
*/
public val inputDescription: Output?
get() = javaResource.inputDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the input.
*/
public val inputName: Output?
get() = javaResource.inputName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object InputMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.iotevents.Input::class == javaResource::class
override fun map(javaResource: Resource): Input = Input(
javaResource as
com.pulumi.awsnative.iotevents.Input,
)
}
/**
* @see [Input].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Input].
*/
public suspend fun input(name: String, block: suspend InputResourceBuilder.() -> Unit): Input {
val builder = InputResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Input].
* @param name The _unique_ name of the resulting resource.
*/
public fun input(name: String): Input {
val builder = InputResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy