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

com.pulumi.azure.iot.kotlin.TimeSeriesInsightsStandardEnvironment.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.iot.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map

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

    public var args: TimeSeriesInsightsStandardEnvironmentArgs =
        TimeSeriesInsightsStandardEnvironmentArgs()

    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 TimeSeriesInsightsStandardEnvironmentArgsBuilder.() -> Unit) {
        val builder = TimeSeriesInsightsStandardEnvironmentArgsBuilder()
        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(): TimeSeriesInsightsStandardEnvironment {
        val builtJavaResource =
            com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironment(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return TimeSeriesInsightsStandardEnvironment(builtJavaResource)
    }
}

/**
 * Manages an Azure IoT Time Series Insights Standard Environment.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleTimeSeriesInsightsStandardEnvironment = new azure.iot.TimeSeriesInsightsStandardEnvironment("example", {
 *     name: "example",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "S1_1",
 *     dataRetentionTime: "P30D",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_time_series_insights_standard_environment = azure.iot.TimeSeriesInsightsStandardEnvironment("example",
 *     name="example",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="S1_1",
 *     data_retention_time="P30D")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleTimeSeriesInsightsStandardEnvironment = new Azure.Iot.TimeSeriesInsightsStandardEnvironment("example", new()
 *     {
 *         Name = "example",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "S1_1",
 *         DataRetentionTime = "P30D",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = iot.NewTimeSeriesInsightsStandardEnvironment(ctx, "example", &iot.TimeSeriesInsightsStandardEnvironmentArgs{
 * 			Name:              pulumi.String("example"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("S1_1"),
 * 			DataRetentionTime: pulumi.String("P30D"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironment;
 * import com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironmentArgs;
 * 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 ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleTimeSeriesInsightsStandardEnvironment = new TimeSeriesInsightsStandardEnvironment("exampleTimeSeriesInsightsStandardEnvironment", TimeSeriesInsightsStandardEnvironmentArgs.builder()
 *             .name("example")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("S1_1")
 *             .dataRetentionTime("P30D")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleTimeSeriesInsightsStandardEnvironment:
 *     type: azure:iot:TimeSeriesInsightsStandardEnvironment
 *     name: example
 *     properties:
 *       name: example
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: S1_1
 *       dataRetentionTime: P30D
 * ```
 * 
 * ## Import
 * Azure IoT Time Series Insights Standard Environment can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:iot/timeSeriesInsightsStandardEnvironment:TimeSeriesInsightsStandardEnvironment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/example
 * ```
 */
public class TimeSeriesInsightsStandardEnvironment internal constructor(
    override val javaResource: com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironment,
) : KotlinCustomResource(javaResource, TimeSeriesInsightsStandardEnvironmentMapper) {
    /**
     * Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. Changing this forces a new resource to be created.
     */
    public val dataRetentionTime: Output
        get() = javaResource.dataRetentionTime().applyValue({ args0 -> args0 })

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Specifies the name of the Azure IoT Time Series Insights Standard Environment. Changing this forces a new resource to be created. Must be globally unique.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The name of the event property which will be used to partition data. Changing this forces a new resource to be created.
     */
    public val partitionKey: Output?
        get() = javaResource.partitionKey().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the resource group in which to create the Azure IoT Time Series Insights Standard Environment. Changing this forces a new resource to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * Specifies the SKU Name for this IoT Time Series Insights Standard Environment. It is string consisting of two parts separated by an underscore(\_).The first part is the `name`, valid values include: `S1` and `S2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `S1_1`). Possible values are `S1_1`, `S1_2`, `S1_3`, `S1_4`, `S1_5`, `S1_6`, `S1_7`, `S1_8`, `S1_9`, `S1_10`, `S2_1`, `S2_2`, `S2_3`, `S2_4`, `S2_5`, `S2_6`, `S2_7`, `S2_8`, `S2_9` and `S2_10`. Changing this forces a new resource to be created.
     */
    public val skuName: Output
        get() = javaResource.skuName().applyValue({ args0 -> args0 })

    /**
     * Specifies the behaviour the IoT Time Series Insights service should take when the environment's capacity has been exceeded. Valid values include `PauseIngress` and `PurgeOldData`. Defaults to `PurgeOldData`.
     */
    public val storageLimitExceededBehavior: Output?
        get() = javaResource.storageLimitExceededBehavior().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A mapping of tags to assign to the resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })
}

public object TimeSeriesInsightsStandardEnvironmentMapper :
    ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironment::class == javaResource::class

    override fun map(javaResource: Resource): TimeSeriesInsightsStandardEnvironment =
        TimeSeriesInsightsStandardEnvironment(
            javaResource as
                com.pulumi.azure.iot.TimeSeriesInsightsStandardEnvironment,
        )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy