Table Export Args
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=[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)
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}
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
Constructors
Properties
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
.
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.
Name of the Amazon S3 bucket to export the snapshot to. See the AWS Documentation for information on how configure this S3 bucket.
ID of the AWS account that owns the bucket the export will be stored in.
Type of encryption used on the bucket where export data will be stored. Valid values are: AES256
, KMS
.
ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).