published on Friday, Nov 13, 2026 by Pulumi
published on Friday, Nov 13, 2026 by Pulumi
Provides a Timestream database resource.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.timestreamwrite.Database("example", {databaseName: "database-example"});
import pulumi
import pulumi_aws as aws
example = aws.timestreamwrite.Database("example", database_name="database-example")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/timestreamwrite"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := timestreamwrite.NewDatabase(ctx, "example", ×treamwrite.DatabaseArgs{
DatabaseName: pulumi.String("database-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.TimestreamWrite.Database("example", new()
{
DatabaseName = "database-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamwrite.Database;
import com.pulumi.aws.timestreamwrite.DatabaseArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Database("example", DatabaseArgs.builder()
.databaseName("database-example")
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Database
properties:
databaseName: database-example
terraform {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_timestreamwrite_database" "example" {
lifecycle {
create_before_destroy = true
}
database_name = "database-example"
}
Full usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.timestreamwrite.Database("example", {
databaseName: "database-example",
kmsKeyId: exampleAwsKmsKey.arn,
tags: {
Name: "value",
},
});
import pulumi
import pulumi_aws as aws
example = aws.timestreamwrite.Database("example",
database_name="database-example",
kms_key_id=example_aws_kms_key["arn"],
tags={
"Name": "value",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/timestreamwrite"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := timestreamwrite.NewDatabase(ctx, "example", ×treamwrite.DatabaseArgs{
DatabaseName: pulumi.String("database-example"),
KmsKeyId: pulumi.Any(exampleAwsKmsKey.Arn),
Tags: pulumi.StringMap{
"Name": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.TimestreamWrite.Database("example", new()
{
DatabaseName = "database-example",
KmsKeyId = exampleAwsKmsKey.Arn,
Tags =
{
{ "Name", "value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamwrite.Database;
import com.pulumi.aws.timestreamwrite.DatabaseArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Database("example", DatabaseArgs.builder()
.databaseName("database-example")
.kmsKeyId(exampleAwsKmsKey.get("arn"))
.tags(Map.of("Name", "value"))
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Database
properties:
databaseName: database-example
kmsKeyId: ${exampleAwsKmsKey.arn}
tags:
Name: value
terraform {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_timestreamwrite_database" "example" {
lifecycle {
create_before_destroy = true
}
database_name = "database-example"
kms_key_id = exampleAwsKmsKey.arn
tags = {
"Name" = "value"
}
}
Create Database Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_name: Optional[str] = None,
kms_key_id: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: aws:timestreamwrite:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_timestreamwrite_database" "name" {
# resource properties
}Parameters
- 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.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampledatabaseResourceResourceFromTimestreamwritedatabase = new Aws.TimestreamWrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase", new()
{
DatabaseName = "string",
KmsKeyId = "string",
Region = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := timestreamwrite.NewDatabase(ctx, "exampledatabaseResourceResourceFromTimestreamwritedatabase", ×treamwrite.DatabaseArgs{
DatabaseName: pulumi.String("string"),
KmsKeyId: pulumi.String("string"),
Region: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "aws_timestreamwrite_database" "exampledatabaseResourceResourceFromTimestreamwritedatabase" {
lifecycle {
create_before_destroy = true
}
database_name = "string"
kms_key_id = "string"
region = "string"
tags = {
"string" = "string"
}
}
var exampledatabaseResourceResourceFromTimestreamwritedatabase = new com.pulumi.aws.timestreamwrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase", com.pulumi.aws.timestreamwrite.DatabaseArgs.builder()
.databaseName("string")
.kmsKeyId("string")
.region("string")
.tags(Map.of("string", "string"))
.build());
exampledatabase_resource_resource_from_timestreamwritedatabase = aws.timestreamwrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase",
database_name="string",
kms_key_id="string",
region="string",
tags={
"string": "string",
})
const exampledatabaseResourceResourceFromTimestreamwritedatabase = new aws.timestreamwrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase", {
databaseName: "string",
kmsKeyId: "string",
region: "string",
tags: {
string: "string",
},
});
type: aws:timestreamwrite:Database
properties:
databaseName: string
kmsKeyId: string
region: string
tags:
string: string
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Database resource accepts the following input properties:
- Database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- database_
name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ stringid - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map(string)
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name String - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- database_
name str - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ strid - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name String - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Arn string
- ARN that uniquely identifies this database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count int - Total number of tables found within the Timestream database.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- Arn string
- ARN that uniquely identifies this database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count int - Total number of tables found within the Timestream database.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn string
- ARN that uniquely identifies this database.
- id string
- The provider-assigned unique ID for this managed resource.
- table_
count number - Total number of tables found within the Timestream database.
- map(string)
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn String
- ARN that uniquely identifies this database.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Integer - Total number of tables found within the Timestream database.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn string
- ARN that uniquely identifies this database.
- id string
- The provider-assigned unique ID for this managed resource.
- table
Count number - Total number of tables found within the Timestream database.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn str
- ARN that uniquely identifies this database.
- id str
- The provider-assigned unique ID for this managed resource.
- table_
count int - Total number of tables found within the Timestream database.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn String
- ARN that uniquely identifies this database.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Number - Total number of tables found within the Timestream database.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
Look up 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@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
database_name: Optional[str] = None,
kms_key_id: Optional[str] = None,
region: Optional[str] = None,
table_count: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Databasefunc 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)public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)resources: existingDatabase: type: aws:timestreamwrite:Database get: id: ${id}import {
to = aws_timestreamwrite_database.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state DatabaseState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state DatabaseState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state DatabaseState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state DatabaseState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Arn string
- ARN that uniquely identifies this database.
- Database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Table
Count int - Total number of tables found within the Timestream database.
- Dictionary<string, string>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- Arn string
- ARN that uniquely identifies this database.
- Database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Table
Count int - Total number of tables found within the Timestream database.
- map[string]string
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn string
- ARN that uniquely identifies this database.
- database_
name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ stringid - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- table_
count number - Total number of tables found within the Timestream database.
- map(string)
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map(string)
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn String
- ARN that uniquely identifies this database.
- database
Name String - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- table
Count Integer - Total number of tables found within the Timestream database.
- Map<String,String>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn string
- ARN that uniquely identifies this database.
- database
Name string - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key stringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- table
Count number - Total number of tables found within the Timestream database.
- {[key: string]: string}
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn str
- ARN that uniquely identifies this database.
- database_
name str - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ strid - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- table_
count int - Total number of tables found within the Timestream database.
- Mapping[str, str]
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
- arn String
- ARN that uniquely identifies this database.
- database
Name String - Name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- table
Count Number - Total number of tables found within the Timestream database.
- Map<String>
- Map of tags to assign to this resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.
Import
Using pulumi import, import Timestream databases using the databaseName. For example:
$ pulumi import aws:timestreamwrite/database:Database example example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Friday, Nov 13, 2026 by Pulumi