list method
Lists cloud locations under a given project and location.
Request parameters:
parent
- Required. The parent, which owns this collection of cloud
locations. Format: projects/{project}/locations/{location}
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$
.
filter
- Optional. A filter expression that filters resources listed in
the response. The expression is in the form of field=value. For example,
'cloud_location_type=CLOUD_LOCATION_TYPE_REGION'. Multiple filter queries
are space-separated. For example,
'cloud_location_type=CLOUD_LOCATION_TYPE_REGION territory_code="US"' By
default, each expression is an AND expression. However, you can include
AND and OR expressions explicitly.
pageSize
- Optional. The maximum number of cloud locations to return per
page. The service might return fewer cloud locations than this value. If
unspecified, server will pick an appropriate default.
pageToken
- Optional. A token identifying a page of results the server
should return. Provide page token returned by a previous
'ListCloudLocations' call to retrieve the next page of results. When
paginating, all other parameters provided to 'ListCloudLocations' must
match the call that provided the page token.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListCloudLocationsResponse.
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<ListCloudLocationsResponse> list(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/cloudLocations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCloudLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}