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

com.pulumi.awsnative.ecs.kotlin.inputs.TaskDefinitionLogConfigurationArgs.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.ecs.kotlin.inputs

import com.pulumi.awsnative.ecs.inputs.TaskDefinitionLogConfigurationArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.
 * @property logDriver The log driver to use for the container.
 *  For tasks on FARGATElong, the supported log drivers are ``awslogs``, ``splunk``, and ``awsfirelens``.
 *  For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs``, ``fluentd``, ``gelf``, ``json-file``, ``journald``, ``logentries``,``syslog``, ``splunk``, and ``awsfirelens``.
 *  For more information about using the ``awslogs`` log driver, see [Using the awslogs log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.
 *  For more information about using the ``awsfirelens`` log driver, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
 *   If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
 * @property options The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
 * @property secretOptions The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
 */
public data class TaskDefinitionLogConfigurationArgs(
    public val logDriver: Output,
    public val options: Output>? = null,
    public val secretOptions: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ecs.inputs.TaskDefinitionLogConfigurationArgs =
        com.pulumi.awsnative.ecs.inputs.TaskDefinitionLogConfigurationArgs.builder()
            .logDriver(logDriver.applyValue({ args0 -> args0 }))
            .options(options?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .secretOptions(
                secretOptions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [TaskDefinitionLogConfigurationArgs].
 */
@PulumiTagMarker
public class TaskDefinitionLogConfigurationArgsBuilder internal constructor() {
    private var logDriver: Output? = null

    private var options: Output>? = null

    private var secretOptions: Output>? = null

    /**
     * @param value The log driver to use for the container.
     *  For tasks on FARGATElong, the supported log drivers are ``awslogs``, ``splunk``, and ``awsfirelens``.
     *  For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs``, ``fluentd``, ``gelf``, ``json-file``, ``journald``, ``logentries``,``syslog``, ``splunk``, and ``awsfirelens``.
     *  For more information about using the ``awslogs`` log driver, see [Using the awslogs log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.
     *  For more information about using the ``awsfirelens`` log driver, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
     *   If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
     */
    @JvmName("ehxdfakhvxbatbmk")
    public suspend fun logDriver(`value`: Output) {
        this.logDriver = value
    }

    /**
     * @param value The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
     */
    @JvmName("nhkrsbfmmfifgebi")
    public suspend fun options(`value`: Output>) {
        this.options = value
    }

    /**
     * @param value The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("pjuayaxcvarbicwo")
    public suspend fun secretOptions(`value`: Output>) {
        this.secretOptions = value
    }

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

    /**
     * @param values The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("fgxqyvxkqgswhhts")
    public suspend fun secretOptions(values: List>) {
        this.secretOptions = Output.all(values)
    }

    /**
     * @param value The log driver to use for the container.
     *  For tasks on FARGATElong, the supported log drivers are ``awslogs``, ``splunk``, and ``awsfirelens``.
     *  For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs``, ``fluentd``, ``gelf``, ``json-file``, ``journald``, ``logentries``,``syslog``, ``splunk``, and ``awsfirelens``.
     *  For more information about using the ``awslogs`` log driver, see [Using the awslogs log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.
     *  For more information about using the ``awsfirelens`` log driver, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
     *   If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
     */
    @JvmName("dtlrxyveobxijkma")
    public suspend fun logDriver(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.logDriver = mapped
    }

    /**
     * @param value The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
     */
    @JvmName("bsxeqrcpgcakqkhg")
    public suspend fun options(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.options = mapped
    }

    /**
     * @param values The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
     */
    @JvmName("klgfivriuxxuliei")
    public fun options(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.options = mapped
    }

    /**
     * @param value The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("pyimmltcocvuuinb")
    public suspend fun secretOptions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretOptions = mapped
    }

    /**
     * @param argument The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("lbhqrjmdfpkemflu")
    public suspend fun secretOptions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.secretOptions = mapped
    }

    /**
     * @param argument The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("jopgjjsheixentgj")
    public suspend fun secretOptions(vararg argument: suspend TaskDefinitionSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.secretOptions = mapped
    }

    /**
     * @param argument The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("cfqmytfjnlbwdfsn")
    public suspend fun secretOptions(argument: suspend TaskDefinitionSecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TaskDefinitionSecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secretOptions = mapped
    }

    /**
     * @param values The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
     */
    @JvmName("bpapacniibshakju")
    public suspend fun secretOptions(vararg values: TaskDefinitionSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretOptions = mapped
    }

    internal fun build(): TaskDefinitionLogConfigurationArgs = TaskDefinitionLogConfigurationArgs(
        logDriver = logDriver ?: throw PulumiNullFieldException("logDriver"),
        options = options,
        secretOptions = secretOptions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy