com.pulumi.awsnative.groundstation.kotlin.Config.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.groundstation.kotlin
import com.pulumi.awsnative.groundstation.kotlin.outputs.ConfigData
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.groundstation.kotlin.outputs.ConfigData.Companion.toKotlin as configDataToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Config].
*/
@PulumiTagMarker
public class ConfigResourceBuilder internal constructor() {
public var name: String? = null
public var args: ConfigArgs = ConfigArgs()
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 ConfigArgsBuilder.() -> Unit) {
val builder = ConfigArgsBuilder()
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(): Config {
val builtJavaResource = com.pulumi.awsnative.groundstation.Config(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Config(builtJavaResource)
}
}
/**
* AWS Ground Station config resource type for CloudFormation.
*/
public class Config internal constructor(
override val javaResource: com.pulumi.awsnative.groundstation.Config,
) : KotlinCustomResource(javaResource, ConfigMapper) {
/**
* The ARN of the config, such as `arn:aws:groundstation:us-east-2:1234567890:config/tracking/9940bf3b-d2ba-427e-9906-842b5e5d2296` .
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The ID of the config, such as `9940bf3b-d2ba-427e-9906-842b5e5d2296` .
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* Object containing the parameters of a config. Only one subtype may be specified per config. See the subtype definitions for a description of each config subtype.
*/
public val configData: Output
get() = javaResource.configData().applyValue({ args0 ->
args0.let({ args0 ->
configDataToKotlin(args0)
})
})
/**
* The name of the config object.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Tags assigned to a resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The type of the config, such as `tracking` .
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object ConfigMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.groundstation.Config::class == javaResource::class
override fun map(javaResource: Resource): Config = Config(
javaResource as
com.pulumi.awsnative.groundstation.Config,
)
}
/**
* @see [Config].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Config].
*/
public suspend fun config(name: String, block: suspend ConfigResourceBuilder.() -> Unit): Config {
val builder = ConfigResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Config].
* @param name The _unique_ name of the resulting resource.
*/
public fun config(name: String): Config {
val builder = ConfigResourceBuilder()
builder.name(name)
return builder.build()
}