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

com.pulumi.digitalocean.kotlin.inputs.AppSpecServiceArgs.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: 4.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.AppSpecServiceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property alerts Describes an alert policy for the component.
 * @property autoscaling Configuration for automatically scaling this component based on metrics.
 * @property buildCommand An optional build command to run while building this component from source.
 * @property cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
 * @property dockerfilePath The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
 * @property environmentSlug An environment slug describing the type of this app.
 * @property envs Describes an environment variable made available to an app competent.
 * @property git A Git repo to use as the component's source. The repository must be able to be cloned without authentication.  Only one of `git`, `github` or `gitlab`  may be set.
 * @property github A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property gitlab A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property healthCheck A health check to determine the availability of this component.
 * @property httpPort The internal port on which this service's run command will listen.
 * @property image An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
 * @property instanceCount The amount of instances that this component should be scaled to.
 * @property instanceSizeSlug The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
 * @property internalPorts A list of ports on which this service will listen for internal traffic.
 * @property logDestinations Describes a log forwarding destination.
 * @property name The name of the component.
 * @property routes An HTTP paths that should be routed to this component.
 * @property runCommand An optional run command to override the component's default.
 * @property sourceDir An optional path to the working directory to use for the build.
 */
public data class AppSpecServiceArgs(
    public val alerts: Output>? = null,
    public val autoscaling: Output? = null,
    public val buildCommand: Output? = null,
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    public val cors: Output? = null,
    public val dockerfilePath: Output? = null,
    public val environmentSlug: Output? = null,
    public val envs: Output>? = null,
    public val git: Output? = null,
    public val github: Output? = null,
    public val gitlab: Output? = null,
    public val healthCheck: Output? = null,
    public val httpPort: Output? = null,
    public val image: Output? = null,
    public val instanceCount: Output? = null,
    public val instanceSizeSlug: Output? = null,
    public val internalPorts: Output>? = null,
    public val logDestinations: Output>? = null,
    public val name: Output,
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    public val routes: Output>? = null,
    public val runCommand: Output? = null,
    public val sourceDir: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.AppSpecServiceArgs =
        com.pulumi.digitalocean.inputs.AppSpecServiceArgs.builder()
            .alerts(alerts?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .autoscaling(autoscaling?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .buildCommand(buildCommand?.applyValue({ args0 -> args0 }))
            .cors(cors?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dockerfilePath(dockerfilePath?.applyValue({ args0 -> args0 }))
            .environmentSlug(environmentSlug?.applyValue({ args0 -> args0 }))
            .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .git(git?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .github(github?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .gitlab(gitlab?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .healthCheck(healthCheck?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .httpPort(httpPort?.applyValue({ args0 -> args0 }))
            .image(image?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instanceCount(instanceCount?.applyValue({ args0 -> args0 }))
            .instanceSizeSlug(instanceSizeSlug?.applyValue({ args0 -> args0 }))
            .internalPorts(internalPorts?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .logDestinations(
                logDestinations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .routes(routes?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .runCommand(runCommand?.applyValue({ args0 -> args0 }))
            .sourceDir(sourceDir?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppSpecServiceArgs].
 */
@PulumiTagMarker
public class AppSpecServiceArgsBuilder internal constructor() {
    private var alerts: Output>? = null

    private var autoscaling: Output? = null

    private var buildCommand: Output? = null

    private var cors: Output? = null

    private var dockerfilePath: Output? = null

    private var environmentSlug: Output? = null

    private var envs: Output>? = null

    private var git: Output? = null

    private var github: Output? = null

    private var gitlab: Output? = null

    private var healthCheck: Output? = null

    private var httpPort: Output? = null

    private var image: Output? = null

    private var instanceCount: Output? = null

    private var instanceSizeSlug: Output? = null

    private var internalPorts: Output>? = null

    private var logDestinations: Output>? = null

    private var name: Output? = null

    private var routes: Output>? = null

    private var runCommand: Output? = null

    private var sourceDir: Output? = null

    /**
     * @param value Describes an alert policy for the component.
     */
    @JvmName("egarminqdirwmlng")
    public suspend fun alerts(`value`: Output>) {
        this.alerts = value
    }

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

    /**
     * @param values Describes an alert policy for the component.
     */
    @JvmName("sykhawmnwghhwlpk")
    public suspend fun alerts(values: List>) {
        this.alerts = Output.all(values)
    }

    /**
     * @param value Configuration for automatically scaling this component based on metrics.
     */
    @JvmName("yjwrtibheggxpxrn")
    public suspend fun autoscaling(`value`: Output) {
        this.autoscaling = value
    }

    /**
     * @param value An optional build command to run while building this component from source.
     */
    @JvmName("ryivngwboysivreo")
    public suspend fun buildCommand(`value`: Output) {
        this.buildCommand = value
    }

    /**
     * @param value The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
     */
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    @JvmName("pgrrfqswrtjpskij")
    public suspend fun cors(`value`: Output) {
        this.cors = value
    }

    /**
     * @param value The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
     */
    @JvmName("rgcqulkarxclhwss")
    public suspend fun dockerfilePath(`value`: Output) {
        this.dockerfilePath = value
    }

    /**
     * @param value An environment slug describing the type of this app.
     */
    @JvmName("tlmqmbvnrxsqqcdb")
    public suspend fun environmentSlug(`value`: Output) {
        this.environmentSlug = value
    }

    /**
     * @param value Describes an environment variable made available to an app competent.
     */
    @JvmName("bgsiaknfxcirbqjt")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values Describes an environment variable made available to an app competent.
     */
    @JvmName("kgoynghhrgjjibwm")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value A Git repo to use as the component's source. The repository must be able to be cloned without authentication.  Only one of `git`, `github` or `gitlab`  may be set.
     */
    @JvmName("dyhkungaylslobhb")
    public suspend fun git(`value`: Output) {
        this.git = value
    }

    /**
     * @param value A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("yhdmxkgiolgjgxdt")
    public suspend fun github(`value`: Output) {
        this.github = value
    }

    /**
     * @param value A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("taqheeqlqahqxfjd")
    public suspend fun gitlab(`value`: Output) {
        this.gitlab = value
    }

    /**
     * @param value A health check to determine the availability of this component.
     */
    @JvmName("lqdpymmtfnlkbgrr")
    public suspend fun healthCheck(`value`: Output) {
        this.healthCheck = value
    }

    /**
     * @param value The internal port on which this service's run command will listen.
     */
    @JvmName("yswtlvojqphwnchq")
    public suspend fun httpPort(`value`: Output) {
        this.httpPort = value
    }

    /**
     * @param value An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("utlckpeqmiioqxnd")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value The amount of instances that this component should be scaled to.
     */
    @JvmName("uxlnpoqculjltrnv")
    public suspend fun instanceCount(`value`: Output) {
        this.instanceCount = value
    }

    /**
     * @param value The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
     */
    @JvmName("ixxdqlmnonjgqdjr")
    public suspend fun instanceSizeSlug(`value`: Output) {
        this.instanceSizeSlug = value
    }

    /**
     * @param value A list of ports on which this service will listen for internal traffic.
     */
    @JvmName("lkhjnjdvlfeylrbu")
    public suspend fun internalPorts(`value`: Output>) {
        this.internalPorts = value
    }

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

    /**
     * @param values A list of ports on which this service will listen for internal traffic.
     */
    @JvmName("okebnacehvpeqebe")
    public suspend fun internalPorts(values: List>) {
        this.internalPorts = Output.all(values)
    }

    /**
     * @param value Describes a log forwarding destination.
     */
    @JvmName("tuhkpclkibghyumf")
    public suspend fun logDestinations(`value`: Output>) {
        this.logDestinations = value
    }

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

    /**
     * @param values Describes a log forwarding destination.
     */
    @JvmName("ofposfmqqeoqqnvu")
    public suspend fun logDestinations(values: List>) {
        this.logDestinations = Output.all(values)
    }

    /**
     * @param value The name of the component.
     */
    @JvmName("rdtstwnwblqglkne")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("gahdyckjeieiofpm")
    public suspend fun routes(`value`: Output>) {
        this.routes = value
    }

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

    /**
     * @param values An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("nsvamiwnqmavekds")
    public suspend fun routes(values: List>) {
        this.routes = Output.all(values)
    }

    /**
     * @param value An optional run command to override the component's default.
     */
    @JvmName("bmwvvybegevabury")
    public suspend fun runCommand(`value`: Output) {
        this.runCommand = value
    }

    /**
     * @param value An optional path to the working directory to use for the build.
     */
    @JvmName("rxvcvneoquiikgfw")
    public suspend fun sourceDir(`value`: Output) {
        this.sourceDir = value
    }

    /**
     * @param value Describes an alert policy for the component.
     */
    @JvmName("pcsqkyoppwryerwh")
    public suspend fun alerts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alerts = mapped
    }

    /**
     * @param argument Describes an alert policy for the component.
     */
    @JvmName("hwmqkefqdtvydwsv")
    public suspend fun alerts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceAlertArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alerts = mapped
    }

    /**
     * @param argument Describes an alert policy for the component.
     */
    @JvmName("itsssckcebpckaqw")
    public suspend fun alerts(vararg argument: suspend AppSpecServiceAlertArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceAlertArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alerts = mapped
    }

    /**
     * @param argument Describes an alert policy for the component.
     */
    @JvmName("rpfhqujpxscdnopg")
    public suspend fun alerts(argument: suspend AppSpecServiceAlertArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppSpecServiceAlertArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.alerts = mapped
    }

    /**
     * @param values Describes an alert policy for the component.
     */
    @JvmName("yyjrrkphehbbsceg")
    public suspend fun alerts(vararg values: AppSpecServiceAlertArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alerts = mapped
    }

    /**
     * @param value Configuration for automatically scaling this component based on metrics.
     */
    @JvmName("eqhlpdmgakttspym")
    public suspend fun autoscaling(`value`: AppSpecServiceAutoscalingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscaling = mapped
    }

    /**
     * @param argument Configuration for automatically scaling this component based on metrics.
     */
    @JvmName("rgthsihlugvmxomo")
    public suspend fun autoscaling(argument: suspend AppSpecServiceAutoscalingArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceAutoscalingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoscaling = mapped
    }

    /**
     * @param value An optional build command to run while building this component from source.
     */
    @JvmName("asofoowdmycisoku")
    public suspend fun buildCommand(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.buildCommand = mapped
    }

    /**
     * @param value The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
     */
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    @JvmName("nbhloslwrdxcyoxr")
    public suspend fun cors(`value`: AppSpecServiceCorsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cors = mapped
    }

    /**
     * @param argument The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
     */
    @Deprecated(
        message = """
  Service level CORS rules are deprecated in favor of ingresses
  """,
    )
    @JvmName("vdivwyfgbsgacydw")
    public suspend fun cors(argument: suspend AppSpecServiceCorsArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceCorsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cors = mapped
    }

    /**
     * @param value The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.
     */
    @JvmName("bidentdmlppkjwou")
    public suspend fun dockerfilePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dockerfilePath = mapped
    }

    /**
     * @param value An environment slug describing the type of this app.
     */
    @JvmName("elqrjtphujxkpqtc")
    public suspend fun environmentSlug(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentSlug = mapped
    }

    /**
     * @param value Describes an environment variable made available to an app competent.
     */
    @JvmName("tkwnenhrtxjolrhi")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param argument Describes an environment variable made available to an app competent.
     */
    @JvmName("iukrfxcwrtnrcoyr")
    public suspend fun envs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument Describes an environment variable made available to an app competent.
     */
    @JvmName("ihuwkaphudqhrkbn")
    public suspend fun envs(vararg argument: suspend AppSpecServiceEnvArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument Describes an environment variable made available to an app competent.
     */
    @JvmName("ghbytugqrfsbtgcv")
    public suspend fun envs(argument: suspend AppSpecServiceEnvArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppSpecServiceEnvArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param values Describes an environment variable made available to an app competent.
     */
    @JvmName("xnixfyafbshcuijl")
    public suspend fun envs(vararg values: AppSpecServiceEnvArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value A Git repo to use as the component's source. The repository must be able to be cloned without authentication.  Only one of `git`, `github` or `gitlab`  may be set.
     */
    @JvmName("trgufrhjunnrcjpn")
    public suspend fun git(`value`: AppSpecServiceGitArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.git = mapped
    }

    /**
     * @param argument A Git repo to use as the component's source. The repository must be able to be cloned without authentication.  Only one of `git`, `github` or `gitlab`  may be set.
     */
    @JvmName("kujxmorgcuogrcob")
    public suspend fun git(argument: suspend AppSpecServiceGitArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceGitArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.git = mapped
    }

    /**
     * @param value A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("nksnybblvgdaqrwl")
    public suspend fun github(`value`: AppSpecServiceGithubArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.github = mapped
    }

    /**
     * @param argument A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("fwmgnafybsfcfbbw")
    public suspend fun github(argument: suspend AppSpecServiceGithubArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceGithubArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.github = mapped
    }

    /**
     * @param value A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("vouniosawoyvgqhp")
    public suspend fun gitlab(`value`: AppSpecServiceGitlabArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gitlab = mapped
    }

    /**
     * @param argument A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("hugdyealdstjeboy")
    public suspend fun gitlab(argument: suspend AppSpecServiceGitlabArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceGitlabArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gitlab = mapped
    }

    /**
     * @param value A health check to determine the availability of this component.
     */
    @JvmName("bdllmbuhhlbxqkca")
    public suspend fun healthCheck(`value`: AppSpecServiceHealthCheckArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheck = mapped
    }

    /**
     * @param argument A health check to determine the availability of this component.
     */
    @JvmName("ducsxjwckoukauxt")
    public suspend fun healthCheck(argument: suspend AppSpecServiceHealthCheckArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceHealthCheckArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.healthCheck = mapped
    }

    /**
     * @param value The internal port on which this service's run command will listen.
     */
    @JvmName("gspagiaoeggvkkqa")
    public suspend fun httpPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpPort = mapped
    }

    /**
     * @param value An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("iyoehnphvwjlybtc")
    public suspend fun image(`value`: AppSpecServiceImageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param argument An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set.
     */
    @JvmName("xeqyxgaoibxjwvdm")
    public suspend fun image(argument: suspend AppSpecServiceImageArgsBuilder.() -> Unit) {
        val toBeMapped = AppSpecServiceImageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.image = mapped
    }

    /**
     * @param value The amount of instances that this component should be scaled to.
     */
    @JvmName("mskhirpijacbahme")
    public suspend fun instanceCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceCount = mapped
    }

    /**
     * @param value The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/api-reference/#operation/list_instance_sizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs`
     */
    @JvmName("vqemqrmorpjqoblb")
    public suspend fun instanceSizeSlug(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceSizeSlug = mapped
    }

    /**
     * @param value A list of ports on which this service will listen for internal traffic.
     */
    @JvmName("turfegbkubwapofs")
    public suspend fun internalPorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internalPorts = mapped
    }

    /**
     * @param values A list of ports on which this service will listen for internal traffic.
     */
    @JvmName("xfmlncxkepjqybwo")
    public suspend fun internalPorts(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.internalPorts = mapped
    }

    /**
     * @param value Describes a log forwarding destination.
     */
    @JvmName("snjaapjfnsxyrkrj")
    public suspend fun logDestinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logDestinations = mapped
    }

    /**
     * @param argument Describes a log forwarding destination.
     */
    @JvmName("mxcdhvrsosapwmsy")
    public suspend fun logDestinations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceLogDestinationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.logDestinations = mapped
    }

    /**
     * @param argument Describes a log forwarding destination.
     */
    @JvmName("mslcbbbodtnpqrtd")
    public suspend fun logDestinations(vararg argument: suspend AppSpecServiceLogDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceLogDestinationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.logDestinations = mapped
    }

    /**
     * @param argument Describes a log forwarding destination.
     */
    @JvmName("holkcbwnapjmbbxv")
    public suspend fun logDestinations(argument: suspend AppSpecServiceLogDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppSpecServiceLogDestinationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.logDestinations = mapped
    }

    /**
     * @param values Describes a log forwarding destination.
     */
    @JvmName("qagotenrthqcqitk")
    public suspend fun logDestinations(vararg values: AppSpecServiceLogDestinationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.logDestinations = mapped
    }

    /**
     * @param value The name of the component.
     */
    @JvmName("tghtypsalvlucwty")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("jrrsetfrvrovaotr")
    public suspend fun routes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param argument An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("odbfevxmxwmmacyr")
    public suspend fun routes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("tspqipfmipvtgdke")
    public suspend fun routes(vararg argument: suspend AppSpecServiceRouteArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecServiceRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("ggbqstjscqsssytl")
    public suspend fun routes(argument: suspend AppSpecServiceRouteArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppSpecServiceRouteArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param values An HTTP paths that should be routed to this component.
     */
    @Deprecated(
        message = """
  Service level routes are deprecated in favor of ingresses
  """,
    )
    @JvmName("icqqvjbldiqwjfqw")
    public suspend fun routes(vararg values: AppSpecServiceRouteArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param value An optional run command to override the component's default.
     */
    @JvmName("iqmhqufknywtphgf")
    public suspend fun runCommand(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runCommand = mapped
    }

    /**
     * @param value An optional path to the working directory to use for the build.
     */
    @JvmName("exsitdxwcgcecwnw")
    public suspend fun sourceDir(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceDir = mapped
    }

    internal fun build(): AppSpecServiceArgs = AppSpecServiceArgs(
        alerts = alerts,
        autoscaling = autoscaling,
        buildCommand = buildCommand,
        cors = cors,
        dockerfilePath = dockerfilePath,
        environmentSlug = environmentSlug,
        envs = envs,
        git = git,
        github = github,
        gitlab = gitlab,
        healthCheck = healthCheck,
        httpPort = httpPort,
        image = image,
        instanceCount = instanceCount,
        instanceSizeSlug = instanceSizeSlug,
        internalPorts = internalPorts,
        logDestinations = logDestinations,
        name = name ?: throw PulumiNullFieldException("name"),
        routes = routes,
        runCommand = runCommand,
        sourceDir = sourceDir,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy