TableExport

class TableExport : KotlinCustomResource

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.s3.BucketV2("example", {
bucketPrefix: "example",
forceDestroy: true,
});
const exampleTable = new aws.dynamodb.Table("example", {
name: "example-table-1",
billingMode: "PAY_PER_REQUEST",
hashKey: "user_id",
attributes: [{
name: "user_id",
type: "S",
}],
pointInTimeRecovery: {
enabled: true,
},
});
const exampleTableExport = new aws.dynamodb.TableExport("example", {
tableArn: exampleTable.arn,
s3Bucket: example.id,
});
import pulumi
import pulumi_aws as aws
example = aws.s3.BucketV2("example",
bucket_prefix="example",
force_destroy=True)
example_table = aws.dynamodb.Table("example",
name="example-table-1",
billing_mode="PAY_PER_REQUEST",
hash_key="user_id",
attributes=[{
"name": "user_id",
"type": "S",
}],
point_in_time_recovery={
"enabled": True,
})
example_table_export = aws.dynamodb.TableExport("example",
table_arn=example_table.arn,
s3_bucket=example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.S3.BucketV2("example", new()
{
BucketPrefix = "example",
ForceDestroy = true,
});
var exampleTable = new Aws.DynamoDB.Table("example", new()
{
Name = "example-table-1",
BillingMode = "PAY_PER_REQUEST",
HashKey = "user_id",
Attributes = new[]
{
new Aws.DynamoDB.Inputs.TableAttributeArgs
{
Name = "user_id",
Type = "S",
},
},
PointInTimeRecovery = new Aws.DynamoDB.Inputs.TablePointInTimeRecoveryArgs
{
Enabled = true,
},
});
var exampleTableExport = new Aws.DynamoDB.TableExport("example", new()
{
TableArn = exampleTable.Arn,
S3Bucket = example.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
BucketPrefix: pulumi.String("example"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
exampleTable, err := dynamodb.NewTable(ctx, "example", &dynamodb.TableArgs{
Name: pulumi.String("example-table-1"),
BillingMode: pulumi.String("PAY_PER_REQUEST"),
HashKey: pulumi.String("user_id"),
Attributes: dynamodb.TableAttributeArray{
&dynamodb.TableAttributeArgs{
Name: pulumi.String("user_id"),
Type: pulumi.String("S"),
},
},
PointInTimeRecovery: &dynamodb.TablePointInTimeRecoveryArgs{
Enabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = dynamodb.NewTableExport(ctx, "example", &dynamodb.TableExportArgs{
TableArn: exampleTable.Arn,
S3Bucket: example.ID(),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.dynamodb.Table;
import com.pulumi.aws.dynamodb.TableArgs;
import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;
import com.pulumi.aws.dynamodb.inputs.TablePointInTimeRecoveryArgs;
import com.pulumi.aws.dynamodb.TableExport;
import com.pulumi.aws.dynamodb.TableExportArgs;
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 BucketV2("example", BucketV2Args.builder()
.bucketPrefix("example")
.forceDestroy(true)
.build());
var exampleTable = new Table("exampleTable", TableArgs.builder()
.name("example-table-1")
.billingMode("PAY_PER_REQUEST")
.hashKey("user_id")
.attributes(TableAttributeArgs.builder()
.name("user_id")
.type("S")
.build())
.pointInTimeRecovery(TablePointInTimeRecoveryArgs.builder()
.enabled(true)
.build())
.build());
var exampleTableExport = new TableExport("exampleTableExport", TableExportArgs.builder()
.tableArn(exampleTable.arn())
.s3Bucket(example.id())
.build());
}
}
resources:
example:
type: aws:s3:BucketV2
properties:
bucketPrefix: example
forceDestroy: true
exampleTable:
type: aws:dynamodb:Table
name: example
properties:
name: example-table-1
billingMode: PAY_PER_REQUEST
hashKey: user_id
attributes:
- name: user_id
type: S
pointInTimeRecovery:
enabled: true
exampleTableExport:
type: aws:dynamodb:TableExport
name: example
properties:
tableArn: ${exampleTable.arn}
s3Bucket: ${example.id}

Example with export time

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.dynamodb.TableExport("example", {
exportTime: "2023-04-02T11:30:13+01:00",
s3Bucket: exampleAwsS3Bucket.id,
tableArn: exampleAwsDynamodbTable.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.dynamodb.TableExport("example",
export_time="2023-04-02T11:30:13+01:00",
s3_bucket=example_aws_s3_bucket["id"],
table_arn=example_aws_dynamodb_table["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DynamoDB.TableExport("example", new()
{
ExportTime = "2023-04-02T11:30:13+01:00",
S3Bucket = exampleAwsS3Bucket.Id,
TableArn = exampleAwsDynamodbTable.Arn,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dynamodb.NewTableExport(ctx, "example", &dynamodb.TableExportArgs{
ExportTime: pulumi.String("2023-04-02T11:30:13+01:00"),
S3Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
TableArn: pulumi.Any(exampleAwsDynamodbTable.Arn),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dynamodb.TableExport;
import com.pulumi.aws.dynamodb.TableExportArgs;
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 TableExport("example", TableExportArgs.builder()
.exportTime("2023-04-02T11:30:13+01:00")
.s3Bucket(exampleAwsS3Bucket.id())
.tableArn(exampleAwsDynamodbTable.arn())
.build());
}
}
resources:
example:
type: aws:dynamodb:TableExport
properties:
exportTime: 2023-04-02T11:30:13+01:00
s3Bucket: ${exampleAwsS3Bucket.id}
tableArn: ${exampleAwsDynamodbTable.arn}

Incremental export

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.dynamodb.TableExport("example", {
exportType: "INCREMENTAL_EXPORT",
s3Bucket: exampleAwsS3Bucket.id,
tableArn: exampleAwsDynamodbTable.arn,
incrementalExportSpecification: {
exportFromTime: "2025-02-09T12:00:00+01:00",
exportToTime: "2025-02-09T13:00:00+01:00",
},
});
import pulumi
import pulumi_aws as aws
example = aws.dynamodb.TableExport("example",
export_type="INCREMENTAL_EXPORT",
s3_bucket=example_aws_s3_bucket["id"],
table_arn=example_aws_dynamodb_table["arn"],
incremental_export_specification={
"export_from_time": "2025-02-09T12:00:00+01:00",
"export_to_time": "2025-02-09T13:00:00+01:00",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DynamoDB.TableExport("example", new()
{
ExportType = "INCREMENTAL_EXPORT",
S3Bucket = exampleAwsS3Bucket.Id,
TableArn = exampleAwsDynamodbTable.Arn,
IncrementalExportSpecification = new Aws.DynamoDB.Inputs.TableExportIncrementalExportSpecificationArgs
{
ExportFromTime = "2025-02-09T12:00:00+01:00",
ExportToTime = "2025-02-09T13:00:00+01:00",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dynamodb.NewTableExport(ctx, "example", &dynamodb.TableExportArgs{
ExportType: pulumi.String("INCREMENTAL_EXPORT"),
S3Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
TableArn: pulumi.Any(exampleAwsDynamodbTable.Arn),
IncrementalExportSpecification: &dynamodb.TableExportIncrementalExportSpecificationArgs{
ExportFromTime: pulumi.String("2025-02-09T12:00:00+01:00"),
ExportToTime: pulumi.String("2025-02-09T13:00:00+01:00"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dynamodb.TableExport;
import com.pulumi.aws.dynamodb.TableExportArgs;
import com.pulumi.aws.dynamodb.inputs.TableExportIncrementalExportSpecificationArgs;
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 TableExport("example", TableExportArgs.builder()
.exportType("INCREMENTAL_EXPORT")
.s3Bucket(exampleAwsS3Bucket.id())
.tableArn(exampleAwsDynamodbTable.arn())
.incrementalExportSpecification(TableExportIncrementalExportSpecificationArgs.builder()
.exportFromTime("2025-02-09T12:00:00+01:00")
.exportToTime("2025-02-09T13:00:00+01:00")
.build())
.build());
}
}
resources:
example:
type: aws:dynamodb:TableExport
properties:
exportType: INCREMENTAL_EXPORT
s3Bucket: ${exampleAwsS3Bucket.id}
tableArn: ${exampleAwsDynamodbTable.arn}
incrementalExportSpecification:
exportFromTime: 2025-02-09T12:00:00+01:00
exportToTime: 2025-02-09T13:00:00+01:00

Import

Using pulumi import, import DynamoDB table exports using the arn. For example:

$ pulumi import aws:dynamodb/tableExport:TableExport example arn:aws:dynamodb:us-west-2:12345678911:table/my-table-1/export/01580735656614-2c2f422e

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the Table Export.

Link copied to clipboard
val billedSizeInBytes: Output<Int>

Billable size of the table export.

Link copied to clipboard
val endTime: Output<String>

Time at which the export task completed.

Link copied to clipboard
val exportFormat: Output<String>?

Format for the exported data. Valid values are: DYNAMODB_JSON, ION. See the AWS Documentation for more information on these export formats. Default is DYNAMODB_JSON.

Link copied to clipboard
val exportStatus: Output<String>

Status of the export - export can be in one of the following states IN_PROGRESS, COMPLETED, or FAILED.

Link copied to clipboard
val exportTime: Output<String>

Time in RFC3339 format from which to export table data. The table export will be a snapshot of the table's state at this point in time. Omitting this value will result in a snapshot from the current time.

Link copied to clipboard
val exportType: Output<String>

Whether to execute as a full export or incremental export. Valid values are: FULL_EXPORT, INCREMENTAL_EXPORT. Defaults to FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the incremental_export_specification argument must also be provided. incremental_export_specification - (Optional, Forces new resource) Parameters specific to an incremental export. See incremental_export_specification Block for details.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val itemCount: Output<Int>

Number of items exported.

Link copied to clipboard

Name of the manifest file for the export task. See the AWS Documentation for more information on this manifest file.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val s3Bucket: Output<String>

Name of the Amazon S3 bucket to export the snapshot to. See the AWS Documentation for information on how configure this S3 bucket.

Link copied to clipboard
val s3BucketOwner: Output<String>

ID of the AWS account that owns the bucket the export will be stored in.

Link copied to clipboard
val s3Prefix: Output<String>

Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.

Link copied to clipboard
val s3SseAlgorithm: Output<String>

Type of encryption used on the bucket where export data will be stored. Valid values are: AES256, KMS.

Link copied to clipboard
val s3SseKmsKeyId: Output<String>?

ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).

Link copied to clipboard
val startTime: Output<String>

Time at which the export task began.

Link copied to clipboard
val tableArn: Output<String>

ARN associated with the table to export. The following arguments are optional:

Link copied to clipboard
val urn: Output<String>