putTableBucketReplication method

Future<PutTableBucketReplicationResponse> putTableBucketReplication({
  1. required TableBucketReplicationConfiguration configuration,
  2. required String tableBucketARN,
  3. String? versionToken,
})

Creates or updates the replication configuration for a table bucket. This operation defines how tables in the source bucket are replicated to destination buckets. Replication helps ensure data availability and disaster recovery across regions or accounts.

Permissions
  • You must have the s3tables:PutTableBucketReplication permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source bucket and write permissions to all destination buckets.
  • You must also have the following permissions:
    • s3tables:GetTable permission on the source table.
    • s3tables:ListTables permission on the bucket containing the table.
    • s3tables:CreateTable permission for the destination.
    • s3tables:CreateNamespace permission for the destination.
    • s3tables:GetTableMaintenanceConfig permission for the source bucket.
    • s3tables:PutTableMaintenanceConfig permission for the destination bucket.
  • You must have iam:PassRole permission with condition allowing roles to be passed to replication.s3tables.amazonaws.com.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter configuration : The replication configuration to apply, including the IAM role and replication rules.

Parameter tableBucketARN : The Amazon Resource Name (ARN) of the source table bucket.

Parameter versionToken : A version token from a previous GetTableBucketReplication call. Use this token to ensure you're updating the expected version of the configuration.

Implementation

Future<PutTableBucketReplicationResponse> putTableBucketReplication({
  required TableBucketReplicationConfiguration configuration,
  required String tableBucketARN,
  String? versionToken,
}) async {
  final $query = <String, List<String>>{
    'tableBucketARN': [tableBucketARN],
    if (versionToken != null) 'versionToken': [versionToken],
  };
  final $payload = <String, dynamic>{
    'configuration': configuration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/table-bucket-replication',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return PutTableBucketReplicationResponse.fromJson(response);
}