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

com.pulumi.azurenative.operationalinsights.kotlin.TableArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.operationalinsights.kotlin

import com.pulumi.azurenative.operationalinsights.TableArgs.builder
import com.pulumi.azurenative.operationalinsights.kotlin.enums.TablePlanEnum
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.RestoredLogsArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.RestoredLogsArgsBuilder
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.SchemaArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.SchemaArgsBuilder
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.SearchResultsArgs
import com.pulumi.azurenative.operationalinsights.kotlin.inputs.SearchResultsArgsBuilder
import com.pulumi.core.Either
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Workspace data table definition.
 * Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2021-12-01-preview.
 * ## Example Usage
 * ### TablesUpsert
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var table = new AzureNative.OperationalInsights.Table("table", new()
 *     {
 *         ResourceGroupName = "oiautorest6685",
 *         RetentionInDays = 45,
 *         Schema = new AzureNative.OperationalInsights.Inputs.SchemaArgs
 *         {
 *             Columns = new[]
 *             {
 *                 new AzureNative.OperationalInsights.Inputs.ColumnArgs
 *                 {
 *                     Name = "MyNewColumn",
 *                     Type = AzureNative.OperationalInsights.ColumnTypeEnum.Guid,
 *                 },
 *             },
 *             Name = "AzureNetworkFlow",
 *         },
 *         TableName = "AzureNetworkFlow",
 *         TotalRetentionInDays = 70,
 *         WorkspaceName = "oiautorest6685",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := operationalinsights.NewTable(ctx, "table", &operationalinsights.TableArgs{
 * 			ResourceGroupName: pulumi.String("oiautorest6685"),
 * 			RetentionInDays:   pulumi.Int(45),
 * 			Schema: &operationalinsights.SchemaArgs{
 * 				Columns: operationalinsights.ColumnArray{
 * 					&operationalinsights.ColumnArgs{
 * 						Name: pulumi.String("MyNewColumn"),
 * 						Type: pulumi.String(operationalinsights.ColumnTypeEnumGuid),
 * 					},
 * 				},
 * 				Name: pulumi.String("AzureNetworkFlow"),
 * 			},
 * 			TableName:            pulumi.String("AzureNetworkFlow"),
 * 			TotalRetentionInDays: pulumi.Int(70),
 * 			WorkspaceName:        pulumi.String("oiautorest6685"),
 * 		})
 * 		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.azurenative.operationalinsights.Table;
 * import com.pulumi.azurenative.operationalinsights.TableArgs;
 * import com.pulumi.azurenative.operationalinsights.inputs.SchemaArgs;
 * 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 table = new Table("table", TableArgs.builder()
 *             .resourceGroupName("oiautorest6685")
 *             .retentionInDays(45)
 *             .schema(SchemaArgs.builder()
 *                 .columns(ColumnArgs.builder()
 *                     .name("MyNewColumn")
 *                     .type("guid")
 *                     .build())
 *                 .name("AzureNetworkFlow")
 *                 .build())
 *             .tableName("AzureNetworkFlow")
 *             .totalRetentionInDays(70)
 *             .workspaceName("oiautorest6685")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:operationalinsights:Table AzureNetworkFlow /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}
 * ```
 * @property plan Instruct the system how to handle and charge the logs ingested to this table.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property restoredLogs Parameters of the restore operation that initiated this table.
 * @property retentionInDays The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention.
 * @property schema Table schema.
 * @property searchResults Parameters of the search job that initiated this table.
 * @property tableName The name of the table.
 * @property totalRetentionInDays The table total retention in days, between 4 and 4383. Setting this property to -1 will default to table retention.
 * @property workspaceName The name of the workspace.
 */
public data class TableArgs(
    public val plan: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val restoredLogs: Output? = null,
    public val retentionInDays: Output? = null,
    public val schema: Output? = null,
    public val searchResults: Output? = null,
    public val tableName: Output? = null,
    public val totalRetentionInDays: Output? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.operationalinsights.TableArgs =
        com.pulumi.azurenative.operationalinsights.TableArgs.builder()
            .plan(
                plan?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .restoredLogs(restoredLogs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .retentionInDays(retentionInDays?.applyValue({ args0 -> args0 }))
            .schema(schema?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .searchResults(searchResults?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tableName(tableName?.applyValue({ args0 -> args0 }))
            .totalRetentionInDays(totalRetentionInDays?.applyValue({ args0 -> args0 }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TableArgs].
 */
@PulumiTagMarker
public class TableArgsBuilder internal constructor() {
    private var plan: Output>? = null

    private var resourceGroupName: Output? = null

    private var restoredLogs: Output? = null

    private var retentionInDays: Output? = null

    private var schema: Output? = null

    private var searchResults: Output? = null

    private var tableName: Output? = null

    private var totalRetentionInDays: Output? = null

    private var workspaceName: Output? = null

    /**
     * @param value Instruct the system how to handle and charge the logs ingested to this table.
     */
    @JvmName("exissauuotpsfhwl")
    public suspend fun plan(`value`: Output>) {
        this.plan = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("duhqvspvlalafopf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Parameters of the restore operation that initiated this table.
     */
    @JvmName("yssofglyhjauctou")
    public suspend fun restoredLogs(`value`: Output) {
        this.restoredLogs = value
    }

    /**
     * @param value The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention.
     */
    @JvmName("xuajiebmogrliahv")
    public suspend fun retentionInDays(`value`: Output) {
        this.retentionInDays = value
    }

    /**
     * @param value Table schema.
     */
    @JvmName("udctpvpumscqrugm")
    public suspend fun schema(`value`: Output) {
        this.schema = value
    }

    /**
     * @param value Parameters of the search job that initiated this table.
     */
    @JvmName("bixgmfcapirnrkdt")
    public suspend fun searchResults(`value`: Output) {
        this.searchResults = value
    }

    /**
     * @param value The name of the table.
     */
    @JvmName("diabedrjcrtcldkh")
    public suspend fun tableName(`value`: Output) {
        this.tableName = value
    }

    /**
     * @param value The table total retention in days, between 4 and 4383. Setting this property to -1 will default to table retention.
     */
    @JvmName("iugkvgfpkpqoivid")
    public suspend fun totalRetentionInDays(`value`: Output) {
        this.totalRetentionInDays = value
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("harlexdlaagirdxi")
    public suspend fun workspaceName(`value`: Output) {
        this.workspaceName = value
    }

    /**
     * @param value Instruct the system how to handle and charge the logs ingested to this table.
     */
    @JvmName("mhliufmwubakojqc")
    public suspend fun plan(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.plan = mapped
    }

    /**
     * @param value Instruct the system how to handle and charge the logs ingested to this table.
     */
    @JvmName("gxjiwljuduvilrda")
    public fun plan(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.plan = mapped
    }

    /**
     * @param value Instruct the system how to handle and charge the logs ingested to this table.
     */
    @JvmName("siadjvgrsxtexerf")
    public fun plan(`value`: TablePlanEnum) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.plan = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("wmnsaaifolaqyvfe")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Parameters of the restore operation that initiated this table.
     */
    @JvmName("brpbqymilhvfucju")
    public suspend fun restoredLogs(`value`: RestoredLogsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restoredLogs = mapped
    }

    /**
     * @param argument Parameters of the restore operation that initiated this table.
     */
    @JvmName("hdcowurgxlwgwrhb")
    public suspend fun restoredLogs(argument: suspend RestoredLogsArgsBuilder.() -> Unit) {
        val toBeMapped = RestoredLogsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.restoredLogs = mapped
    }

    /**
     * @param value The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention.
     */
    @JvmName("hapkntjqmipbggiq")
    public suspend fun retentionInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionInDays = mapped
    }

    /**
     * @param value Table schema.
     */
    @JvmName("iylprofuyabvgaxo")
    public suspend fun schema(`value`: SchemaArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schema = mapped
    }

    /**
     * @param argument Table schema.
     */
    @JvmName("eqprbddgxseutpty")
    public suspend fun schema(argument: suspend SchemaArgsBuilder.() -> Unit) {
        val toBeMapped = SchemaArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schema = mapped
    }

    /**
     * @param value Parameters of the search job that initiated this table.
     */
    @JvmName("lijayhahtwwrxcva")
    public suspend fun searchResults(`value`: SearchResultsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.searchResults = mapped
    }

    /**
     * @param argument Parameters of the search job that initiated this table.
     */
    @JvmName("voxeexpftamxpjsp")
    public suspend fun searchResults(argument: suspend SearchResultsArgsBuilder.() -> Unit) {
        val toBeMapped = SearchResultsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.searchResults = mapped
    }

    /**
     * @param value The name of the table.
     */
    @JvmName("lecbdioaheqsaguy")
    public suspend fun tableName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tableName = mapped
    }

    /**
     * @param value The table total retention in days, between 4 and 4383. Setting this property to -1 will default to table retention.
     */
    @JvmName("ipvfjsoubdcmynfn")
    public suspend fun totalRetentionInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.totalRetentionInDays = mapped
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("yvxgduohhqbntlto")
    public suspend fun workspaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceName = mapped
    }

    internal fun build(): TableArgs = TableArgs(
        plan = plan,
        resourceGroupName = resourceGroupName,
        restoredLogs = restoredLogs,
        retentionInDays = retentionInDays,
        schema = schema,
        searchResults = searchResults,
        tableName = tableName,
        totalRetentionInDays = totalRetentionInDays,
        workspaceName = workspaceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy