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

com.pulumi.aws.glue.kotlin.CatalogTableOptimizerArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.glue.kotlin

import com.pulumi.aws.glue.CatalogTableOptimizerArgs.builder
import com.pulumi.aws.glue.kotlin.inputs.CatalogTableOptimizerConfigurationArgs
import com.pulumi.aws.glue.kotlin.inputs.CatalogTableOptimizerConfigurationArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS Glue Catalog Table Optimizer.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.glue.CatalogTableOptimizer("example", {
 *     catalogId: "123456789012",
 *     databaseName: "example_database",
 *     tableName: "example_table",
 *     configuration: {
 *         roleArn: "arn:aws:iam::123456789012:role/example-role",
 *         enabled: true,
 *     },
 *     type: "compaction",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.glue.CatalogTableOptimizer("example",
 *     catalog_id="123456789012",
 *     database_name="example_database",
 *     table_name="example_table",
 *     configuration={
 *         "role_arn": "arn:aws:iam::123456789012:role/example-role",
 *         "enabled": True,
 *     },
 *     type="compaction")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Glue.CatalogTableOptimizer("example", new()
 *     {
 *         CatalogId = "123456789012",
 *         DatabaseName = "example_database",
 *         TableName = "example_table",
 *         Configuration = new Aws.Glue.Inputs.CatalogTableOptimizerConfigurationArgs
 *         {
 *             RoleArn = "arn:aws:iam::123456789012:role/example-role",
 *             Enabled = true,
 *         },
 *         Type = "compaction",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := glue.NewCatalogTableOptimizer(ctx, "example", &glue.CatalogTableOptimizerArgs{
 * 			CatalogId:    pulumi.String("123456789012"),
 * 			DatabaseName: pulumi.String("example_database"),
 * 			TableName:    pulumi.String("example_table"),
 * 			Configuration: &glue.CatalogTableOptimizerConfigurationArgs{
 * 				RoleArn: pulumi.String("arn:aws:iam::123456789012:role/example-role"),
 * 				Enabled: pulumi.Bool(true),
 * 			},
 * 			Type: pulumi.String("compaction"),
 * 		})
 * 		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.glue.CatalogTableOptimizer;
 * import com.pulumi.aws.glue.CatalogTableOptimizerArgs;
 * import com.pulumi.aws.glue.inputs.CatalogTableOptimizerConfigurationArgs;
 * 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 CatalogTableOptimizer("example", CatalogTableOptimizerArgs.builder()
 *             .catalogId("123456789012")
 *             .databaseName("example_database")
 *             .tableName("example_table")
 *             .configuration(CatalogTableOptimizerConfigurationArgs.builder()
 *                 .roleArn("arn:aws:iam::123456789012:role/example-role")
 *                 .enabled(true)
 *                 .build())
 *             .type("compaction")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:glue:CatalogTableOptimizer
 *     properties:
 *       catalogId: '123456789012'
 *       databaseName: example_database
 *       tableName: example_table
 *       configuration:
 *         roleArn: arn:aws:iam::123456789012:role/example-role
 *         enabled: true
 *       type: compaction
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Glue Catalog Table Optimizer using the `catalog_id,database_name,table_name,type`. For example:
 * ```sh
 * $ pulumi import aws:glue/catalogTableOptimizer:CatalogTableOptimizer example 123456789012,example_database,example_table,compaction
 * ```
 * @property catalogId The Catalog ID of the table.
 * @property configuration A configuration block that defines the table optimizer settings. The block contains:
 * @property databaseName The name of the database in the catalog in which the table resides.
 * @property tableName The name of the table.
 * @property type The type of table optimizer. Currently, the only valid value is compaction.
 */
public data class CatalogTableOptimizerArgs(
    public val catalogId: Output? = null,
    public val configuration: Output? = null,
    public val databaseName: Output? = null,
    public val tableName: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.glue.CatalogTableOptimizerArgs =
        com.pulumi.aws.glue.CatalogTableOptimizerArgs.builder()
            .catalogId(catalogId?.applyValue({ args0 -> args0 }))
            .configuration(configuration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .databaseName(databaseName?.applyValue({ args0 -> args0 }))
            .tableName(tableName?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CatalogTableOptimizerArgs].
 */
@PulumiTagMarker
public class CatalogTableOptimizerArgsBuilder internal constructor() {
    private var catalogId: Output? = null

    private var configuration: Output? = null

    private var databaseName: Output? = null

    private var tableName: Output? = null

    private var type: Output? = null

    /**
     * @param value The Catalog ID of the table.
     */
    @JvmName("barrgoifhsdngili")
    public suspend fun catalogId(`value`: Output) {
        this.catalogId = value
    }

    /**
     * @param value A configuration block that defines the table optimizer settings. The block contains:
     */
    @JvmName("byqosyklxufhqato")
    public suspend fun configuration(`value`: Output) {
        this.configuration = value
    }

    /**
     * @param value The name of the database in the catalog in which the table resides.
     */
    @JvmName("xvctjgqcwexofswx")
    public suspend fun databaseName(`value`: Output) {
        this.databaseName = value
    }

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

    /**
     * @param value The type of table optimizer. Currently, the only valid value is compaction.
     */
    @JvmName("pcbpgiumlpiyvaqv")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

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

    /**
     * @param value A configuration block that defines the table optimizer settings. The block contains:
     */
    @JvmName("niumexpbcnkupkfm")
    public suspend fun configuration(`value`: CatalogTableOptimizerConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configuration = mapped
    }

    /**
     * @param argument A configuration block that defines the table optimizer settings. The block contains:
     */
    @JvmName("vaujgdawuvogrsnl")
    public suspend fun configuration(argument: suspend CatalogTableOptimizerConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = CatalogTableOptimizerConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.configuration = mapped
    }

    /**
     * @param value The name of the database in the catalog in which the table resides.
     */
    @JvmName("rqjdxdwrouroqxoa")
    public suspend fun databaseName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databaseName = mapped
    }

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

    /**
     * @param value The type of table optimizer. Currently, the only valid value is compaction.
     */
    @JvmName("mwmmewaebveestxo")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): CatalogTableOptimizerArgs = CatalogTableOptimizerArgs(
        catalogId = catalogId,
        configuration = configuration,
        databaseName = databaseName,
        tableName = tableName,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy