
com.pulumi.awsnative.deadline.kotlin.Fleet.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.deadline.kotlin
import com.pulumi.awsnative.deadline.kotlin.enums.FleetStatus
import com.pulumi.awsnative.deadline.kotlin.outputs.FleetCapabilities
import com.pulumi.awsnative.deadline.kotlin.outputs.FleetConfiguration0Properties
import com.pulumi.awsnative.deadline.kotlin.outputs.FleetConfiguration1Properties
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.core.Either
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.deadline.kotlin.enums.FleetStatus.Companion.toKotlin as fleetStatusToKotlin
import com.pulumi.awsnative.deadline.kotlin.outputs.FleetCapabilities.Companion.toKotlin as fleetCapabilitiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Fleet].
*/
@PulumiTagMarker
public class FleetResourceBuilder internal constructor() {
public var name: String? = null
public var args: FleetArgs = FleetArgs()
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 FleetArgsBuilder.() -> Unit) {
val builder = FleetArgsBuilder()
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(): Fleet {
val builtJavaResource = com.pulumi.awsnative.deadline.Fleet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Fleet(builtJavaResource)
}
}
/**
* Definition of AWS::Deadline::Fleet Resource Type
*/
public class Fleet internal constructor(
override val javaResource: com.pulumi.awsnative.deadline.Fleet,
) : KotlinCustomResource(javaResource, FleetMapper) {
/**
* The Amazon Resource Name (ARN) assigned to the fleet.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
public val capabilities: Output
get() = javaResource.capabilities().applyValue({ args0 ->
args0.let({ args0 ->
fleetCapabilitiesToKotlin(args0)
})
})
/**
* The configuration details for the fleet.
*/
public val configuration:
Output>
get() = javaResource.configuration().applyValue({ args0 ->
args0.transform(
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.deadline.kotlin.outputs.FleetConfiguration0Properties.Companion.toKotlin(args0)
})
},
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.deadline.kotlin.outputs.FleetConfiguration1Properties.Companion.toKotlin(args0)
})
},
)
})
/**
* A description that helps identify what the fleet is used for.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The display name of the fleet summary to update.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* The farm ID.
*/
public val farmId: Output?
get() = javaResource.farmId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The fleet ID.
*/
public val fleetId: Output
get() = javaResource.fleetId().applyValue({ args0 -> args0 })
/**
* The maximum number of workers specified in the fleet.
*/
public val maxWorkerCount: Output
get() = javaResource.maxWorkerCount().applyValue({ args0 -> args0 })
/**
* The minimum number of workers in the fleet.
*/
public val minWorkerCount: Output?
get() = javaResource.minWorkerCount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The IAM role that workers in the fleet use when processing jobs.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* The status of the fleet.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
fleetStatusToKotlin(args0)
})
})
/**
* An array of key-value pairs to apply to this resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The number of workers in the fleet summary.
*/
public val workerCount: Output
get() = javaResource.workerCount().applyValue({ args0 -> args0 })
}
public object FleetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.deadline.Fleet::class == javaResource::class
override fun map(javaResource: Resource): Fleet = Fleet(
javaResource as
com.pulumi.awsnative.deadline.Fleet,
)
}
/**
* @see [Fleet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Fleet].
*/
public suspend fun fleet(name: String, block: suspend FleetResourceBuilder.() -> Unit): Fleet {
val builder = FleetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Fleet].
* @param name The _unique_ name of the resulting resource.
*/
public fun fleet(name: String): Fleet {
val builder = FleetResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy