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

com.pulumi.awsnative.apprunner.kotlin.ServiceArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apprunner.kotlin

import com.pulumi.awsnative.apprunner.ServiceArgs.builder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceEncryptionConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceEncryptionConfigurationArgsBuilder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceHealthCheckConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceHealthCheckConfigurationArgsBuilder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceInstanceConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceInstanceConfigurationArgsBuilder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceNetworkConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceNetworkConfigurationArgsBuilder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceObservabilityConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceObservabilityConfigurationArgsBuilder
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceSourceConfigurationArgs
import com.pulumi.awsnative.apprunner.kotlin.inputs.ServiceSourceConfigurationArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::AppRunner::Service resource specifies an AppRunner Service.
 * @property autoScalingConfigurationArn Autoscaling configuration ARN
 * @property encryptionConfiguration An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed key .
 * @property healthCheckConfiguration The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
 * @property instanceConfiguration The runtime configuration of instances (scaling units) of your service.
 * @property networkConfiguration Configuration settings related to network traffic of the web application that the App Runner service runs.
 * @property observabilityConfiguration The observability configuration of your service.
 * @property serviceName The AppRunner Service Name.
 * @property sourceConfiguration The source to deploy to the App Runner service. It can be a code or an image repository.
 * @property tags An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
 */
public data class ServiceArgs(
    public val autoScalingConfigurationArn: Output? = null,
    public val encryptionConfiguration: Output? = null,
    public val healthCheckConfiguration: Output? = null,
    public val instanceConfiguration: Output? = null,
    public val networkConfiguration: Output? = null,
    public val observabilityConfiguration: Output? = null,
    public val serviceName: Output? = null,
    public val sourceConfiguration: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apprunner.ServiceArgs =
        com.pulumi.awsnative.apprunner.ServiceArgs.builder()
            .autoScalingConfigurationArn(autoScalingConfigurationArn?.applyValue({ args0 -> args0 }))
            .encryptionConfiguration(
                encryptionConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .healthCheckConfiguration(
                healthCheckConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .instanceConfiguration(
                instanceConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .networkConfiguration(
                networkConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .observabilityConfiguration(
                observabilityConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .sourceConfiguration(
                sourceConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ServiceArgs].
 */
@PulumiTagMarker
public class ServiceArgsBuilder internal constructor() {
    private var autoScalingConfigurationArn: Output? = null

    private var encryptionConfiguration: Output? = null

    private var healthCheckConfiguration: Output? = null

    private var instanceConfiguration: Output? = null

    private var networkConfiguration: Output? = null

    private var observabilityConfiguration: Output? = null

    private var serviceName: Output? = null

    private var sourceConfiguration: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Autoscaling configuration ARN
     */
    @JvmName("grnghykkabkjusyq")
    public suspend fun autoScalingConfigurationArn(`value`: Output) {
        this.autoScalingConfigurationArn = value
    }

    /**
     * @param value An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed key .
     */
    @JvmName("swqcaeqiwhxbelbu")
    public suspend fun encryptionConfiguration(`value`: Output) {
        this.encryptionConfiguration = value
    }

    /**
     * @param value The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
     */
    @JvmName("oxldulxigydyhmoy")
    public suspend fun healthCheckConfiguration(`value`: Output) {
        this.healthCheckConfiguration = value
    }

    /**
     * @param value The runtime configuration of instances (scaling units) of your service.
     */
    @JvmName("kskucoqjoaxkuvgc")
    public suspend fun instanceConfiguration(`value`: Output) {
        this.instanceConfiguration = value
    }

    /**
     * @param value Configuration settings related to network traffic of the web application that the App Runner service runs.
     */
    @JvmName("lxoysyipprvslswf")
    public suspend fun networkConfiguration(`value`: Output) {
        this.networkConfiguration = value
    }

    /**
     * @param value The observability configuration of your service.
     */
    @JvmName("bashrjmiekodhuxu")
    public suspend fun observabilityConfiguration(`value`: Output) {
        this.observabilityConfiguration = value
    }

    /**
     * @param value The AppRunner Service Name.
     */
    @JvmName("phgwavmvachthmyg")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value The source to deploy to the App Runner service. It can be a code or an image repository.
     */
    @JvmName("cgprdrvhpefbsyrt")
    public suspend fun sourceConfiguration(`value`: Output) {
        this.sourceConfiguration = value
    }

    /**
     * @param value An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("dndyxutsscibsywg")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("irevgtiemhteeole")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Autoscaling configuration ARN
     */
    @JvmName("yqssyballhydateg")
    public suspend fun autoScalingConfigurationArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoScalingConfigurationArn = mapped
    }

    /**
     * @param value An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed key .
     */
    @JvmName("nflfsufqqujpqyuw")
    public suspend fun encryptionConfiguration(`value`: ServiceEncryptionConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionConfiguration = mapped
    }

    /**
     * @param argument An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed key .
     */
    @JvmName("wvqfdfigievargal")
    public suspend fun encryptionConfiguration(argument: suspend ServiceEncryptionConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceEncryptionConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryptionConfiguration = mapped
    }

    /**
     * @param value The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
     */
    @JvmName("eiyutmjqalarqkje")
    public suspend fun healthCheckConfiguration(`value`: ServiceHealthCheckConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckConfiguration = mapped
    }

    /**
     * @param argument The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
     */
    @JvmName("gwfibskfnjjjuife")
    public suspend fun healthCheckConfiguration(argument: suspend ServiceHealthCheckConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceHealthCheckConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.healthCheckConfiguration = mapped
    }

    /**
     * @param value The runtime configuration of instances (scaling units) of your service.
     */
    @JvmName("yotqqyipiluhbyfw")
    public suspend fun instanceConfiguration(`value`: ServiceInstanceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceConfiguration = mapped
    }

    /**
     * @param argument The runtime configuration of instances (scaling units) of your service.
     */
    @JvmName("hcmlfpxjlnbvgygt")
    public suspend fun instanceConfiguration(argument: suspend ServiceInstanceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceInstanceConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.instanceConfiguration = mapped
    }

    /**
     * @param value Configuration settings related to network traffic of the web application that the App Runner service runs.
     */
    @JvmName("uyysoxwtcajjqukx")
    public suspend fun networkConfiguration(`value`: ServiceNetworkConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkConfiguration = mapped
    }

    /**
     * @param argument Configuration settings related to network traffic of the web application that the App Runner service runs.
     */
    @JvmName("ecrsrjbueuvrisal")
    public suspend fun networkConfiguration(argument: suspend ServiceNetworkConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceNetworkConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkConfiguration = mapped
    }

    /**
     * @param value The observability configuration of your service.
     */
    @JvmName("rlqedogfbtdptffi")
    public suspend fun observabilityConfiguration(`value`: ServiceObservabilityConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.observabilityConfiguration = mapped
    }

    /**
     * @param argument The observability configuration of your service.
     */
    @JvmName("ylgvaoaidclephhq")
    public suspend fun observabilityConfiguration(argument: suspend ServiceObservabilityConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceObservabilityConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.observabilityConfiguration = mapped
    }

    /**
     * @param value The AppRunner Service Name.
     */
    @JvmName("hjrdreywveorfvvw")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value The source to deploy to the App Runner service. It can be a code or an image repository.
     */
    @JvmName("roakmvuuueaapcia")
    public suspend fun sourceConfiguration(`value`: ServiceSourceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceConfiguration = mapped
    }

    /**
     * @param argument The source to deploy to the App Runner service. It can be a code or an image repository.
     */
    @JvmName("lbxjwwmjiqrcmqig")
    public suspend fun sourceConfiguration(argument: suspend ServiceSourceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceSourceConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceConfiguration = mapped
    }

    /**
     * @param value An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("jjhslqcpttrwqfrt")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("iybxygpvyvdejcvo")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("qhflkbvnbivslgte")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("bcruhnyxgisarpaj")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
     */
    @JvmName("uflnkdnxgnbkkesb")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ServiceArgs = ServiceArgs(
        autoScalingConfigurationArn = autoScalingConfigurationArn,
        encryptionConfiguration = encryptionConfiguration,
        healthCheckConfiguration = healthCheckConfiguration,
        instanceConfiguration = instanceConfiguration,
        networkConfiguration = networkConfiguration,
        observabilityConfiguration = observabilityConfiguration,
        serviceName = serviceName,
        sourceConfiguration = sourceConfiguration,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy