com.pulumi.aws.dynamodb.TableExport Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.dynamodb;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.dynamodb.TableExportArgs;
import com.pulumi.aws.dynamodb.inputs.TableExportState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Example with export time
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* 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
* ```
*
*/
@ResourceType(type="aws:dynamodb/tableExport:TableExport")
public class TableExport extends com.pulumi.resources.CustomResource {
/**
* ARN of the Table Export.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return ARN of the Table Export.
*
*/
public Output arn() {
return this.arn;
}
/**
* Billable size of the table export.
*
*/
@Export(name="billedSizeInBytes", refs={Integer.class}, tree="[0]")
private Output billedSizeInBytes;
/**
* @return Billable size of the table export.
*
*/
public Output billedSizeInBytes() {
return this.billedSizeInBytes;
}
/**
* Time at which the export task completed.
*
*/
@Export(name="endTime", refs={String.class}, tree="[0]")
private Output endTime;
/**
* @return Time at which the export task completed.
*
*/
public Output endTime() {
return this.endTime;
}
/**
* Format for the exported data. Valid values are `DYNAMODB_JSON` or `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`.
*
*/
@Export(name="exportFormat", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> exportFormat;
/**
* @return Format for the exported data. Valid values are `DYNAMODB_JSON` or `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`.
*
*/
public Output> exportFormat() {
return Codegen.optional(this.exportFormat);
}
/**
* Status of the export - export can be in one of the following states `IN_PROGRESS`, `COMPLETED`, or `FAILED`.
*
*/
@Export(name="exportStatus", refs={String.class}, tree="[0]")
private Output exportStatus;
/**
* @return Status of the export - export can be in one of the following states `IN_PROGRESS`, `COMPLETED`, or `FAILED`.
*
*/
public Output exportStatus() {
return this.exportStatus;
}
/**
* 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.
*
*/
@Export(name="exportTime", refs={String.class}, tree="[0]")
private Output exportTime;
/**
* @return 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.
*
*/
public Output exportTime() {
return this.exportTime;
}
/**
* Number of items exported.
*
*/
@Export(name="itemCount", refs={Integer.class}, tree="[0]")
private Output itemCount;
/**
* @return Number of items exported.
*
*/
public Output itemCount() {
return this.itemCount;
}
/**
* 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.
*
*/
@Export(name="manifestFilesS3Key", refs={String.class}, tree="[0]")
private Output manifestFilesS3Key;
/**
* @return 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.
*
*/
public Output manifestFilesS3Key() {
return this.manifestFilesS3Key;
}
/**
* 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.
*
*/
@Export(name="s3Bucket", refs={String.class}, tree="[0]")
private Output s3Bucket;
/**
* @return 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.
*
*/
public Output s3Bucket() {
return this.s3Bucket;
}
/**
* ID of the AWS account that owns the bucket the export will be stored in.
*
*/
@Export(name="s3BucketOwner", refs={String.class}, tree="[0]")
private Output s3BucketOwner;
/**
* @return ID of the AWS account that owns the bucket the export will be stored in.
*
*/
public Output s3BucketOwner() {
return this.s3BucketOwner;
}
/**
* Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.
*
*/
@Export(name="s3Prefix", refs={String.class}, tree="[0]")
private Output s3Prefix;
/**
* @return Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.
*
*/
public Output s3Prefix() {
return this.s3Prefix;
}
/**
* Type of encryption used on the bucket where export data will be stored. Valid values are: `AES256`, `KMS`.
*
*/
@Export(name="s3SseAlgorithm", refs={String.class}, tree="[0]")
private Output s3SseAlgorithm;
/**
* @return Type of encryption used on the bucket where export data will be stored. Valid values are: `AES256`, `KMS`.
*
*/
public Output s3SseAlgorithm() {
return this.s3SseAlgorithm;
}
/**
* ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).
*
*/
@Export(name="s3SseKmsKeyId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> s3SseKmsKeyId;
/**
* @return ID of the AWS KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).
*
*/
public Output> s3SseKmsKeyId() {
return Codegen.optional(this.s3SseKmsKeyId);
}
/**
* Time at which the export task began.
*
*/
@Export(name="startTime", refs={String.class}, tree="[0]")
private Output startTime;
/**
* @return Time at which the export task began.
*
*/
public Output startTime() {
return this.startTime;
}
/**
* ARN associated with the table to export.
*
* The following arguments are optional:
*
*/
@Export(name="tableArn", refs={String.class}, tree="[0]")
private Output tableArn;
/**
* @return ARN associated with the table to export.
*
* The following arguments are optional:
*
*/
public Output tableArn() {
return this.tableArn;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public TableExport(java.lang.String name) {
this(name, TableExportArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public TableExport(java.lang.String name, TableExportArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public TableExport(java.lang.String name, TableExportArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:dynamodb/tableExport:TableExport", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private TableExport(java.lang.String name, Output id, @Nullable TableExportState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:dynamodb/tableExport:TableExport", name, state, makeResourceOptions(options, id), false);
}
private static TableExportArgs makeArgs(TableExportArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? TableExportArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static TableExport get(java.lang.String name, Output id, @Nullable TableExportState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new TableExport(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy