list method
Lists the valid Google Cloud Platform (GCP) resource locations for the specified Project (including a FirebaseProject).
One of these locations can be selected as the Project's
default GCP resource location,
which is the geographical location where the Project's resources, such as
Cloud Firestore, will be provisioned by default. However, if the default
GCP resource location has already been set for the Project, then this
setting cannot be changed. This call checks for any possible
location restrictions
for the specified Project and, thus, might return a subset of all possible
GCP resource locations. To list all GCP resource locations (regardless of
any restrictions), call the endpoint without specifying a unique project
identifier (that is,
/v1beta1/{parent=projects/-}/listAvailableLocations
). To call
ListAvailableLocations
with a specified project, a member must be at
minimum a Viewer of the Project. Calls without a specified project do not
require any specific project permissions.
Request parameters:
parent
- The FirebaseProject for which to list GCP resource locations,
in the format: projects/PROJECT_IDENTIFIER Refer to the FirebaseProject
[name
](../projects#FirebaseProject.FIELDS.name) field for details
about PROJECT_IDENTIFIER values. If no unique project identifier is
specified (that is, projects/-
), the returned list does not take into
account org-specific or project-specific location restrictions.
Value must have pattern ^projects/\[^/\]+$
.
pageSize
- The maximum number of locations to return in the response.
The server may return fewer than this value at its discretion. If no value
is specified (or too large a value is specified), then the server will
impose its own limit. This value cannot be negative.
pageToken
- Token returned from a previous call to
ListAvailableLocations
indicating where in the list of locations to
resume listing.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListAvailableLocationsResponse.
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<ListAvailableLocationsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final _url =
'v1beta1/' + core.Uri.encodeFull('$parent') + '/availableLocations';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return ListAvailableLocationsResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}