Table Export
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,
});Content copied to clipboard
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=[aws.dynamodb.TableAttributeArgs(
name="user_id",
type="S",
)],
point_in_time_recovery=aws.dynamodb.TablePointInTimeRecoveryArgs(
enabled=True,
))
example_table_export = aws.dynamodb.TableExport("example",
table_arn=example_table.arn,
s3_bucket=example.id)Content copied to clipboard
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,
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
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}Content copied to clipboard
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,
});Content copied to clipboard
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"])Content copied to clipboard
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,
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
resources:
example:
type: aws:dynamodb:TableExport
properties:
exportTime: 2023-04-02T11:30:13+01:00
s3Bucket: ${exampleAwsS3Bucket.id}
tableArn: ${exampleAwsDynamodbTable.arn}Content copied to clipboard
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-2c2f422eContent copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Format for the exported data. Valid values are DYNAMODB_JSON or ION. See the AWS Documentation for more information on these export formats. Default is DYNAMODB_JSON.
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
Name of the Amazon S3 bucket to export the snapshot to. See the AWS Documentation for information on how configure this S3 bucket.