get method

Future<BackupVault> get(
  1. String name, {
  2. String? view,
  3. String? $fields,
})

Gets details of a BackupVault.

Request parameters:

name - Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/backupVaults/\[^/\]+$.

view - Optional. Reserved for future use to provide a BASIC & FULL view of Backup Vault Possible string values are:

  • "BACKUP_VAULT_VIEW_UNSPECIFIED" : If the value is not set, the default 'FULL' view is used.
  • "BACKUP_VAULT_VIEW_BASIC" : Includes basic data about the Backup Vault, but not the full contents.
  • "BACKUP_VAULT_VIEW_FULL" : Includes all data about the Backup Vault. This is the default value (for both ListBackupVaults and GetBackupVault).

$fields - Selector specifying which fields to include in a partial response.

Completes with a BackupVault.

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<BackupVault> 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_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return BackupVault.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}