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

com.pulumi.aws.evidently.kotlin.ProjectArgs.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.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.evidently.kotlin

import com.pulumi.aws.evidently.ProjectArgs.builder
import com.pulumi.aws.evidently.kotlin.inputs.ProjectDataDeliveryArgs
import com.pulumi.aws.evidently.kotlin.inputs.ProjectDataDeliveryArgsBuilder
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

/**
 * Provides a CloudWatch Evidently Project resource.
 * ## Example Usage
 * ### Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.evidently.Project("example", {
 *     name: "Example",
 *     description: "Example Description",
 *     tags: {
 *         Key1: "example Project",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.evidently.Project("example",
 *     name="Example",
 *     description="Example Description",
 *     tags={
 *         "Key1": "example Project",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Evidently.Project("example", new()
 *     {
 *         Name = "Example",
 *         Description = "Example Description",
 *         Tags =
 *         {
 *             { "Key1", "example Project" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
 * 			Name:        pulumi.String("Example"),
 * 			Description: pulumi.String("Example Description"),
 * 			Tags: pulumi.StringMap{
 * 				"Key1": pulumi.String("example Project"),
 * 			},
 * 		})
 * 		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.evidently.Project;
 * import com.pulumi.aws.evidently.ProjectArgs;
 * 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 Project("example", ProjectArgs.builder()
 *             .name("Example")
 *             .description("Example Description")
 *             .tags(Map.of("Key1", "example Project"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:evidently:Project
 *     properties:
 *       name: Example
 *       description: Example Description
 *       tags:
 *         Key1: example Project
 * ```
 * 
 * ### Store evaluation events in a CloudWatch Log Group
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.evidently.Project("example", {
 *     name: "Example",
 *     description: "Example Description",
 *     dataDelivery: {
 *         cloudwatchLogs: {
 *             logGroup: "example-log-group-name",
 *         },
 *     },
 *     tags: {
 *         Key1: "example Project",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.evidently.Project("example",
 *     name="Example",
 *     description="Example Description",
 *     data_delivery={
 *         "cloudwatch_logs": {
 *             "log_group": "example-log-group-name",
 *         },
 *     },
 *     tags={
 *         "Key1": "example Project",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Evidently.Project("example", new()
 *     {
 *         Name = "Example",
 *         Description = "Example Description",
 *         DataDelivery = new Aws.Evidently.Inputs.ProjectDataDeliveryArgs
 *         {
 *             CloudwatchLogs = new Aws.Evidently.Inputs.ProjectDataDeliveryCloudwatchLogsArgs
 *             {
 *                 LogGroup = "example-log-group-name",
 *             },
 *         },
 *         Tags =
 *         {
 *             { "Key1", "example Project" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
 * 			Name:        pulumi.String("Example"),
 * 			Description: pulumi.String("Example Description"),
 * 			DataDelivery: &evidently.ProjectDataDeliveryArgs{
 * 				CloudwatchLogs: &evidently.ProjectDataDeliveryCloudwatchLogsArgs{
 * 					LogGroup: pulumi.String("example-log-group-name"),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Key1": pulumi.String("example Project"),
 * 			},
 * 		})
 * 		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.evidently.Project;
 * import com.pulumi.aws.evidently.ProjectArgs;
 * import com.pulumi.aws.evidently.inputs.ProjectDataDeliveryArgs;
 * import com.pulumi.aws.evidently.inputs.ProjectDataDeliveryCloudwatchLogsArgs;
 * 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 Project("example", ProjectArgs.builder()
 *             .name("Example")
 *             .description("Example Description")
 *             .dataDelivery(ProjectDataDeliveryArgs.builder()
 *                 .cloudwatchLogs(ProjectDataDeliveryCloudwatchLogsArgs.builder()
 *                     .logGroup("example-log-group-name")
 *                     .build())
 *                 .build())
 *             .tags(Map.of("Key1", "example Project"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:evidently:Project
 *     properties:
 *       name: Example
 *       description: Example Description
 *       dataDelivery:
 *         cloudwatchLogs:
 *           logGroup: example-log-group-name
 *       tags:
 *         Key1: example Project
 * ```
 * 
 * ### Store evaluation events in an S3 bucket
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.evidently.Project("example", {
 *     name: "Example",
 *     description: "Example Description",
 *     dataDelivery: {
 *         s3Destination: {
 *             bucket: "example-bucket-name",
 *             prefix: "example",
 *         },
 *     },
 *     tags: {
 *         Key1: "example Project",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.evidently.Project("example",
 *     name="Example",
 *     description="Example Description",
 *     data_delivery={
 *         "s3_destination": {
 *             "bucket": "example-bucket-name",
 *             "prefix": "example",
 *         },
 *     },
 *     tags={
 *         "Key1": "example Project",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Evidently.Project("example", new()
 *     {
 *         Name = "Example",
 *         Description = "Example Description",
 *         DataDelivery = new Aws.Evidently.Inputs.ProjectDataDeliveryArgs
 *         {
 *             S3Destination = new Aws.Evidently.Inputs.ProjectDataDeliveryS3DestinationArgs
 *             {
 *                 Bucket = "example-bucket-name",
 *                 Prefix = "example",
 *             },
 *         },
 *         Tags =
 *         {
 *             { "Key1", "example Project" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
 * 			Name:        pulumi.String("Example"),
 * 			Description: pulumi.String("Example Description"),
 * 			DataDelivery: &evidently.ProjectDataDeliveryArgs{
 * 				S3Destination: &evidently.ProjectDataDeliveryS3DestinationArgs{
 * 					Bucket: pulumi.String("example-bucket-name"),
 * 					Prefix: pulumi.String("example"),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Key1": pulumi.String("example Project"),
 * 			},
 * 		})
 * 		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.evidently.Project;
 * import com.pulumi.aws.evidently.ProjectArgs;
 * import com.pulumi.aws.evidently.inputs.ProjectDataDeliveryArgs;
 * import com.pulumi.aws.evidently.inputs.ProjectDataDeliveryS3DestinationArgs;
 * 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 Project("example", ProjectArgs.builder()
 *             .name("Example")
 *             .description("Example Description")
 *             .dataDelivery(ProjectDataDeliveryArgs.builder()
 *                 .s3Destination(ProjectDataDeliveryS3DestinationArgs.builder()
 *                     .bucket("example-bucket-name")
 *                     .prefix("example")
 *                     .build())
 *                 .build())
 *             .tags(Map.of("Key1", "example Project"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:evidently:Project
 *     properties:
 *       name: Example
 *       description: Example Description
 *       dataDelivery:
 *         s3Destination:
 *           bucket: example-bucket-name
 *           prefix: example
 *       tags:
 *         Key1: example Project
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import CloudWatch Evidently Project using the `arn`. For example:
 * ```sh
 * $ pulumi import aws:evidently/project:Project example arn:aws:evidently:us-east-1:123456789012:segment/example
 * ```
 * @property dataDelivery A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
 * @property description Specifies the description of the project.
 * @property name A name for the project.
 * @property tags Tags to apply to the project. 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 ProjectArgs(
    public val dataDelivery: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.evidently.ProjectArgs =
        com.pulumi.aws.evidently.ProjectArgs.builder()
            .dataDelivery(dataDelivery?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ProjectArgs].
 */
@PulumiTagMarker
public class ProjectArgsBuilder internal constructor() {
    private var dataDelivery: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
     */
    @JvmName("kcikqjygieqdthnc")
    public suspend fun dataDelivery(`value`: Output) {
        this.dataDelivery = value
    }

    /**
     * @param value Specifies the description of the project.
     */
    @JvmName("ydxoogckikcqybyb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A name for the project.
     */
    @JvmName("cjeefjiagumydgww")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
     */
    @JvmName("tpvwjdhxsowcuegf")
    public suspend fun dataDelivery(`value`: ProjectDataDeliveryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDelivery = mapped
    }

    /**
     * @param argument A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
     */
    @JvmName("ltlhbcdxxdxdvhvq")
    public suspend fun dataDelivery(argument: suspend ProjectDataDeliveryArgsBuilder.() -> Unit) {
        val toBeMapped = ProjectDataDeliveryArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataDelivery = mapped
    }

    /**
     * @param value Specifies the description of the project.
     */
    @JvmName("oqjqrciesefekqfx")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A name for the project.
     */
    @JvmName("lnqihvvhjqptmcoy")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

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

    internal fun build(): ProjectArgs = ProjectArgs(
        dataDelivery = dataDelivery,
        description = description,
        name = name,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy