putTableReplication method

Future<PutTableReplicationResponse> putTableReplication({
  1. required TableReplicationConfiguration configuration,
  2. required String tableArn,
  3. String? versionToken,
})

Creates or updates the replication configuration for a specific table. This operation allows you to define table-level replication independently of bucket-level replication, providing granular control over which tables are replicated and where.

Permissions
  • You must have the s3tables:PutTableReplication permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source table and write to all destination tables.
  • You must also have the following permissions:
    • s3tables:GetTable permission on the source table being replicated.
    • s3tables:CreateTable permission for the destination.
    • s3tables:CreateNamespace permission for the destination.
    • s3tables:GetTableMaintenanceConfig permission for the source table.
    • s3tables:PutTableMaintenanceConfig permission for the destination table.
  • 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 to the table, including the IAM role and replication rules.

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

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

Implementation

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