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

com.pulumi.aws.location.kotlin.GeofenceCollection.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.location.kotlin

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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map

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

    public var args: GeofenceCollectionArgs = GeofenceCollectionArgs()

    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 GeofenceCollectionArgsBuilder.() -> Unit) {
        val builder = GeofenceCollectionArgsBuilder()
        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(): GeofenceCollection {
        val builtJavaResource = com.pulumi.aws.location.GeofenceCollection(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return GeofenceCollection(builtJavaResource)
    }
}

/**
 * Resource for managing an AWS Location Geofence Collection.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.location.GeofenceCollection("example", {collectionName: "example"});
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.location.GeofenceCollection("example", collection_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.GeofenceCollection("example", new()
 *     {
 *         CollectionName = "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.NewGeofenceCollection(ctx, "example", &location.GeofenceCollectionArgs{
 * 			CollectionName: 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.GeofenceCollection;
 * import com.pulumi.aws.location.GeofenceCollectionArgs;
 * 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 GeofenceCollection("example", GeofenceCollectionArgs.builder()
 *             .collectionName("example")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:location:GeofenceCollection
 *     properties:
 *       collectionName: example
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Location Geofence Collection using the `collection_name`. For example:
 * ```sh
 * $ pulumi import aws:location/geofenceCollection:GeofenceCollection example example
 * ```
 */
public class GeofenceCollection internal constructor(
    override val javaResource: com.pulumi.aws.location.GeofenceCollection,
) : KotlinCustomResource(javaResource, GeofenceCollectionMapper) {
    /**
     * The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.
     */
    public val collectionArn: Output
        get() = javaResource.collectionArn().applyValue({ args0 -> args0 })

    /**
     * The name of the geofence collection.
     * The following arguments are optional:
     */
    public val collectionName: Output
        get() = javaResource.collectionName().applyValue({ args0 -> args0 })

    /**
     * The timestamp for when the geofence collection resource was created in ISO 8601 format.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

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

    /**
     * A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
     */
    public val kmsKeyId: Output?
        get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Key-value tags for the geofence collection. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    @Deprecated(
        message = """
  Please use `tags` instead.
  """,
    )
    public val tagsAll: Output>
        get() = javaResource.tagsAll().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object GeofenceCollectionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.aws.location.GeofenceCollection::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy