Database

class Database : KotlinCustomResource

Provides an Athena database.

Example Usage

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.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 exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.name("database_name")
.bucket(exampleBucketV2.id())
.build());
}
}

Import

Athena Databases can be imported using their name, e.g.,

$ 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 configuration on an imported resource, the provider will always show a difference. To workaround this behavior, either omit the argument from the configuration or use ignore_changes to hide the difference, e.g., terraform resource "aws_athena_database" "example" { name = "database_name" bucket = aws_s3_bucket.example.id

There is no API for reading bucket

lifecycle { ignore_changes = bucket } }

Properties

Link copied to clipboard

That an Amazon S3 canned ACL should be set to control ownership of stored query results. See ACL Configuration below.

Link copied to clipboard
val bucket: Output<String>?

Name of S3 bucket to save the results of the query execution.

Link copied to clipboard
val comment: Output<String>?

Description of the database.

Link copied to clipboard

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.

Link copied to clipboard

AWS account ID that you expect to be the owner of the Amazon S3 bucket.

Link copied to clipboard
val forceDestroy: Output<Boolean>?

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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the database to create.

Link copied to clipboard
val properties: Output<Map<String, String>>?

Key-value map of custom metadata properties for the database definition.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>