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

com.pulumi.aws.location.kotlin.PlaceIndexArgs.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.location.kotlin

import com.pulumi.aws.location.PlaceIndexArgs.builder
import com.pulumi.aws.location.kotlin.inputs.PlaceIndexDataSourceConfigurationArgs
import com.pulumi.aws.location.kotlin.inputs.PlaceIndexDataSourceConfigurationArgsBuilder
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 Location Service Place Index.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.location.PlaceIndex("example", {
 *     dataSource: "Here",
 *     indexName: "example",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.location.PlaceIndex("example",
 *     data_source="Here",
 *     index_name="example")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Location.PlaceIndex("example", new()
 *     {
 *         DataSource = "Here",
 *         IndexName = "example",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/location"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := location.NewPlaceIndex(ctx, "example", &location.PlaceIndexArgs{
 * 			DataSource: pulumi.String("Here"),
 * 			IndexName:  pulumi.String("example"),
 * 		})
 * 		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.location.PlaceIndex;
 * import com.pulumi.aws.location.PlaceIndexArgs;
 * 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 PlaceIndex("example", PlaceIndexArgs.builder()
 *             .dataSource("Here")
 *             .indexName("example")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:location:PlaceIndex
 *     properties:
 *       dataSource: Here
 *       indexName: example
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import `aws_location_place_index` resources using the place index name. For example:
 * ```sh
 * $ pulumi import aws:location/placeIndex:PlaceIndex example example
 * ```
 * @property dataSource Specifies the geospatial data provider for the new place index.
 * @property dataSourceConfiguration Configuration block with the data storage option chosen for requesting Places. Detailed below.
 * @property description The optional description for the place index resource.
 * @property indexName The name of the place index resource.
 * The following arguments are optional:
 * @property tags Key-value tags for the place index. 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 PlaceIndexArgs(
    public val dataSource: Output? = null,
    public val dataSourceConfiguration: Output? = null,
    public val description: Output? = null,
    public val indexName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.location.PlaceIndexArgs =
        com.pulumi.aws.location.PlaceIndexArgs.builder()
            .dataSource(dataSource?.applyValue({ args0 -> args0 }))
            .dataSourceConfiguration(
                dataSourceConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .indexName(indexName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [PlaceIndexArgs].
 */
@PulumiTagMarker
public class PlaceIndexArgsBuilder internal constructor() {
    private var dataSource: Output? = null

    private var dataSourceConfiguration: Output? = null

    private var description: Output? = null

    private var indexName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the geospatial data provider for the new place index.
     */
    @JvmName("vngwpjgycpdsdpdt")
    public suspend fun dataSource(`value`: Output) {
        this.dataSource = value
    }

    /**
     * @param value Configuration block with the data storage option chosen for requesting Places. Detailed below.
     */
    @JvmName("gowsnrlxbhortasv")
    public suspend fun dataSourceConfiguration(`value`: Output) {
        this.dataSourceConfiguration = value
    }

    /**
     * @param value The optional description for the place index resource.
     */
    @JvmName("xoyhxswroijvsddm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the place index resource.
     * The following arguments are optional:
     */
    @JvmName("cgvcbaxdmkpuetxl")
    public suspend fun indexName(`value`: Output) {
        this.indexName = value
    }

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

    /**
     * @param value Specifies the geospatial data provider for the new place index.
     */
    @JvmName("lludwnfpsyxheahh")
    public suspend fun dataSource(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSource = mapped
    }

    /**
     * @param value Configuration block with the data storage option chosen for requesting Places. Detailed below.
     */
    @JvmName("cumqirawuuhnrlvo")
    public suspend fun dataSourceConfiguration(`value`: PlaceIndexDataSourceConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSourceConfiguration = mapped
    }

    /**
     * @param argument Configuration block with the data storage option chosen for requesting Places. Detailed below.
     */
    @JvmName("njbchghdmfbvtghf")
    public suspend fun dataSourceConfiguration(argument: suspend PlaceIndexDataSourceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = PlaceIndexDataSourceConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.dataSourceConfiguration = mapped
    }

    /**
     * @param value The optional description for the place index resource.
     */
    @JvmName("iccvvxdftovflwfi")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the place index resource.
     * The following arguments are optional:
     */
    @JvmName("hqpyyvndehpdwplv")
    public suspend fun indexName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.indexName = mapped
    }

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

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

    internal fun build(): PlaceIndexArgs = PlaceIndexArgs(
        dataSource = dataSource,
        dataSourceConfiguration = dataSourceConfiguration,
        description = description,
        indexName = indexName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy