updateTableMetadataLocation method

Future<UpdateTableMetadataLocationResponse> updateTableMetadataLocation({
  1. required String metadataLocation,
  2. required String name,
  3. required String namespace,
  4. required String tableBucketARN,
  5. required String versionToken,
})

Updates the metadata location for a table. The metadata location of a table must be an S3 URI that begins with the table's warehouse location. The metadata location for an Apache Iceberg table must end with .metadata.json, or if the metadata file is Gzip-compressed, .metadata.json.gz.

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

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

Parameter metadataLocation : The new metadata location for the table.

Parameter name : The name of the table.

Parameter namespace : The namespace of the table.

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

Parameter versionToken : The version token of the table.

Implementation

Future<UpdateTableMetadataLocationResponse> updateTableMetadataLocation({
  required String metadataLocation,
  required String name,
  required String namespace,
  required String tableBucketARN,
  required String versionToken,
}) async {
  final $payload = <String, dynamic>{
    'metadataLocation': metadataLocation,
    'versionToken': versionToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/tables/${Uri.encodeComponent(tableBucketARN)}/${Uri.encodeComponent(namespace)}/${Uri.encodeComponent(name)}/metadata-location',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateTableMetadataLocationResponse.fromJson(response);
}