Database Args
data class DatabaseArgs(val aclConfiguration: Output<DatabaseAclConfigurationArgs>? = null, val bucket: Output<String>? = null, val comment: Output<String>? = null, val encryptionConfiguration: Output<DatabaseEncryptionConfigurationArgs>? = null, val expectedBucketOwner: Output<String>? = null, val forceDestroy: Output<Boolean>? = null, val name: Output<String>? = null, val properties: Output<Map<String, String>>? = null) : ConvertibleToJava<DatabaseArgs>
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());
}
}Content copied to clipboard
Import
Athena Databases can be imported using their name, e.g.,
$ pulumi import aws:athena/database:Database example exampleContent copied to clipboard
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 } }
Constructors
Link copied to clipboard
fun DatabaseArgs(aclConfiguration: Output<DatabaseAclConfigurationArgs>? = null, bucket: Output<String>? = null, comment: Output<String>? = null, encryptionConfiguration: Output<DatabaseEncryptionConfigurationArgs>? = null, expectedBucketOwner: Output<String>? = null, forceDestroy: Output<Boolean>? = null, name: Output<String>? = null, properties: Output<Map<String, String>>? = null)