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

com.pulumi.aws.rum.kotlin.AppMonitorArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.rum.kotlin

import com.pulumi.aws.rum.AppMonitorArgs.builder
import com.pulumi.aws.rum.kotlin.inputs.AppMonitorAppMonitorConfigurationArgs
import com.pulumi.aws.rum.kotlin.inputs.AppMonitorAppMonitorConfigurationArgsBuilder
import com.pulumi.aws.rum.kotlin.inputs.AppMonitorCustomEventsArgs
import com.pulumi.aws.rum.kotlin.inputs.AppMonitorCustomEventsArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a CloudWatch RUM App Monitor resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.rum.AppMonitor("example", {
 *     name: "example",
 *     domain: "localhost",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.rum.AppMonitor("example",
 *     name="example",
 *     domain="localhost")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Rum.AppMonitor("example", new()
 *     {
 *         Name = "example",
 *         Domain = "localhost",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rum"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := rum.NewAppMonitor(ctx, "example", &rum.AppMonitorArgs{
 * 			Name:   pulumi.String("example"),
 * 			Domain: pulumi.String("localhost"),
 * 		})
 * 		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.rum.AppMonitor;
 * import com.pulumi.aws.rum.AppMonitorArgs;
 * 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 AppMonitor("example", AppMonitorArgs.builder()
 *             .name("example")
 *             .domain("localhost")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:rum:AppMonitor
 *     properties:
 *       name: example
 *       domain: localhost
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Cloudwatch RUM App Monitor using the `name`. For example:
 * ```sh
 * $ pulumi import aws:rum/appMonitor:AppMonitor example example
 * ```
 * @property appMonitorConfiguration configuration data for the app monitor. See app_monitor_configuration below.
 * @property customEvents Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are `DISABLED`. See custom_events below.
 * @property cwLogEnabled Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter  specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges. Default value is `false`.
 * @property domain The top-level internet domain name for which your application has administrative authority.
 * @property name The name of the log stream.
 * @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class AppMonitorArgs(
    public val appMonitorConfiguration: Output? = null,
    public val customEvents: Output? = null,
    public val cwLogEnabled: Output? = null,
    public val domain: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.rum.AppMonitorArgs =
        com.pulumi.aws.rum.AppMonitorArgs.builder()
            .appMonitorConfiguration(
                appMonitorConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .customEvents(customEvents?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .cwLogEnabled(cwLogEnabled?.applyValue({ args0 -> args0 }))
            .domain(domain?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AppMonitorArgs].
 */
@PulumiTagMarker
public class AppMonitorArgsBuilder internal constructor() {
    private var appMonitorConfiguration: Output? = null

    private var customEvents: Output? = null

    private var cwLogEnabled: Output? = null

    private var domain: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value configuration data for the app monitor. See app_monitor_configuration below.
     */
    @JvmName("mttlsuybvmulessp")
    public suspend fun appMonitorConfiguration(`value`: Output) {
        this.appMonitorConfiguration = value
    }

    /**
     * @param value Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are `DISABLED`. See custom_events below.
     */
    @JvmName("rpscmliruylwxlmb")
    public suspend fun customEvents(`value`: Output) {
        this.customEvents = value
    }

    /**
     * @param value Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter  specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges. Default value is `false`.
     */
    @JvmName("aibnfgnnwgupfpoe")
    public suspend fun cwLogEnabled(`value`: Output) {
        this.cwLogEnabled = value
    }

    /**
     * @param value The top-level internet domain name for which your application has administrative authority.
     */
    @JvmName("psmlfrhnljftwivg")
    public suspend fun domain(`value`: Output) {
        this.domain = value
    }

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

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

    /**
     * @param value configuration data for the app monitor. See app_monitor_configuration below.
     */
    @JvmName("usrrvekrwjcxjwdd")
    public suspend fun appMonitorConfiguration(`value`: AppMonitorAppMonitorConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appMonitorConfiguration = mapped
    }

    /**
     * @param argument configuration data for the app monitor. See app_monitor_configuration below.
     */
    @JvmName("dyqipbewoxspbmuu")
    public suspend fun appMonitorConfiguration(argument: suspend AppMonitorAppMonitorConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = AppMonitorAppMonitorConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.appMonitorConfiguration = mapped
    }

    /**
     * @param value Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are `DISABLED`. See custom_events below.
     */
    @JvmName("dmtfvkjvtlqntcmc")
    public suspend fun customEvents(`value`: AppMonitorCustomEventsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customEvents = mapped
    }

    /**
     * @param argument Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are `DISABLED`. See custom_events below.
     */
    @JvmName("xbqhaydqsiyqdopw")
    public suspend fun customEvents(argument: suspend AppMonitorCustomEventsArgsBuilder.() -> Unit) {
        val toBeMapped = AppMonitorCustomEventsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customEvents = mapped
    }

    /**
     * @param value Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter  specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges. Default value is `false`.
     */
    @JvmName("jfxisxlndvphtwvm")
    public suspend fun cwLogEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cwLogEnabled = mapped
    }

    /**
     * @param value The top-level internet domain name for which your application has administrative authority.
     */
    @JvmName("bbtfggjudfwopuul")
    public suspend fun domain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domain = mapped
    }

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

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

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

    internal fun build(): AppMonitorArgs = AppMonitorArgs(
        appMonitorConfiguration = appMonitorConfiguration,
        customEvents = customEvents,
        cwLogEnabled = cwLogEnabled,
        domain = domain,
        name = name,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy