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
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);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.
- Encryption
Configuration DatabaseEncryption Configuration Args 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_configurationblock 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 string
Name of the database to create.
- Bucket string
Name of s3 bucket to save the results of the query execution.
- Encryption
Configuration DatabaseEncryption Configuration 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_configurationblock 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 string
Name of the database to create.
- bucket string
Name of s3 bucket to save the results of the query execution.
- encryption
Configuration DatabaseEncryption Configuration 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_configurationblock is documented below.- force
Destroy 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[DatabaseEncryption Configuration] 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_configurationblock 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:
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): Databasestatic 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.
- Encryption
Configuration DatabaseEncryption Configuration Args 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_configurationblock 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 string
Name of the database to create.
- Bucket string
Name of s3 bucket to save the results of the query execution.
- Encryption
Configuration DatabaseEncryption Configuration 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_configurationblock 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 string
Name of the database to create.
- bucket string
Name of s3 bucket to save the results of the query execution.
- encryption
Configuration DatabaseEncryption Configuration 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_configurationblock is documented below.- force
Destroy 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[DatabaseEncryption Configuration] 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_configurationblock 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
- Encryption
Option string The type of key; one of
SSE_S3,SSE_KMS,CSE_KMS- Kms
Key string The KMS key ARN or ID; required for key types
SSE_KMSandCSE_KMS.
- Encryption
Option string The type of key; one of
SSE_S3,SSE_KMS,CSE_KMS- Kms
Key string The KMS key ARN or ID; required for key types
SSE_KMSandCSE_KMS.
- encryption
Option string The type of key; one of
SSE_S3,SSE_KMS,CSE_KMS- kms
Key string The KMS key ARN or ID; required for key types
SSE_KMSandCSE_KMS.
- encryption
Option str The type of key; one of
SSE_S3,SSE_KMS,CSE_KMS- kms
Key str The KMS key ARN or ID; required for key types
SSE_KMSandCSE_KMS.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.