list method
Lists all tables served from a specified instance.
Request parameters:
parent
- Required. The unique name of the instance for which tables
should be listed. Values are of the form
projects/{project}/instances/{instance}
.
Value must have pattern ^projects/\[^/\]+/instances/\[^/\]+$
.
pageSize
- Maximum number of results per page. A page_size of zero lets
the server choose the number of items to return. A page_size which is
strictly positive will return at most that many items. A negative
page_size will cause an error. Following the first request, subsequent
paginated calls are not required to pass a page_size. If a page_size is
set in subsequent calls, it must match the page_size given in the first
request.
pageToken
- The value of next_page_token
returned by a previous call.
view
- The view to be applied to the returned tables' fields. Only
NAME_ONLY view (default), REPLICATION_VIEW and ENCRYPTION_VIEW are
supported.
Possible string values are:
- "VIEW_UNSPECIFIED" : Uses the default view for each method as documented in its request.
- "NAME_ONLY" : Only populates
name
. - "SCHEMA_VIEW" : Only populates
name
and fields related to the table's schema. - "REPLICATION_VIEW" : Only populates
name
and fields related to the table's replication state. - "ENCRYPTION_VIEW" : Only populates
name
and fields related to the table's encryption state. - "STATS_VIEW" : Only populates
name
and fields related to the table's stats (e.g. TableStats and ColumnFamilyStats). - "FULL" : Populates all fields except for stats. See STATS_VIEW to request stats.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListTablesResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ListTablesResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/tables';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListTablesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}