Package com.pulumi.aws.dynamodb
Class TableExport
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.dynamodb.TableExport
-
public class TableExport extends com.pulumi.resources.CustomResourceResource for managing an AWS DynamoDB Table Export. Terraform will wait until the Table export reaches a status of `COMPLETED` or `FAILED`. See the [AWS Documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataExport.HowItWorks.html) for more information on how this process works. > **TIP:** Point-in-time Recovery must be enabled on the target DynamoDB Table. > **NOTE:** Once a AWS DynamoDB Table Export has been created it is immutable. The AWS API does not delete this resource. When you run destroy the provider will remove the resource from the Terraform state, no exported data will be deleted. ## Example Usage ### Basic Usage
### Example with export timepackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.s3.Bucket; import com.pulumi.aws.s3.BucketArgs; import com.pulumi.aws.dynamodb.Table; import com.pulumi.aws.dynamodb.TableArgs; import com.pulumi.aws.dynamodb.inputs.TablePointInTimeRecoveryArgs; import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs; import com.pulumi.aws.dynamodb.TableExport; import com.pulumi.aws.dynamodb.TableExportArgs; 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 Bucket("example", BucketArgs.builder() .bucketPrefix("example") .forceDestroy(true) .build()); var exampleTable = new Table("exampleTable", TableArgs.builder() .pointInTimeRecovery(TablePointInTimeRecoveryArgs.builder() .enabled(true) .build()) .attributes(TableAttributeArgs.builder() .name("user_id") .type("S") .build()) .name("example-table-1") .billingMode("PAY_PER_REQUEST") .hashKey("user_id") .build()); var exampleTableExport = new TableExport("exampleTableExport", TableExportArgs.builder() .tableArn(exampleTable.arn()) .s3Bucket(example.id()) .build()); } }
### Incremental exportpackage 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.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 TableExport("example", TableExportArgs.builder() .exportTime("2023-04-02T11:30:13+01:00") .s3Bucket(exampleAwsS3Bucket.id()) .tableArn(exampleAwsDynamodbTable.arn()) .build()); } }
## Import ### Identity Schema #### Required - `arn` (String) ARN of the DynamoDB table export. Using `pulumi import`, import DynamoDB table exports using the `arn`. For example: ```sh $ pulumi import aws:dynamodb/tableExport:TableExport example arn:aws:dynamodb:us-west-2:12345678911:table/my-table-1/export/01580735656614-2c2f422e ```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.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 TableExport("example", TableExportArgs.builder() .incrementalExportSpecification(TableExportIncrementalExportSpecificationArgs.builder() .exportFromTime("2025-02-09T12:00:00+01:00") .exportToTime("2025-02-09T13:00:00+01:00") .build()) .exportType("INCREMENTAL_EXPORT") .s3Bucket(exampleAwsS3Bucket.id()) .tableArn(exampleAwsDynamodbTable.arn()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description TableExport(java.lang.String name)TableExport(java.lang.String name, TableExportArgs args)TableExport(java.lang.String name, TableExportArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.Integer>billedSizeInBytes()com.pulumi.core.Output<java.lang.String>endTime()com.pulumi.core.Output<java.util.Optional<java.lang.String>>exportFormat()com.pulumi.core.Output<java.lang.String>exportStatus()com.pulumi.core.Output<java.lang.String>exportTime()com.pulumi.core.Output<java.lang.String>exportType()static TableExportget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TableExportState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<TableExportIncrementalExportSpecification>>incrementalExportSpecification()com.pulumi.core.Output<java.lang.Integer>itemCount()com.pulumi.core.Output<java.lang.String>manifestFilesS3Key()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>s3Bucket()com.pulumi.core.Output<java.lang.String>s3BucketOwner()com.pulumi.core.Output<java.lang.String>s3Prefix()com.pulumi.core.Output<java.lang.String>s3SseAlgorithm()com.pulumi.core.Output<java.util.Optional<java.lang.String>>s3SseKmsKeyId()com.pulumi.core.Output<java.lang.String>startTime()com.pulumi.core.Output<java.lang.String>tableArn()
-
-
-
Constructor Detail
-
TableExport
public TableExport(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
TableExport
public TableExport(java.lang.String name, TableExportArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
TableExport
public TableExport(java.lang.String name, TableExportArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the Table Export.
-
billedSizeInBytes
public com.pulumi.core.Output<java.lang.Integer> billedSizeInBytes()
- Returns:
- Billable size of the table export.
-
endTime
public com.pulumi.core.Output<java.lang.String> endTime()
- Returns:
- Time at which the export task completed.
-
exportFormat
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> exportFormat()
- Returns:
- Format for the exported data. Valid values are: `DYNAMODB_JSON`, `ION`. See the [AWS Documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataExport.Output.html#S3DataExport.Output_Data) for more information on these export formats. Default is `DYNAMODB_JSON`.
-
exportStatus
public com.pulumi.core.Output<java.lang.String> exportStatus()
- Returns:
- Status of the export - export can be in one of the following states `IN_PROGRESS`, `COMPLETED`, or `FAILED`.
-
exportTime
public com.pulumi.core.Output<java.lang.String> exportTime()
- Returns:
- 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.
-
exportType
public com.pulumi.core.Output<java.lang.String> exportType()
- Returns:
- 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 `incrementalExportSpecification` argument must also be provided. `incrementalExportSpecification` - (Optional, Forces new resource) Parameters specific to an incremental export. See `incrementalExportSpecification` Block for details.
-
incrementalExportSpecification
public com.pulumi.core.Output<java.util.Optional<TableExportIncrementalExportSpecification>> incrementalExportSpecification()
-
itemCount
public com.pulumi.core.Output<java.lang.Integer> itemCount()
- Returns:
- Number of items exported.
-
manifestFilesS3Key
public com.pulumi.core.Output<java.lang.String> manifestFilesS3Key()
- Returns:
- Name of the manifest file for the export task. See the [AWS Documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataExport.Output.html#S3DataExport.Output_Manifest) for more information on this manifest file.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
s3Bucket
public com.pulumi.core.Output<java.lang.String> s3Bucket()
- Returns:
- Name of the Amazon S3 bucket to export the snapshot to. See the [AWS Documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataExport_Requesting.html#S3DataExport_Requesting_Permissions) for information on how configure this S3 bucket.
-
s3BucketOwner
public com.pulumi.core.Output<java.lang.String> s3BucketOwner()
- Returns:
- ID of the AWS account that owns the bucket the export will be stored in.
-
s3Prefix
public com.pulumi.core.Output<java.lang.String> s3Prefix()
- Returns:
- Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.
-
s3SseAlgorithm
public com.pulumi.core.Output<java.lang.String> s3SseAlgorithm()
- Returns:
- Type of encryption used on the bucket where export data will be stored. Valid values are: `AES256`, `KMS`.
-
s3SseKmsKeyId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3SseKmsKeyId()
- Returns:
- ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).
-
startTime
public com.pulumi.core.Output<java.lang.String> startTime()
- Returns:
- Time at which the export task began.
-
tableArn
public com.pulumi.core.Output<java.lang.String> tableArn()
- Returns:
- ARN associated with the table to export. The following arguments are optional:
-
get
public static TableExport get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TableExportState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-