get method
Gets metadata information about the specified table.
Request parameters:
name
- Required. The unique name of the requested table. Values are of
the form projects/{project}/instances/{instance}/tables/{table}
.
Value must have pattern
^projects/\[^/\]+/instances/\[^/\]+/tables/\[^/\]+$
.
view
- The view to be applied to the returned table's fields. Defaults
to SCHEMA_VIEW
if unspecified.
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 Table.
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<Table> get(
core.String name, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Table.fromJson(response_ as core.Map<core.String, core.dynamic>);
}