All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.codebuild.kotlin.inputs.ProjectEnvironmentArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.codebuild.kotlin.inputs

import com.pulumi.aws.codebuild.inputs.ProjectEnvironmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property certificate ARN of the S3 bucket, path prefix and object key that contains the PEM-encoded certificate.
 * @property computeType Information about the compute resources the build project will use. Valid values: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`, `BUILD_GENERAL1_2XLARGE`, `BUILD_LAMBDA_1GB`, `BUILD_LAMBDA_2GB`, `BUILD_LAMBDA_4GB`, `BUILD_LAMBDA_8GB`, `BUILD_LAMBDA_10GB`. `BUILD_GENERAL1_SMALL` is only valid if `type` is set to `LINUX_CONTAINER`. When `type` is set to `LINUX_GPU_CONTAINER`, `compute_type` must be `BUILD_GENERAL1_LARGE`. When `type` is set to `LINUX_LAMBDA_CONTAINER` or `ARM_LAMBDA_CONTAINER`, `compute_type` must be `BUILD_LAMBDA_XGB`.`
 * @property environmentVariables Configuration block. Detailed below.
 * @property fleet Configuration block. Detailed below.
 * @property image Docker image to use for this build project. Valid values include [Docker images provided by CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) (e.g `aws/codebuild/amazonlinux2-x86_64-standard:4.0`), [Docker Hub images](https://hub.docker.com/) (e.g., `pulumi/pulumi:latest`), and full Docker repository URIs such as those for ECR (e.g., `137112412989.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest`).
 * @property imagePullCredentialsType Type of credentials AWS CodeBuild uses to pull images in your build. Valid values: `CODEBUILD`, `SERVICE_ROLE`. When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CodeBuild credentials. Defaults to `CODEBUILD`.
 * @property privilegedMode Whether to enable running the Docker daemon inside a Docker container. Defaults to `false`.
 * @property registryCredential Configuration block. Detailed below.
 * @property type Type of build environment to use for related builds. Valid values: `LINUX_CONTAINER`, `LINUX_GPU_CONTAINER`, `WINDOWS_CONTAINER` (deprecated), `WINDOWS_SERVER_2019_CONTAINER`, `ARM_CONTAINER`, `LINUX_LAMBDA_CONTAINER`, `ARM_LAMBDA_CONTAINER`. For additional information, see the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html).
 */
public data class ProjectEnvironmentArgs(
    public val certificate: Output? = null,
    public val computeType: Output,
    public val environmentVariables: Output>? = null,
    public val fleet: Output? = null,
    public val image: Output,
    public val imagePullCredentialsType: Output? = null,
    public val privilegedMode: Output? = null,
    public val registryCredential: Output? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.codebuild.inputs.ProjectEnvironmentArgs =
        com.pulumi.aws.codebuild.inputs.ProjectEnvironmentArgs.builder()
            .certificate(certificate?.applyValue({ args0 -> args0 }))
            .computeType(computeType.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .fleet(fleet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .image(image.applyValue({ args0 -> args0 }))
            .imagePullCredentialsType(imagePullCredentialsType?.applyValue({ args0 -> args0 }))
            .privilegedMode(privilegedMode?.applyValue({ args0 -> args0 }))
            .registryCredential(
                registryCredential?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProjectEnvironmentArgs].
 */
@PulumiTagMarker
public class ProjectEnvironmentArgsBuilder internal constructor() {
    private var certificate: Output? = null

    private var computeType: Output? = null

    private var environmentVariables: Output>? = null

    private var fleet: Output? = null

    private var image: Output? = null

    private var imagePullCredentialsType: Output? = null

    private var privilegedMode: Output? = null

    private var registryCredential: Output? = null

    private var type: Output? = null

    /**
     * @param value ARN of the S3 bucket, path prefix and object key that contains the PEM-encoded certificate.
     */
    @JvmName("uaothctwifeyjlkv")
    public suspend fun certificate(`value`: Output) {
        this.certificate = value
    }

    /**
     * @param value Information about the compute resources the build project will use. Valid values: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`, `BUILD_GENERAL1_2XLARGE`, `BUILD_LAMBDA_1GB`, `BUILD_LAMBDA_2GB`, `BUILD_LAMBDA_4GB`, `BUILD_LAMBDA_8GB`, `BUILD_LAMBDA_10GB`. `BUILD_GENERAL1_SMALL` is only valid if `type` is set to `LINUX_CONTAINER`. When `type` is set to `LINUX_GPU_CONTAINER`, `compute_type` must be `BUILD_GENERAL1_LARGE`. When `type` is set to `LINUX_LAMBDA_CONTAINER` or `ARM_LAMBDA_CONTAINER`, `compute_type` must be `BUILD_LAMBDA_XGB`.`
     */
    @JvmName("prdtjpiidqkotcfb")
    public suspend fun computeType(`value`: Output) {
        this.computeType = value
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("jfyivwvkqhingnyf")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    @JvmName("ujcfrobofpciyenf")
    public suspend fun environmentVariables(vararg values: Output) {
        this.environmentVariables = Output.all(values.asList())
    }

    /**
     * @param values Configuration block. Detailed below.
     */
    @JvmName("fqajhfhfrlnwldkh")
    public suspend fun environmentVariables(values: List>) {
        this.environmentVariables = Output.all(values)
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("isotlyasuakhulga")
    public suspend fun fleet(`value`: Output) {
        this.fleet = value
    }

    /**
     * @param value Docker image to use for this build project. Valid values include [Docker images provided by CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) (e.g `aws/codebuild/amazonlinux2-x86_64-standard:4.0`), [Docker Hub images](https://hub.docker.com/) (e.g., `pulumi/pulumi:latest`), and full Docker repository URIs such as those for ECR (e.g., `137112412989.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest`).
     */
    @JvmName("xtwuticmijbwdwbk")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Type of credentials AWS CodeBuild uses to pull images in your build. Valid values: `CODEBUILD`, `SERVICE_ROLE`. When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CodeBuild credentials. Defaults to `CODEBUILD`.
     */
    @JvmName("wjcvhqjfmpbogqpi")
    public suspend fun imagePullCredentialsType(`value`: Output) {
        this.imagePullCredentialsType = value
    }

    /**
     * @param value Whether to enable running the Docker daemon inside a Docker container. Defaults to `false`.
     */
    @JvmName("mieoqbsejktxpngb")
    public suspend fun privilegedMode(`value`: Output) {
        this.privilegedMode = value
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("anqtqipdqnhxnnak")
    public suspend fun registryCredential(`value`: Output) {
        this.registryCredential = value
    }

    /**
     * @param value Type of build environment to use for related builds. Valid values: `LINUX_CONTAINER`, `LINUX_GPU_CONTAINER`, `WINDOWS_CONTAINER` (deprecated), `WINDOWS_SERVER_2019_CONTAINER`, `ARM_CONTAINER`, `LINUX_LAMBDA_CONTAINER`, `ARM_LAMBDA_CONTAINER`. For additional information, see the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html).
     */
    @JvmName("jmnpopbsckoeljix")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value ARN of the S3 bucket, path prefix and object key that contains the PEM-encoded certificate.
     */
    @JvmName("lsnmdawehfwxsgdb")
    public suspend fun certificate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificate = mapped
    }

    /**
     * @param value Information about the compute resources the build project will use. Valid values: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM`, `BUILD_GENERAL1_LARGE`, `BUILD_GENERAL1_2XLARGE`, `BUILD_LAMBDA_1GB`, `BUILD_LAMBDA_2GB`, `BUILD_LAMBDA_4GB`, `BUILD_LAMBDA_8GB`, `BUILD_LAMBDA_10GB`. `BUILD_GENERAL1_SMALL` is only valid if `type` is set to `LINUX_CONTAINER`. When `type` is set to `LINUX_GPU_CONTAINER`, `compute_type` must be `BUILD_GENERAL1_LARGE`. When `type` is set to `LINUX_LAMBDA_CONTAINER` or `ARM_LAMBDA_CONTAINER`, `compute_type` must be `BUILD_LAMBDA_XGB`.`
     */
    @JvmName("cuhflhrwboaidqrp")
    public suspend fun computeType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.computeType = mapped
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("lwgtxijgiafpubjm")
    public suspend fun environmentVariables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param argument Configuration block. Detailed below.
     */
    @JvmName("sgevsjqheoncturc")
    public suspend fun environmentVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ProjectEnvironmentEnvironmentVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument Configuration block. Detailed below.
     */
    @JvmName("hidtkawqatgwjqcn")
    public suspend fun environmentVariables(vararg argument: suspend ProjectEnvironmentEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ProjectEnvironmentEnvironmentVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument Configuration block. Detailed below.
     */
    @JvmName("yqlarqmdkltwevxk")
    public suspend fun environmentVariables(argument: suspend ProjectEnvironmentEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ProjectEnvironmentEnvironmentVariableArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param values Configuration block. Detailed below.
     */
    @JvmName("qdxgflhtqktpwuiu")
    public suspend fun environmentVariables(vararg values: ProjectEnvironmentEnvironmentVariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("muqhqqcqqfyqmkfe")
    public suspend fun fleet(`value`: ProjectEnvironmentFleetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fleet = mapped
    }

    /**
     * @param argument Configuration block. Detailed below.
     */
    @JvmName("pmitkxlbpxfjgesx")
    public suspend fun fleet(argument: suspend ProjectEnvironmentFleetArgsBuilder.() -> Unit) {
        val toBeMapped = ProjectEnvironmentFleetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.fleet = mapped
    }

    /**
     * @param value Docker image to use for this build project. Valid values include [Docker images provided by CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) (e.g `aws/codebuild/amazonlinux2-x86_64-standard:4.0`), [Docker Hub images](https://hub.docker.com/) (e.g., `pulumi/pulumi:latest`), and full Docker repository URIs such as those for ECR (e.g., `137112412989.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest`).
     */
    @JvmName("vtemeuqrwcqbsjpk")
    public suspend fun image(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Type of credentials AWS CodeBuild uses to pull images in your build. Valid values: `CODEBUILD`, `SERVICE_ROLE`. When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CodeBuild credentials. Defaults to `CODEBUILD`.
     */
    @JvmName("fxodegtppxckycwc")
    public suspend fun imagePullCredentialsType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imagePullCredentialsType = mapped
    }

    /**
     * @param value Whether to enable running the Docker daemon inside a Docker container. Defaults to `false`.
     */
    @JvmName("bgbedlsdjuelhhbb")
    public suspend fun privilegedMode(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privilegedMode = mapped
    }

    /**
     * @param value Configuration block. Detailed below.
     */
    @JvmName("lerslbrqkgyahgbm")
    public suspend fun registryCredential(`value`: ProjectEnvironmentRegistryCredentialArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registryCredential = mapped
    }

    /**
     * @param argument Configuration block. Detailed below.
     */
    @JvmName("svahikdvawvycodv")
    public suspend fun registryCredential(argument: suspend ProjectEnvironmentRegistryCredentialArgsBuilder.() -> Unit) {
        val toBeMapped = ProjectEnvironmentRegistryCredentialArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.registryCredential = mapped
    }

    /**
     * @param value Type of build environment to use for related builds. Valid values: `LINUX_CONTAINER`, `LINUX_GPU_CONTAINER`, `WINDOWS_CONTAINER` (deprecated), `WINDOWS_SERVER_2019_CONTAINER`, `ARM_CONTAINER`, `LINUX_LAMBDA_CONTAINER`, `ARM_LAMBDA_CONTAINER`. For additional information, see the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html).
     */
    @JvmName("wsfsmepsoxofvpej")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ProjectEnvironmentArgs = ProjectEnvironmentArgs(
        certificate = certificate,
        computeType = computeType ?: throw PulumiNullFieldException("computeType"),
        environmentVariables = environmentVariables,
        fleet = fleet,
        image = image ?: throw PulumiNullFieldException("image"),
        imagePullCredentialsType = imagePullCredentialsType,
        privilegedMode = privilegedMode,
        registryCredential = registryCredential,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy