
com.pulumi.awsnative.codebuild.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.codebuild.kotlin
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetComputeType
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetEnvironmentType
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetOverflowBehavior
import com.pulumi.awsnative.codebuild.kotlin.outputs.FleetVpcConfig
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetComputeType.Companion.toKotlin as fleetComputeTypeToKotlin
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetEnvironmentType.Companion.toKotlin as fleetEnvironmentTypeToKotlin
import com.pulumi.awsnative.codebuild.kotlin.enums.FleetOverflowBehavior.Companion.toKotlin as fleetOverflowBehaviorToKotlin
import com.pulumi.awsnative.codebuild.kotlin.outputs.FleetVpcConfig.Companion.toKotlin as fleetVpcConfigToKotlin
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.codebuild.Fleet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Fleet(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::CodeBuild::Fleet
*/
public class Fleet internal constructor(
override val javaResource: com.pulumi.awsnative.codebuild.Fleet,
) : KotlinCustomResource(javaResource, FleetMapper) {
/**
* The ARN of the compute fleet.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.
*/
public val baseCapacity: Output?
get() = javaResource.baseCapacity().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Information about the compute resources the compute fleet uses. Available values include:
* - `BUILD_GENERAL1_SMALL` : Use up to 3 GB memory and 2 vCPUs for builds.
* - `BUILD_GENERAL1_MEDIUM` : Use up to 7 GB memory and 4 vCPUs for builds.
* - `BUILD_GENERAL1_LARGE` : Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type.
* - `BUILD_GENERAL1_XLARGE` : Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type.
* - `BUILD_GENERAL1_2XLARGE` : Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.
* If you use `BUILD_GENERAL1_SMALL` :
* - For environment type `LINUX_CONTAINER` , you can use up to 3 GB memory and 2 vCPUs for builds.
* - For environment type `LINUX_GPU_CONTAINER` , you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.
* - For environment type `ARM_CONTAINER` , you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
* If you use `BUILD_GENERAL1_LARGE` :
* - For environment type `LINUX_CONTAINER` , you can use up to 15 GB memory and 8 vCPUs for builds.
* - For environment type `LINUX_GPU_CONTAINER` , you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.
* - For environment type `ARM_CONTAINER` , you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds.
* For more information, see [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild User Guide.*
*/
public val computeType: Output?
get() = javaResource.computeType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
fleetComputeTypeToKotlin(args0)
})
}).orElse(null)
})
/**
* The environment type of the compute fleet.
* - The environment type `ARM_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo).
* - The environment type `LINUX_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai).
* - The environment type `LINUX_GPU_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney).
* - The environment type `WINDOWS_SERVER_2019_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland).
* - The environment type `WINDOWS_SERVER_2022_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
* For more information, see [Build environment compute types](https://docs.aws.amazon.com//codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild user guide* .
*/
public val environmentType: Output?
get() = javaResource.environmentType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> fleetEnvironmentTypeToKotlin(args0) })
}).orElse(null)
})
/**
* The service role associated with the compute fleet. For more information, see [Allow a user to add a permission policy for a fleet service role](https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html) in the *AWS CodeBuild User Guide* .
*/
public val fleetServiceRole: Output?
get() = javaResource.fleetServiceRole().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Information about the VPC configuration that AWS CodeBuild accesses.
*/
public val fleetVpcConfig: Output?
get() = javaResource.fleetVpcConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> fleetVpcConfigToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the compute fleet.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The compute fleet overflow behavior.
* - For overflow behavior `QUEUE` , your overflow builds need to wait on the existing fleet instance to become available.
* - For overflow behavior `ON_DEMAND` , your overflow builds run on CodeBuild on-demand.
* > If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see [Example policy statement to allow CodeBuild access to AWS services required to create a VPC network interface](https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface) .
*/
public val overflowBehavior: Output?
get() = javaResource.overflowBehavior().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> fleetOverflowBehaviorToKotlin(args0) })
}).orElse(null)
})
/**
* A list of tag key and value pairs associated with this compute fleet.
* These tags are available for use by AWS services that support AWS CodeBuild compute fleet tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object FleetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.codebuild.Fleet::class == javaResource::class
override fun map(javaResource: Resource): Fleet = Fleet(
javaResource as
com.pulumi.awsnative.codebuild.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