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.
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.athena.kotlin
import com.pulumi.aws.athena.DatabaseArgs.builder
import com.pulumi.aws.athena.kotlin.inputs.DatabaseAclConfigurationArgs
import com.pulumi.aws.athena.kotlin.inputs.DatabaseAclConfigurationArgsBuilder
import com.pulumi.aws.athena.kotlin.inputs.DatabaseEncryptionConfigurationArgs
import com.pulumi.aws.athena.kotlin.inputs.DatabaseEncryptionConfigurationArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an Athena database.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.s3.BucketV2("example", {bucket: "example"});
* const exampleDatabase = new aws.athena.Database("example", {
* name: "database_name",
* bucket: example.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.s3.BucketV2("example", bucket="example")
* example_database = aws.athena.Database("example",
* name="database_name",
* bucket=example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.S3.BucketV2("example", new()
* {
* Bucket = "example",
* });
* var exampleDatabase = new Aws.Athena.Database("example", new()
* {
* Name = "database_name",
* Bucket = example.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/athena"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
* Bucket: pulumi.String("example"),
* })
* if err != nil {
* return err
* }
* _, err = athena.NewDatabase(ctx, "example", &athena.DatabaseArgs{
* Name: pulumi.String("database_name"),
* Bucket: example.ID(),
* })
* 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.s3.BucketV2;
* import com.pulumi.aws.s3.BucketV2Args;
* import com.pulumi.aws.athena.Database;
* import com.pulumi.aws.athena.DatabaseArgs;
* 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 BucketV2("example", BucketV2Args.builder()
* .bucket("example")
* .build());
* var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
* .name("database_name")
* .bucket(example.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:s3:BucketV2
* properties:
* bucket: example
* exampleDatabase:
* type: aws:athena:Database
* name: example
* properties:
* name: database_name
* bucket: ${example.id}
* ```
*
* ## Import
* Using `pulumi import`, import Athena Databases using their name. For example:
* ```sh
* $ pulumi import aws:athena/database:Database example example
* ```
* Certain resource arguments, like `encryption_configuration` and `bucket`, do not have an API method for reading the information after creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example:
* @property aclConfiguration That an Amazon S3 canned ACL should be set to control ownership of stored query results. See ACL Configuration below.
* @property bucket Name of S3 bucket to save the results of the query execution.
* @property comment Description of the database.
* @property encryptionConfiguration Encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. See Encryption Configuration below.
* @property expectedBucketOwner AWS account ID that you expect to be the owner of the Amazon S3 bucket.
* @property forceDestroy Boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are *not* recoverable.
* @property name Name of the database to create.
* @property properties Key-value map of custom metadata properties for the database definition.
*/
public data class DatabaseArgs(
public val aclConfiguration: Output? = null,
public val bucket: Output? = null,
public val comment: Output? = null,
public val encryptionConfiguration: Output? = null,
public val expectedBucketOwner: Output? = null,
public val forceDestroy: Output? = null,
public val name: Output? = null,
public val properties: Output