Try AWS Native preview for resources not in the classic version.
aws.timestreamwrite.Database
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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/v6/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.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 example = new Database("example", DatabaseArgs.builder()
.databaseName("database-example")
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Database
properties:
databaseName: 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/v6/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.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 example = new Database("example", DatabaseArgs.builder()
.databaseName("database-example")
.kmsKeyId(exampleAwsKmsKey.arn())
.tags(Map.of("Name", "value"))
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Database
properties:
databaseName: database-example
kmsKeyId: ${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,
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.
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",
Tags =
{
{ "string", "string" },
},
});
example, err := timestreamwrite.NewDatabase(ctx, "exampledatabaseResourceResourceFromTimestreamwritedatabase", ×treamwrite.DatabaseArgs{
DatabaseName: pulumi.String("string"),
KmsKeyId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var exampledatabaseResourceResourceFromTimestreamwritedatabase = new Database("exampledatabaseResourceResourceFromTimestreamwritedatabase", DatabaseArgs.builder()
.databaseName("string")
.kmsKeyId("string")
.tags(Map.of("string", "string"))
.build());
exampledatabase_resource_resource_from_timestreamwritedatabase = aws.timestreamwrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase",
database_name="string",
kms_key_id="string",
tags={
"string": "string",
})
const exampledatabaseResourceResourceFromTimestreamwritedatabase = new aws.timestreamwrite.Database("exampledatabaseResourceResourceFromTimestreamwritedatabase", {
databaseName: "string",
kmsKeyId: "string",
tags: {
string: "string",
},
});
type: aws:timestreamwrite:Database
properties:
databaseName: string
kmsKeyId: 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
The Database resource accepts the following input properties:
- Database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - The 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.
- Dictionary<string, string>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - The 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.
- map[string]string
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name String - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - The 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.
- Map<String,String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key stringId - The 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.
- {[key: string]: string}
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- database_
name str - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ strid - The 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.
- Mapping[str, str]
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- database
Name String - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - The 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.
- Map<String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration 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
- The ARN that uniquely identifies this database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count int - The total number of tables found within the Timestream database.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN that uniquely identifies this database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Table
Count int - The total number of tables found within the Timestream database.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that uniquely identifies this database.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Integer - The total number of tables found within the Timestream database.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN that uniquely identifies this database.
- id string
- The provider-assigned unique ID for this managed resource.
- table
Count number - The total number of tables found within the Timestream database.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN that uniquely identifies this database.
- id str
- The provider-assigned unique ID for this managed resource.
- table_
count int - The total number of tables found within the Timestream database.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that uniquely identifies this database.
- id String
- The provider-assigned unique ID for this managed resource.
- table
Count Number - The total number of tables found within the Timestream database.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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,
table_count: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Database
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)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Arn string
- The ARN that uniquely identifies this database.
- Database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - The 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.
- Table
Count int - The 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
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN that uniquely identifies this database.
- Database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- Kms
Key stringId - The 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.
- Table
Count int - The 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
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that uniquely identifies this database.
- database
Name String - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - The 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.
- table
Count Integer - The 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
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN that uniquely identifies this database.
- database
Name string - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key stringId - The 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.
- table
Count number - The 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
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN that uniquely identifies this database.
- database_
name str - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms_
key_ strid - The 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.
- table_
count int - The 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
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that uniquely identifies this database.
- database
Name String - The name of the Timestream database. Minimum length of 3. Maximum length of 64.
- kms
Key StringId - The 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.
- table
Count Number - The total number of tables found within the Timestream database.
- Map<String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Import
Using pulumi import
, import Timestream databases using the database_name
. 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
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.