renameTable method

Future<void> renameTable({
  1. required String name,
  2. required String namespace,
  3. required String tableBucketARN,
  4. String? newName,
  5. String? newNamespaceName,
  6. String? versionToken,
})

Renames a table or a namespace. For more information, see S3 Tables in the Amazon Simple Storage Service User Guide.

Permissions
You must have the s3tables:RenameTable permission to use this operation.

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

Parameter name : The current name of the table.

Parameter namespace : The namespace associated with the table.

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

Parameter newName : The new name for the table.

Parameter newNamespaceName : The new name for the namespace.

Parameter versionToken : The version token of the table.

Implementation

Future<void> renameTable({
  required String name,
  required String namespace,
  required String tableBucketARN,
  String? newName,
  String? newNamespaceName,
  String? versionToken,
}) async {
  final $payload = <String, dynamic>{
    if (newName != null) 'newName': newName,
    if (newNamespaceName != null) 'newNamespaceName': newNamespaceName,
    if (versionToken != null) 'versionToken': versionToken,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/tables/${Uri.encodeComponent(tableBucketARN)}/${Uri.encodeComponent(namespace)}/${Uri.encodeComponent(name)}/rename',
    exceptionFnMap: _exceptionFns,
  );
}