Table class
Provides a Timestream table resource.
Example Usage
Basic usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.timestreamwrite.Table("example", {
databaseName: exampleAwsTimestreamwriteDatabase.databaseName,
tableName: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.timestreamwrite.Table("example",
database_name=example_aws_timestreamwrite_database["databaseName"],
table_name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.TimestreamWrite.Table("example", new()
{
DatabaseName = exampleAwsTimestreamwriteDatabase.DatabaseName,
TableName = "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.NewTable(ctx, "example", ×treamwrite.TableArgs{
DatabaseName: pulumi.Any(exampleAwsTimestreamwriteDatabase.DatabaseName),
TableName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_timestreamwrite_table" "example" {
database_name = exampleAwsTimestreamwriteDatabase.databaseName
table_name = "example"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamwrite.Table;
import com.pulumi.aws.timestreamwrite.TableArgs;
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 Table("example", TableArgs.builder()
.databaseName(exampleAwsTimestreamwriteDatabase.databaseName())
.tableName("example")
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Table
properties:
databaseName: ${exampleAwsTimestreamwriteDatabase.databaseName}
tableName: example
Full usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.timestreamwrite.Table("example", {
retentionProperties: {
magneticStoreRetentionPeriodInDays: 30,
memoryStoreRetentionPeriodInHours: 8,
},
databaseName: exampleAwsTimestreamwriteDatabase.databaseName,
tableName: "example",
tags: {
Name: "example-timestream-table",
},
});
import pulumi
import pulumi_aws as aws
example = aws.timestreamwrite.Table("example",
retention_properties={
"magnetic_store_retention_period_in_days": 30,
"memory_store_retention_period_in_hours": 8,
},
database_name=example_aws_timestreamwrite_database["databaseName"],
table_name="example",
tags={
"Name": "example-timestream-table",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.TimestreamWrite.Table("example", new()
{
RetentionProperties = new Aws.TimestreamWrite.Inputs.TableRetentionPropertiesArgs
{
MagneticStoreRetentionPeriodInDays = 30,
MemoryStoreRetentionPeriodInHours = 8,
},
DatabaseName = exampleAwsTimestreamwriteDatabase.DatabaseName,
TableName = "example",
Tags =
{
{ "Name", "example-timestream-table" },
},
});
});
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.NewTable(ctx, "example", ×treamwrite.TableArgs{
RetentionProperties: ×treamwrite.TableRetentionPropertiesArgs{
MagneticStoreRetentionPeriodInDays: pulumi.Int(30),
MemoryStoreRetentionPeriodInHours: pulumi.Int(8),
},
DatabaseName: pulumi.Any(exampleAwsTimestreamwriteDatabase.DatabaseName),
TableName: pulumi.String("example"),
Tags: pulumi.StringMap{
"Name": pulumi.String("example-timestream-table"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_timestreamwrite_table" "example" {
retention_properties = {
magnetic_store_retention_period_in_days = 30
memory_store_retention_period_in_hours = 8
}
database_name = exampleAwsTimestreamwriteDatabase.databaseName
table_name = "example"
tags = {
"Name" = "example-timestream-table"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamwrite.Table;
import com.pulumi.aws.timestreamwrite.TableArgs;
import com.pulumi.aws.timestreamwrite.inputs.TableRetentionPropertiesArgs;
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 Table("example", TableArgs.builder()
.retentionProperties(TableRetentionPropertiesArgs.builder()
.magneticStoreRetentionPeriodInDays(30)
.memoryStoreRetentionPeriodInHours(8)
.build())
.databaseName(exampleAwsTimestreamwriteDatabase.databaseName())
.tableName("example")
.tags(Map.of("Name", "example-timestream-table"))
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Table
properties:
retentionProperties:
magneticStoreRetentionPeriodInDays: 30
memoryStoreRetentionPeriodInHours: 8
databaseName: ${exampleAwsTimestreamwriteDatabase.databaseName}
tableName: example
tags:
Name: example-timestream-table
Customer-defined Partition Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.timestreamwrite.Table("example", {
schema: {
compositePartitionKey: {
enforcementInRecord: "REQUIRED",
name: "attr1",
type: "DIMENSION",
},
},
databaseName: exampleAwsTimestreamwriteDatabase.databaseName,
tableName: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.timestreamwrite.Table("example",
schema={
"composite_partition_key": {
"enforcement_in_record": "REQUIRED",
"name": "attr1",
"type": "DIMENSION",
},
},
database_name=example_aws_timestreamwrite_database["databaseName"],
table_name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.TimestreamWrite.Table("example", new()
{
Schema = new Aws.TimestreamWrite.Inputs.TableSchemaArgs
{
CompositePartitionKey = new Aws.TimestreamWrite.Inputs.TableSchemaCompositePartitionKeyArgs
{
EnforcementInRecord = "REQUIRED",
Name = "attr1",
Type = "DIMENSION",
},
},
DatabaseName = exampleAwsTimestreamwriteDatabase.DatabaseName,
TableName = "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.NewTable(ctx, "example", ×treamwrite.TableArgs{
Schema: ×treamwrite.TableSchemaArgs{
CompositePartitionKey: ×treamwrite.TableSchemaCompositePartitionKeyArgs{
EnforcementInRecord: pulumi.String("REQUIRED"),
Name: pulumi.String("attr1"),
Type: pulumi.String("DIMENSION"),
},
},
DatabaseName: pulumi.Any(exampleAwsTimestreamwriteDatabase.DatabaseName),
TableName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_timestreamwrite_table" "example" {
schema = {
composite_partition_key = {
enforcement_in_record = "REQUIRED"
name = "attr1"
type = "DIMENSION"
}
}
database_name = exampleAwsTimestreamwriteDatabase.databaseName
table_name = "example"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamwrite.Table;
import com.pulumi.aws.timestreamwrite.TableArgs;
import com.pulumi.aws.timestreamwrite.inputs.TableSchemaArgs;
import com.pulumi.aws.timestreamwrite.inputs.TableSchemaCompositePartitionKeyArgs;
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 Table("example", TableArgs.builder()
.schema(TableSchemaArgs.builder()
.compositePartitionKey(TableSchemaCompositePartitionKeyArgs.builder()
.enforcementInRecord("REQUIRED")
.name("attr1")
.type("DIMENSION")
.build())
.build())
.databaseName(exampleAwsTimestreamwriteDatabase.databaseName())
.tableName("example")
.build());
}
}
resources:
example:
type: aws:timestreamwrite:Table
properties:
schema:
compositePartitionKey:
enforcementInRecord: REQUIRED
name: attr1
type: DIMENSION
databaseName: ${exampleAwsTimestreamwriteDatabase.databaseName}
tableName: example
Import
Using pulumi import, import Timestream tables using the tableName and databaseName separate by a colon (:). For example:
$ pulumi import aws:timestreamwrite/table:Table example ExampleTable:ExampleDatabase
Constructors
- Table(String name, {TableArgs? args, CustomResourceOptions? options})
-
Creates a new Table.
nameThe Pulumi resource name.argsArguments used to configure this Table. The set of arguments for Table.optionsResource options controlling this resource's behavior. - Table.reference(String urn)
- Creates a typed reference to an existing Table resource.
Properties
-
arn
↔ Output<
String> -
The ARN that uniquely identifies this table.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
databaseName
↔ Output<
String> -
The name of the Timestream database.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
magneticStoreWriteProperties
↔ Output<
TableMagneticStoreWriteProperties> -
Contains properties to set on the table when enabling magnetic store writes. See Magnetic Store Write Properties below for more details.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
retentionProperties
↔ Output<
TableRetentionProperties> -
The retention duration for the memory store and magnetic store. See Retention Properties below for more details. If not provided,
magneticStoreRetentionPeriodInDaysdefault to 73000 andmemoryStoreRetentionPeriodInHoursdefaults to 6.latefinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schema
↔ Output<
TableSchema> -
The schema of the table. See Schema below for more details.
latefinal
-
tableName
↔ Output<
String> -
The name of the Timestream table.
latefinal
-
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.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited