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

com.pulumi.aws.apprunner.kotlin.ObservabilityConfigurationArgs.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.apprunner.kotlin

import com.pulumi.aws.apprunner.ObservabilityConfigurationArgs.builder
import com.pulumi.aws.apprunner.kotlin.inputs.ObservabilityConfigurationTraceConfigurationArgs
import com.pulumi.aws.apprunner.kotlin.inputs.ObservabilityConfigurationTraceConfigurationArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an App Runner Observability Configuration.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.apprunner.ObservabilityConfiguration("example", {
 *     observabilityConfigurationName: "example",
 *     traceConfiguration: {
 *         vendor: "AWSXRAY",
 *     },
 *     tags: {
 *         Name: "example-apprunner-observability-configuration",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.apprunner.ObservabilityConfiguration("example",
 *     observability_configuration_name="example",
 *     trace_configuration={
 *         "vendor": "AWSXRAY",
 *     },
 *     tags={
 *         "Name": "example-apprunner-observability-configuration",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.AppRunner.ObservabilityConfiguration("example", new()
 *     {
 *         ObservabilityConfigurationName = "example",
 *         TraceConfiguration = new Aws.AppRunner.Inputs.ObservabilityConfigurationTraceConfigurationArgs
 *         {
 *             Vendor = "AWSXRAY",
 *         },
 *         Tags =
 *         {
 *             { "Name", "example-apprunner-observability-configuration" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apprunner.NewObservabilityConfiguration(ctx, "example", &apprunner.ObservabilityConfigurationArgs{
 * 			ObservabilityConfigurationName: pulumi.String("example"),
 * 			TraceConfiguration: &apprunner.ObservabilityConfigurationTraceConfigurationArgs{
 * 				Vendor: pulumi.String("AWSXRAY"),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("example-apprunner-observability-configuration"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.apprunner.ObservabilityConfiguration;
 * import com.pulumi.aws.apprunner.ObservabilityConfigurationArgs;
 * import com.pulumi.aws.apprunner.inputs.ObservabilityConfigurationTraceConfigurationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new ObservabilityConfiguration("example", ObservabilityConfigurationArgs.builder()
 *             .observabilityConfigurationName("example")
 *             .traceConfiguration(ObservabilityConfigurationTraceConfigurationArgs.builder()
 *                 .vendor("AWSXRAY")
 *                 .build())
 *             .tags(Map.of("Name", "example-apprunner-observability-configuration"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:apprunner:ObservabilityConfiguration
 *     properties:
 *       observabilityConfigurationName: example
 *       traceConfiguration:
 *         vendor: AWSXRAY
 *       tags:
 *         Name: example-apprunner-observability-configuration
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import App Runner Observability Configuration using the `arn`. For example:
 * ```sh
 * $ pulumi import aws:apprunner/observabilityConfiguration:ObservabilityConfiguration example arn:aws:apprunner:us-east-1:1234567890:observabilityconfiguration/example/1/d75bc7ea55b71e724fe5c23452fe22a1
 * ```
 * @property observabilityConfigurationName Name of the observability configuration.
 * @property tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property traceConfiguration Configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing. See Trace Configuration below for more details.
 */
public data class ObservabilityConfigurationArgs(
    public val observabilityConfigurationName: Output? = null,
    public val tags: Output>? = null,
    public val traceConfiguration: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apprunner.ObservabilityConfigurationArgs =
        com.pulumi.aws.apprunner.ObservabilityConfigurationArgs.builder()
            .observabilityConfigurationName(observabilityConfigurationName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .traceConfiguration(
                traceConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [ObservabilityConfigurationArgs].
 */
@PulumiTagMarker
public class ObservabilityConfigurationArgsBuilder internal constructor() {
    private var observabilityConfigurationName: Output? = null

    private var tags: Output>? = null

    private var traceConfiguration: Output? = null

    /**
     * @param value Name of the observability configuration.
     */
    @JvmName("glmtdounhmdardji")
    public suspend fun observabilityConfigurationName(`value`: Output) {
        this.observabilityConfigurationName = value
    }

    /**
     * @param value Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("xxhdwcgodgnfcihk")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing. See Trace Configuration below for more details.
     */
    @JvmName("vjccnvsoereeuwem")
    public suspend fun traceConfiguration(`value`: Output) {
        this.traceConfiguration = value
    }

    /**
     * @param value Name of the observability configuration.
     */
    @JvmName("vdbphxommnwqiwkb")
    public suspend fun observabilityConfigurationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.observabilityConfigurationName = mapped
    }

    /**
     * @param value Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("hkxnreudvihtyalk")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("pifppmwmixubodcr")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing. See Trace Configuration below for more details.
     */
    @JvmName("yyrdhccoyirxqshf")
    public suspend fun traceConfiguration(`value`: ObservabilityConfigurationTraceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.traceConfiguration = mapped
    }

    /**
     * @param argument Configuration of the tracing feature within this observability configuration. If you don't specify it, App Runner doesn't enable tracing. See Trace Configuration below for more details.
     */
    @JvmName("tlrrnhwvcewhqiqy")
    public suspend fun traceConfiguration(argument: suspend ObservabilityConfigurationTraceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ObservabilityConfigurationTraceConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.traceConfiguration = mapped
    }

    internal fun build(): ObservabilityConfigurationArgs = ObservabilityConfigurationArgs(
        observabilityConfigurationName = observabilityConfigurationName,
        tags = tags,
        traceConfiguration = traceConfiguration,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy