startDomainExport method

Future<StartDomainExportResponse> startDomainExport({
  1. required String domainName,
  2. required String s3Bucket,
  3. String? clientToken,
  4. String? s3BucketOwner,
  5. String? s3KeyPrefix,
  6. S3SseAlgorithm? s3SseAlgorithm,
  7. String? s3SseKmsKeyId,
})

Initiates the export of a SimpleDB domain to an S3 bucket.

May throw ConflictException. May throw InvalidParameterCombinationException. May throw InvalidParameterValueException. May throw NoSuchDomainException. May throw NumberExportsLimitExceeded.

Parameter domainName : The name of the domain to export.

Parameter s3Bucket : The name of the S3 bucket where the domain data will be exported.

Parameter clientToken : Providing a ClientToken makes the call to StartDomainExport API 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, a ConflictException will be returned.

Parameter s3BucketOwner : The ID of the AWS account that owns the bucket the export will be stored in.

Parameter s3KeyPrefix : The prefix string to be used to generate the S3 object keys for export artifacts.

Parameter s3SseAlgorithm : The server-side encryption algorithm to use for the exported data in S3. Valid values are: AES256 (SSE-S3) and KMS (SSE-KMS). If not specified, bucket's default encryption will apply.

Parameter s3SseKmsKeyId : The KMS key ID to use for server-side encryption with AWS KMS-managed keys (SSE-KMS). This parameter is only expected with KMS as the S3 SSE algorithm.

Implementation

Future<StartDomainExportResponse> startDomainExport({
  required String domainName,
  required String s3Bucket,
  String? clientToken,
  String? s3BucketOwner,
  String? s3KeyPrefix,
  S3SseAlgorithm? s3SseAlgorithm,
  String? s3SseKmsKeyId,
}) async {
  final $payload = <String, dynamic>{
    'domainName': domainName,
    's3Bucket': s3Bucket,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (s3BucketOwner != null) 's3BucketOwner': s3BucketOwner,
    if (s3KeyPrefix != null) 's3KeyPrefix': s3KeyPrefix,
    if (s3SseAlgorithm != null) 's3SseAlgorithm': s3SseAlgorithm.value,
    if (s3SseKmsKeyId != null) 's3SseKmsKeyId': s3SseKmsKeyId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/StartDomainExport',
    exceptionFnMap: _exceptionFns,
  );
  return StartDomainExportResponse.fromJson(response);
}