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

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

package com.pulumi.azure.storage.kotlin

import com.pulumi.azure.storage.TableArgs.builder
import com.pulumi.azure.storage.kotlin.inputs.TableAclArgs
import com.pulumi.azure.storage.kotlin.inputs.TableAclArgsBuilder
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.collections.List
import kotlin.jvm.JvmName

/**
 * Manages a Table within an Azure Storage Account.
 * > **Note on Authentication** Shared Key authentication will always be used for this resource, as AzureAD authentication is not supported when setting or retrieving ACLs for Tables.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "azuretest",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "azureteststorage1",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleTable = new azure.storage.Table("example", {
 *     name: "mysampletable",
 *     storageAccountName: exampleAccount.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="azuretest",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="azureteststorage1",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS")
 * example_table = azure.storage.Table("example",
 *     name="mysampletable",
 *     storage_account_name=example_account.name)
 * ```
 * ```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 = "azuretest",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "azureteststorage1",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *     });
 *     var exampleTable = new Azure.Storage.Table("example", new()
 *     {
 *         Name = "mysampletable",
 *         StorageAccountName = exampleAccount.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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("azuretest"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("azureteststorage1"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = storage.NewTable(ctx, "example", &storage.TableArgs{
 * 			Name:               pulumi.String("mysampletable"),
 * 			StorageAccountName: exampleAccount.Name,
 * 		})
 * 		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.storage.Table;
 * import com.pulumi.azure.storage.TableArgs;
 * 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("azuretest")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("azureteststorage1")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 *         var exampleTable = new Table("exampleTable", TableArgs.builder()
 *             .name("mysampletable")
 *             .storageAccountName(exampleAccount.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: azuretest
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: azureteststorage1
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *   exampleTable:
 *     type: azure:storage:Table
 *     name: example
 *     properties:
 *       name: mysampletable
 *       storageAccountName: ${exampleAccount.name}
 * ```
 * 
 * ## Import
 * Table's within a Storage Account can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:storage/table:Table table1 "https://example.table.core.windows.net/Tables('replace-with-table-name')"
 * ```
 * @property acls One or more `acl` blocks as defined below.
 * @property name The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
 * @property storageAccountName Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
 */
public data class TableArgs(
    public val acls: Output>? = null,
    public val name: Output? = null,
    public val storageAccountName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.storage.TableArgs =
        com.pulumi.azure.storage.TableArgs.builder()
            .acls(acls?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .storageAccountName(storageAccountName?.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    private var storageAccountName: Output? = null

    /**
     * @param value One or more `acl` blocks as defined below.
     */
    @JvmName("nmawumnhyaqtsbum")
    public suspend fun acls(`value`: Output>) {
        this.acls = value
    }

    @JvmName("xekcrervtywbfbnh")
    public suspend fun acls(vararg values: Output) {
        this.acls = Output.all(values.asList())
    }

    /**
     * @param values One or more `acl` blocks as defined below.
     */
    @JvmName("fcbpuhbfbawewneb")
    public suspend fun acls(values: List>) {
        this.acls = Output.all(values)
    }

    /**
     * @param value The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
     */
    @JvmName("ucnhgyyddipfrykp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
     */
    @JvmName("lcuwdnqaxjbxttxi")
    public suspend fun storageAccountName(`value`: Output) {
        this.storageAccountName = value
    }

    /**
     * @param value One or more `acl` blocks as defined below.
     */
    @JvmName("scamtocnxncskafe")
    public suspend fun acls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acls = mapped
    }

    /**
     * @param argument One or more `acl` blocks as defined below.
     */
    @JvmName("ntxjiywqctlsdoio")
    public suspend fun acls(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TableAclArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.acls = mapped
    }

    /**
     * @param argument One or more `acl` blocks as defined below.
     */
    @JvmName("qjubynwfbatdvqeg")
    public suspend fun acls(vararg argument: suspend TableAclArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TableAclArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.acls = mapped
    }

    /**
     * @param argument One or more `acl` blocks as defined below.
     */
    @JvmName("aocfoetwvsmceqky")
    public suspend fun acls(argument: suspend TableAclArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TableAclArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.acls = mapped
    }

    /**
     * @param values One or more `acl` blocks as defined below.
     */
    @JvmName("locgxnljaftqkqei")
    public suspend fun acls(vararg values: TableAclArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.acls = mapped
    }

    /**
     * @param value The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
     */
    @JvmName("vuuctjqgaqefxyjt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
     */
    @JvmName("niuiiypwvefsalby")
    public suspend fun storageAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountName = mapped
    }

    internal fun build(): TableArgs = TableArgs(
        acls = acls,
        name = name,
        storageAccountName = storageAccountName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy