Database

Provides an Athena database.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var hogeBucket = new Aws.S3.Bucket("hogeBucket", new Aws.S3.BucketArgs
        {
        });
        var hogeDatabase = new Aws.Athena.Database("hogeDatabase", new Aws.Athena.DatabaseArgs
        {
            Bucket = hogeBucket.BucketName,
            Name = "database_name",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/athena"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/s3"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        hogeBucket, err := s3.NewBucket(ctx, "hogeBucket", nil)
        if err != nil {
            return err
        }
        _, err = athena.NewDatabase(ctx, "hogeDatabase", &athena.DatabaseArgs{
            Bucket: hogeBucket.Bucket,
            Name:   pulumi.String("database_name"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

hoge_bucket = aws.s3.Bucket("hogeBucket")
hoge_database = aws.athena.Database("hogeDatabase",
    bucket=hoge_bucket.bucket,
    name="database_name")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const hogeBucket = new aws.s3.Bucket("hoge", {});
const hogeDatabase = new aws.athena.Database("hoge", {
    bucket: hogeBucket.bucket,
    name: "database_name",
});

Create a Database Resource

def Database(resource_name, opts=None, bucket=None, encryption_configuration=None, force_destroy=None, name=None, __props__=None);
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Database resource accepts the following input properties:

Bucket string

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

EncryptionConfiguration DatabaseEncryptionConfigurationArgs

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

ForceDestroy bool

A 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.

Name string

Name of the database to create.

Bucket string

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

EncryptionConfiguration DatabaseEncryptionConfiguration

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

ForceDestroy bool

A 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.

Name string

Name of the database to create.

bucket string

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

encryptionConfiguration DatabaseEncryptionConfiguration

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

forceDestroy boolean

A 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.

name string

Name of the database to create.

bucket str

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

encryption_configuration Dict[DatabaseEncryptionConfiguration]

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

force_destroy bool

A 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.

name str

Name of the database to create.

Outputs

All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Database Resource

Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
static get(resource_name, id, opts=None, bucket=None, encryption_configuration=None, force_destroy=None, name=None, __props__=None);
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Bucket string

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

EncryptionConfiguration DatabaseEncryptionConfigurationArgs

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

ForceDestroy bool

A 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.

Name string

Name of the database to create.

Bucket string

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

EncryptionConfiguration DatabaseEncryptionConfiguration

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

ForceDestroy bool

A 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.

Name string

Name of the database to create.

bucket string

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

encryptionConfiguration DatabaseEncryptionConfiguration

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

forceDestroy boolean

A 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.

name string

Name of the database to create.

bucket str

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

encryption_configuration Dict[DatabaseEncryptionConfiguration]

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

force_destroy bool

A 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.

name str

Name of the database to create.

Supporting Types

DatabaseEncryptionConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

EncryptionOption string

The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

KmsKey string

The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

EncryptionOption string

The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

KmsKey string

The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

encryptionOption string

The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

kmsKey string

The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

encryptionOption str

The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

kmsKey str

The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.