com.pulumi.aws.s3tables.kotlin.TableBucket.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.s3tables.kotlin
import com.pulumi.aws.s3tables.kotlin.outputs.TableBucketMaintenanceConfiguration
import com.pulumi.aws.s3tables.kotlin.outputs.TableBucketMaintenanceConfiguration.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
/**
* Builder for [TableBucket].
*/
@PulumiTagMarker
public class TableBucketResourceBuilder internal constructor() {
public var name: String? = null
public var args: TableBucketArgs = TableBucketArgs()
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 TableBucketArgsBuilder.() -> Unit) {
val builder = TableBucketArgsBuilder()
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(): TableBucket {
val builtJavaResource = com.pulumi.aws.s3tables.TableBucket(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TableBucket(builtJavaResource)
}
}
/**
* Resource for managing an Amazon S3 Tables Table Bucket.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.s3tables.TableBucket("example", {name: "example-bucket"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.s3tables.TableBucket("example", name="example-bucket")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.S3Tables.TableBucket("example", new()
* {
* Name = "example-bucket",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3tables"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := s3tables.NewTableBucket(ctx, "example", &s3tables.TableBucketArgs{
* Name: pulumi.String("example-bucket"),
* })
* 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.s3tables.TableBucket;
* import com.pulumi.aws.s3tables.TableBucketArgs;
* 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 TableBucket("example", TableBucketArgs.builder()
* .name("example-bucket")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:s3tables:TableBucket
* properties:
* name: example-bucket
* ```
*
* ## Import
* Using `pulumi import`, import S3 Tables Table Bucket using the `arn`. For example:
* ```sh
* $ pulumi import aws:s3tables/tableBucket:TableBucket example arn:aws:s3tables:us-west-2:123456789012:bucket/example-bucket
* ```
*/
public class TableBucket internal constructor(
override val javaResource: com.pulumi.aws.s3tables.TableBucket,
) : KotlinCustomResource(javaResource, TableBucketMapper) {
/**
* ARN of the table bucket.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Date and time when the bucket was created.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* A single table bucket maintenance configuration block.
* See `maintenance_configuration` below
*/
public val maintenanceConfiguration: Output
get() = javaResource.maintenanceConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* Name of the table bucket.
* Must be between 3 and 63 characters in length.
* Can consist of lowercase letters, numbers, and hyphens, and must begin and end with a lowercase letter or number.
* A full list of bucket naming rules may be found in S3 Tables documentation.
* The following argument is optional:
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Account ID of the account that owns the table bucket.
*/
public val ownerAccountId: Output
get() = javaResource.ownerAccountId().applyValue({ args0 -> args0 })
}
public object TableBucketMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.s3tables.TableBucket::class == javaResource::class
override fun map(javaResource: Resource): TableBucket = TableBucket(
javaResource as
com.pulumi.aws.s3tables.TableBucket,
)
}
/**
* @see [TableBucket].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TableBucket].
*/
public suspend fun tableBucket(name: String, block: suspend TableBucketResourceBuilder.() -> Unit): TableBucket {
val builder = TableBucketResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TableBucket].
* @param name The _unique_ name of the resulting resource.
*/
public fun tableBucket(name: String): TableBucket {
val builder = TableBucketResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy