ListBackups method
Lists all backups associated with the project.
Request parameters:
parent - Required. The parent that owns this collection of backups.
Format: projects/{project}
Value must have pattern ^projects/\[^/\]+$.
filter - Multiple filter queries are separated by spaces. For example,
'instance:abc AND type:FINAL, 'location:us',
'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
type, instance, backupInterval.startTime (creation time), or location.
pageSize - The maximum number of backups to return per response. The
service might return fewer backups than this value. If a value for this
parameter isn't specified, then, at most, 500 backups are returned. The
maximum value is 2,000. Any values that you set, which are greater than
2,000, are changed to 2,000.
pageToken - A page token, received from a previous ListBackups call.
Provide this to retrieve the subsequent page. When paginating, all other
parameters provided to ListBackups must match the call that provided the
page token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListBackupsResponse.
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<ListBackupsResponse> ListBackups(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/backups';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBackupsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}