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

com.pulumi.awsnative.location.kotlin.PlaceIndex.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.location.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.location.kotlin.enums.PlaceIndexPricingPlan
import com.pulumi.awsnative.location.kotlin.outputs.PlaceIndexDataSourceConfiguration
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.location.kotlin.enums.PlaceIndexPricingPlan.Companion.toKotlin as placeIndexPricingPlanToKotlin
import com.pulumi.awsnative.location.kotlin.outputs.PlaceIndexDataSourceConfiguration.Companion.toKotlin as placeIndexDataSourceConfigurationToKotlin

/**
 * Builder for [PlaceIndex].
 */
@PulumiTagMarker
public class PlaceIndexResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: PlaceIndexArgs = PlaceIndexArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend PlaceIndexArgsBuilder.() -> Unit) {
        val builder = PlaceIndexArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): PlaceIndex {
        val builtJavaResource = com.pulumi.awsnative.location.PlaceIndex(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return PlaceIndex(builtJavaResource)
    }
}

/**
 * Definition of AWS::Location::PlaceIndex Resource Type
 */
public class PlaceIndex internal constructor(
    override val javaResource: com.pulumi.awsnative.location.PlaceIndex,
) : KotlinCustomResource(javaResource, PlaceIndexMapper) {
    /**
     * The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across AWS .
     * - Format example: `arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex`
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The timestamp for when the place index resource was created in [ISO 8601](https://docs.aws.amazon.com/https://www.iso.org/iso-8601-date-and-time-format.html) format: `YYYY-MM-DDThh:mm:ss.sssZ` .
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Specifies the geospatial data provider for the new place index.
     * > This field is case-sensitive. Enter the valid values as shown. For example, entering `HERE` returns an error.
     * Valid values include:
     * - `Esri` – For additional information about [Esri](https://docs.aws.amazon.com/location/latest/developerguide/esri.html) 's coverage in your region of interest, see [Esri details on geocoding coverage](https://docs.aws.amazon.com/https://developers.arcgis.com/rest/geocode/api-reference/geocode-coverage.htm) .
     * - `Grab` – Grab provides place index functionality for Southeast Asia. For additional information about [GrabMaps](https://docs.aws.amazon.com/location/latest/developerguide/grab.html) ' coverage, see [GrabMaps countries and areas covered](https://docs.aws.amazon.com/location/latest/developerguide/grab.html#grab-coverage-area) .
     * - `Here` – For additional information about [HERE Technologies](https://docs.aws.amazon.com/location/latest/developerguide/HERE.html) ' coverage in your region of interest, see [HERE details on goecoding coverage](https://docs.aws.amazon.com/https://developer.here.com/documentation/geocoder/dev_guide/topics/coverage-geocoder.html) .
     * > If you specify HERE Technologies ( `Here` ) as the data provider, you may not [store results](https://docs.aws.amazon.com//location-places/latest/APIReference/API_DataSourceConfiguration.html) for locations in Japan. For more information, see the [AWS Service Terms](https://docs.aws.amazon.com/service-terms/) for Amazon Location Service.
     * For additional information , see [Data providers](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html) on the *Amazon Location Service Developer Guide* .
     */
    public val dataSource: Output
        get() = javaResource.dataSource().applyValue({ args0 -> args0 })

    /**
     * Specifies the data storage option requesting Places.
     */
    public val dataSourceConfiguration: Output?
        get() = javaResource.dataSourceConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> placeIndexDataSourceConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The optional description for the place index resource.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Synonym for `Arn` . The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across AWS .
     * - Format example: `arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex`
     */
    public val indexArn: Output
        get() = javaResource.indexArn().applyValue({ args0 -> args0 })

    /**
     * The name of the place index resource.
     * Requirements:
     * - Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
     * - Must be a unique place index resource name.
     * - No spaces allowed. For example, `ExamplePlaceIndex` .
     */
    public val indexName: Output
        get() = javaResource.indexName().applyValue({ args0 -> args0 })

    /**
     * No longer used. If included, the only allowed value is `RequestBasedUsage` .
     * *Allowed Values* : `RequestBasedUsage`
     */
    public val pricingPlan: Output?
        get() = javaResource.pricingPlan().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    placeIndexPricingPlanToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The timestamp for when the place index resource was last updated in [ISO 8601](https://docs.aws.amazon.com/https://www.iso.org/iso-8601-date-and-time-format.html) format: `YYYY-MM-DDThh:mm:ss.sssZ` .
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object PlaceIndexMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.location.PlaceIndex::class == javaResource::class

    override fun map(javaResource: Resource): PlaceIndex = PlaceIndex(
        javaResource as
            com.pulumi.awsnative.location.PlaceIndex,
    )
}

/**
 * @see [PlaceIndex].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [PlaceIndex].
 */
public suspend fun placeIndex(name: String, block: suspend PlaceIndexResourceBuilder.() -> Unit): PlaceIndex {
    val builder = PlaceIndexResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [PlaceIndex].
 * @param name The _unique_ name of the resulting resource.
 */
public fun placeIndex(name: String): PlaceIndex {
    val builder = PlaceIndexResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy