Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.iot.kotlin.TimeSeriesInsightsGen2Environment.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.iot.kotlin
import com.pulumi.azure.iot.kotlin.outputs.TimeSeriesInsightsGen2EnvironmentStorage
import com.pulumi.azure.iot.kotlin.outputs.TimeSeriesInsightsGen2EnvironmentStorage.Companion.toKotlin
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 kotlin.collections.Map
/**
* Builder for [TimeSeriesInsightsGen2Environment].
*/
@PulumiTagMarker
public class TimeSeriesInsightsGen2EnvironmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: TimeSeriesInsightsGen2EnvironmentArgs = TimeSeriesInsightsGen2EnvironmentArgs()
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 TimeSeriesInsightsGen2EnvironmentArgsBuilder.() -> Unit) {
val builder = TimeSeriesInsightsGen2EnvironmentArgsBuilder()
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(): TimeSeriesInsightsGen2Environment {
val builtJavaResource =
com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TimeSeriesInsightsGen2Environment(builtJavaResource)
}
}
/**
* Manages an Azure IoT Time Series Insights Gen2 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 storage = new azure.storage.Account("storage", {
* name: "example",
* location: example.location,
* resourceGroupName: example.name,
* accountTier: "Standard",
* accountReplicationType: "LRS",
* });
* const exampleTimeSeriesInsightsGen2Environment = new azure.iot.TimeSeriesInsightsGen2Environment("example", {
* name: "example",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "L1",
* warmStoreDataRetentionTime: "P30D",
* idProperties: ["id"],
* storage: {
* name: storage.name,
* key: storage.primaryAccessKey,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* storage = azure.storage.Account("storage",
* name="example",
* location=example.location,
* resource_group_name=example.name,
* account_tier="Standard",
* account_replication_type="LRS")
* example_time_series_insights_gen2_environment = azure.iot.TimeSeriesInsightsGen2Environment("example",
* name="example",
* location=example.location,
* resource_group_name=example.name,
* sku_name="L1",
* warm_store_data_retention_time="P30D",
* id_properties=["id"],
* storage={
* "name": storage.name,
* "key": storage.primary_access_key,
* })
* ```
* ```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 storage = new Azure.Storage.Account("storage", new()
* {
* Name = "example",
* Location = example.Location,
* ResourceGroupName = example.Name,
* AccountTier = "Standard",
* AccountReplicationType = "LRS",
* });
* var exampleTimeSeriesInsightsGen2Environment = new Azure.Iot.TimeSeriesInsightsGen2Environment("example", new()
* {
* Name = "example",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "L1",
* WarmStoreDataRetentionTime = "P30D",
* IdProperties = new[]
* {
* "id",
* },
* Storage = new Azure.Iot.Inputs.TimeSeriesInsightsGen2EnvironmentStorageArgs
* {
* Name = storage.Name,
* Key = storage.PrimaryAccessKey,
* },
* });
* });
* ```
* ```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-azure/sdk/v5/go/azure/storage"
* "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
* }
* storage, err := storage.NewAccount(ctx, "storage", &storage.AccountArgs{
* Name: pulumi.String("example"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* AccountTier: pulumi.String("Standard"),
* AccountReplicationType: pulumi.String("LRS"),
* })
* if err != nil {
* return err
* }
* _, err = iot.NewTimeSeriesInsightsGen2Environment(ctx, "example", &iot.TimeSeriesInsightsGen2EnvironmentArgs{
* Name: pulumi.String("example"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("L1"),
* WarmStoreDataRetentionTime: pulumi.String("P30D"),
* IdProperties: pulumi.StringArray{
* pulumi.String("id"),
* },
* Storage: &iot.TimeSeriesInsightsGen2EnvironmentStorageArgs{
* Name: storage.Name,
* Key: storage.PrimaryAccessKey,
* },
* })
* 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.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment;
* import com.pulumi.azure.iot.TimeSeriesInsightsGen2EnvironmentArgs;
* import com.pulumi.azure.iot.inputs.TimeSeriesInsightsGen2EnvironmentStorageArgs;
* 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 storage = new Account("storage", AccountArgs.builder()
* .name("example")
* .location(example.location())
* .resourceGroupName(example.name())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .build());
* var exampleTimeSeriesInsightsGen2Environment = new TimeSeriesInsightsGen2Environment("exampleTimeSeriesInsightsGen2Environment", TimeSeriesInsightsGen2EnvironmentArgs.builder()
* .name("example")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("L1")
* .warmStoreDataRetentionTime("P30D")
* .idProperties("id")
* .storage(TimeSeriesInsightsGen2EnvironmentStorageArgs.builder()
* .name(storage.name())
* .key(storage.primaryAccessKey())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* storage:
* type: azure:storage:Account
* properties:
* name: example
* location: ${example.location}
* resourceGroupName: ${example.name}
* accountTier: Standard
* accountReplicationType: LRS
* exampleTimeSeriesInsightsGen2Environment:
* type: azure:iot:TimeSeriesInsightsGen2Environment
* name: example
* properties:
* name: example
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: L1
* warmStoreDataRetentionTime: P30D
* idProperties:
* - id
* storage:
* name: ${storage.name}
* key: ${storage.primaryAccessKey}
* ```
*
* ## Import
* Azure IoT Time Series Insights Gen2 Environment can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:iot/timeSeriesInsightsGen2Environment:TimeSeriesInsightsGen2Environment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/example
* ```
*/
public class TimeSeriesInsightsGen2Environment internal constructor(
override val javaResource: com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment,
) : KotlinCustomResource(javaResource, TimeSeriesInsightsGen2EnvironmentMapper) {
/**
* The FQDN used to access the environment data.
*/
public val dataAccessFqdn: Output
get() = javaResource.dataAccessFqdn().applyValue({ args0 -> args0 })
/**
* A list of property ids for the Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created.
*/
public val idProperties: Output>
get() = javaResource.idProperties().applyValue({ args0 -> args0.map({ 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 Gen2 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 resource group in which to create the Azure IoT Time Series Insights Gen2 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 Gen2 Environment. Currently it supports only `L1`. For gen2, capacity cannot be specified. Changing this forces a new resource to be created.
*/
public val skuName: Output
get() = javaResource.skuName().applyValue({ args0 -> args0 })
/**
* A `storage` block as defined below.
*/
public val storage: Output
get() = javaResource.storage().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* 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)
})
/**
* Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query.
*/
public val warmStoreDataRetentionTime: Output?
get() = javaResource.warmStoreDataRetentionTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object TimeSeriesInsightsGen2EnvironmentMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment::class == javaResource::class
override fun map(javaResource: Resource): TimeSeriesInsightsGen2Environment =
TimeSeriesInsightsGen2Environment(
javaResource as
com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment,
)
}
/**
* @see [TimeSeriesInsightsGen2Environment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TimeSeriesInsightsGen2Environment].
*/
public suspend fun timeSeriesInsightsGen2Environment(
name: String,
block: suspend TimeSeriesInsightsGen2EnvironmentResourceBuilder.() -> Unit,
): TimeSeriesInsightsGen2Environment {
val builder = TimeSeriesInsightsGen2EnvironmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TimeSeriesInsightsGen2Environment].
* @param name The _unique_ name of the resulting resource.
*/
public fun timeSeriesInsightsGen2Environment(name: String): TimeSeriesInsightsGen2Environment {
val builder = TimeSeriesInsightsGen2EnvironmentResourceBuilder()
builder.name(name)
return builder.build()
}