com.pulumi.awsnative.gamelift.kotlin.Build.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.gamelift.kotlin
import com.pulumi.awsnative.gamelift.kotlin.enums.BuildOperatingSystem
import com.pulumi.awsnative.gamelift.kotlin.outputs.BuildStorageLocation
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 com.pulumi.awsnative.gamelift.kotlin.enums.BuildOperatingSystem.Companion.toKotlin as buildOperatingSystemToKotlin
import com.pulumi.awsnative.gamelift.kotlin.outputs.BuildStorageLocation.Companion.toKotlin as buildStorageLocationToKotlin
/**
* Builder for [Build].
*/
@PulumiTagMarker
public class BuildResourceBuilder internal constructor() {
public var name: String? = null
public var args: BuildArgs = BuildArgs()
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 BuildArgsBuilder.() -> Unit) {
val builder = BuildArgsBuilder()
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(): Build {
val builtJavaResource = com.pulumi.awsnative.gamelift.Build(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Build(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::GameLift::Build
*/
public class Build internal constructor(
override val javaResource: com.pulumi.awsnative.gamelift.Build,
) : KotlinCustomResource(javaResource, BuildMapper) {
/**
* A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.
*/
public val buildId: Output
get() = javaResource.buildId().applyValue({ args0 -> args0 })
/**
* A descriptive label that is associated with a build. Build names do not need to be unique.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build. If your game build contains multiple executables, they all must run on the same operating system. If an operating system is not specified when creating a build, Amazon GameLift uses the default value (WINDOWS_2012). This value cannot be changed later.
*/
public val operatingSystem: Output?
get() = javaResource.operatingSystem().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> buildOperatingSystemToKotlin(args0) })
}).orElse(null)
})
/**
* A server SDK version you used when integrating your game server build with Amazon GameLift. By default Amazon GameLift sets this value to 4.0.2.
*/
public val serverSdkVersion: Output?
get() = javaResource.serverSdkVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.
*/
public val storageLocation: Output?
get() = javaResource.storageLocation().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> buildStorageLocationToKotlin(args0) })
}).orElse(null)
})
/**
* Version information that is associated with this build. Version strings do not need to be unique.
*/
public val version: Output?
get() = javaResource.version().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object BuildMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.gamelift.Build::class == javaResource::class
override fun map(javaResource: Resource): Build = Build(
javaResource as
com.pulumi.awsnative.gamelift.Build,
)
}
/**
* @see [Build].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Build].
*/
public suspend fun build(name: String, block: suspend BuildResourceBuilder.() -> Unit): Build {
val builder = BuildResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Build].
* @param name The _unique_ name of the resulting resource.
*/
public fun build(name: String): Build {
val builder = BuildResourceBuilder()
builder.name(name)
return builder.build()
}