![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.events.kotlin.EventBus.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.events.kotlin
import com.pulumi.awsnative.events.kotlin.outputs.DeadLetterConfigProperties
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.events.kotlin.outputs.DeadLetterConfigProperties.Companion.toKotlin as deadLetterConfigPropertiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [EventBus].
*/
@PulumiTagMarker
public class EventBusResourceBuilder internal constructor() {
public var name: String? = null
public var args: EventBusArgs = EventBusArgs()
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 EventBusArgsBuilder.() -> Unit) {
val builder = EventBusArgsBuilder()
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(): EventBus {
val builtJavaResource = com.pulumi.awsnative.events.EventBus(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EventBus(builtJavaResource)
}
}
/**
* Resource type definition for AWS::Events::EventBus
*/
public class EventBus internal constructor(
override val javaResource: com.pulumi.awsnative.events.EventBus,
) : KotlinCustomResource(javaResource, EventBusMapper) {
/**
* The Amazon Resource Name (ARN) for the event bus.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Dead Letter Queue for the event bus.
*/
public val deadLetterConfig: Output?
get() = javaResource.deadLetterConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> deadLetterConfigPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The description of the event bus.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
*/
public val eventSourceName: Output?
get() = javaResource.eventSourceName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Kms Key Identifier used to encrypt events at rest in the event bus.
*/
public val kmsKeyIdentifier: Output?
get() = javaResource.kmsKeyIdentifier().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the event bus.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A JSON string that describes the permission policy statement for the event bus.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Events::EventBus` for more information about the expected schema for this property.
*/
public val policy: Output?
get() = javaResource.policy().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Any tags assigned to the event bus.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object EventBusMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.events.EventBus::class == javaResource::class
override fun map(javaResource: Resource): EventBus = EventBus(
javaResource as
com.pulumi.awsnative.events.EventBus,
)
}
/**
* @see [EventBus].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EventBus].
*/
public suspend fun eventBus(name: String, block: suspend EventBusResourceBuilder.() -> Unit): EventBus {
val builder = EventBusResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EventBus].
* @param name The _unique_ name of the resulting resource.
*/
public fun eventBus(name: String): EventBus {
val builder = EventBusResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy