exportTableToPointInTime method
- required String s3Bucket,
- required String tableArn,
- String? clientToken,
- ExportFormat? exportFormat,
- DateTime? exportTime,
- ExportType? exportType,
- IncrementalExportSpecification? incrementalExportSpecification,
- String? s3BucketOwner,
- String? s3Prefix,
- S3SseAlgorithm? s3SseAlgorithm,
- String? s3SseKmsKeyId,
Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.
May throw ExportConflictException.
May throw InternalServerError.
May throw InvalidExportTimeException.
May throw LimitExceededException.
May throw PointInTimeRecoveryUnavailableException.
May throw TableNotFoundException.
Parameter s3Bucket :
The name of the Amazon S3 bucket to export the snapshot to.
Parameter tableArn :
The Amazon Resource Name (ARN) associated with the table to export.
Parameter clientToken :
Providing a ClientToken makes the call to
ExportTableToPointInTimeInput idempotent, meaning that
multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent.
If you submit a request with the same client token but a change in other
parameters within the 8-hour idempotency window, DynamoDB returns an
ExportConflictException.
Parameter exportFormat :
The format for the exported data. Valid values for
ExportFormat are DYNAMODB_JSON or
ION.
Parameter exportTime :
Time in the past from which to export table data, counted in seconds from
the start of the Unix epoch. The table export will be a snapshot of the
table's state at this point in time.
Parameter exportType :
Choice of whether to execute as a full export or incremental export. Valid
values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is
FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the
IncrementalExportSpecification must also be used.
Parameter incrementalExportSpecification :
Optional object containing the parameters specific to an incremental
export.
Parameter s3BucketOwner :
The ID of the Amazon Web Services account that owns the bucket the export
will be stored in.
Parameter s3Prefix :
The Amazon S3 bucket prefix to use as the file name and path of the
exported snapshot.
Parameter s3SseAlgorithm :
Type of encryption used on the bucket where export data will be stored.
Valid values for S3SseAlgorithm are:
-
AES256- server-side encryption with Amazon S3 managed keys -
KMS- server-side encryption with KMS managed keys
Parameter s3SseKmsKeyId :
The ID of the KMS managed key used to encrypt the S3 bucket where export
data will be stored (if applicable).
Implementation
Future<ExportTableToPointInTimeOutput> exportTableToPointInTime({
required String s3Bucket,
required String tableArn,
String? clientToken,
ExportFormat? exportFormat,
DateTime? exportTime,
ExportType? exportType,
IncrementalExportSpecification? incrementalExportSpecification,
String? s3BucketOwner,
String? s3Prefix,
S3SseAlgorithm? s3SseAlgorithm,
String? s3SseKmsKeyId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDB_20120810.ExportTableToPointInTime'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'S3Bucket': s3Bucket,
'TableArn': tableArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (exportFormat != null) 'ExportFormat': exportFormat.value,
if (exportTime != null) 'ExportTime': unixTimestampToJson(exportTime),
if (exportType != null) 'ExportType': exportType.value,
if (incrementalExportSpecification != null)
'IncrementalExportSpecification': incrementalExportSpecification,
if (s3BucketOwner != null) 'S3BucketOwner': s3BucketOwner,
if (s3Prefix != null) 'S3Prefix': s3Prefix,
if (s3SseAlgorithm != null) 'S3SseAlgorithm': s3SseAlgorithm.value,
if (s3SseKmsKeyId != null) 'S3SseKmsKeyId': s3SseKmsKeyId,
},
);
return ExportTableToPointInTimeOutput.fromJson(jsonResponse.body);
}