
com.pulumi.awsnative.cloudformation.kotlin.ResourceDefaultVersion.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.cloudformation.kotlin
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
/**
* Builder for [ResourceDefaultVersion].
*/
@PulumiTagMarker
public class ResourceDefaultVersionResourceBuilder internal constructor() {
public var name: String? = null
public var args: ResourceDefaultVersionArgs = ResourceDefaultVersionArgs()
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 ResourceDefaultVersionArgsBuilder.() -> Unit) {
val builder = ResourceDefaultVersionArgsBuilder()
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(): ResourceDefaultVersion {
val builtJavaResource =
com.pulumi.awsnative.cloudformation.ResourceDefaultVersion(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ResourceDefaultVersion(builtJavaResource)
}
}
/**
* The default version of a resource that has been registered in the CloudFormation Registry.
*/
public class ResourceDefaultVersion internal constructor(
override val javaResource: com.pulumi.awsnative.cloudformation.ResourceDefaultVersion,
) : KotlinCustomResource(javaResource, ResourceDefaultVersionMapper) {
/**
* The Amazon Resource Name (ARN) of the type. This is used to uniquely identify a ResourceDefaultVersion
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The name of the type being registered.
* We recommend that type names adhere to the following pattern: company_or_organization::service::type.
*/
public val typeName: Output?
get() = javaResource.typeName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The Amazon Resource Name (ARN) of the type version.
*/
public val typeVersionArn: Output?
get() = javaResource.typeVersionArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of an existing version of the resource to set as the default.
*/
public val versionId: Output?
get() = javaResource.versionId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object ResourceDefaultVersionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.cloudformation.ResourceDefaultVersion::class == javaResource::class
override fun map(javaResource: Resource): ResourceDefaultVersion =
ResourceDefaultVersion(
javaResource as
com.pulumi.awsnative.cloudformation.ResourceDefaultVersion,
)
}
/**
* @see [ResourceDefaultVersion].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ResourceDefaultVersion].
*/
public suspend fun resourceDefaultVersion(
name: String,
block: suspend ResourceDefaultVersionResourceBuilder.() -> Unit,
): ResourceDefaultVersion {
val builder = ResourceDefaultVersionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ResourceDefaultVersion].
* @param name The _unique_ name of the resulting resource.
*/
public fun resourceDefaultVersion(name: String): ResourceDefaultVersion {
val builder = ResourceDefaultVersionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy