Class v1.BackupForGKEClient (0.2.2)

BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters. v1

Package

@google-cloud/gke-backup

Constructors

(constructor)(opts, gaxInstance)

  constructor 
 ( 
 opts 
 ?: 
  
 ClientOptions 
 , 
  
 gaxInstance 
 ?: 
  
 typeof 
  
 gax 
  
 | 
  
 typeof 
  
 gax 
 . 
 fallback 
 ); 
 

Construct an instance of BackupForGKEClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: loaded instance of google-gax . Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new BackupForGKEClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

  static 
  
 get 
  
 apiEndpoint 
 () 
 : 
  
 string 
 ; 
 

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

  auth 
 : 
  
 gax 
 . 
 GoogleAuth 
 ; 
 

backupForGKEStub

  backupForGKEStub 
 ?: 
  
 Promise 
< { 
  
 [ 
 name 
 : 
  
 string 
 ] 
 : 
  
 Function 
 ; 
  
 }>; 
 

descriptors

  descriptors 
 : 
  
 Descriptors 
 ; 
 

innerApiCalls

  innerApiCalls 
 : 
  
 { 
  
 [ 
 name 
 : 
  
 string 
 ] 
 : 
  
 Function 
 ; 
  
 }; 
 

operationsClient

  operationsClient 
 : 
  
 gax 
 . 
 OperationsClient 
 ; 
 

pathTemplates

  pathTemplates 
 : 
  
 { 
  
 [ 
 name 
 : 
  
 string 
 ] 
 : 
  
 gax 
 . 
 PathTemplate 
 ; 
  
 }; 
 

port

  static 
  
 get 
  
 port 
 () 
 : 
  
 number 
 ; 
 

The port for this API service.

scopes

  static 
  
 get 
  
 scopes 
 () 
 : 
  
 string 
 []; 
 

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

  static 
  
 get 
  
 servicePath 
 () 
 : 
  
 string 
 ; 
 

The DNS address for this API service.

warn

  warn 
 : 
  
 ( 
 code 
 : 
  
 string 
 , 
  
 message 
 : 
  
 string 
 , 
  
 warnType 
 ?: 
  
 string 
 ) 
  
 = 
>  
 void 
 ; 
 

Methods

backupPath(project, location, backupPlan, backup)

  backupPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 backupPlan 
 : 
  
 string 
 , 
  
 backup 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified backup resource name string.

Parameters
Name Description
project string
location string
backupPlan string
backup string
Returns
Type Description
string

{string} Resource name string.

backupPlanPath(project, location, backupPlan)

  backupPlanPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 backupPlan 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified backupPlan resource name string.

Parameters
Name Description
project string
location string
backupPlan string
Returns
Type Description
string

{string} Resource name string.

checkCreateBackupPlanProgress(name)

  checkCreateBackupPlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 BackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by createBackupPlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.BackupPlan , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location within which to create the BackupPlan. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The BackupPlan resource object to create. 
 */ 
  
 // const backupPlan = {} 
  
 /** 
 *  Required. The client-provided short name for the BackupPlan resource. 
 *  This name must: 
 *  - be between 1 and 63 characters long (inclusive) 
 *  - consist of only lower-case ASCII letters, numbers, and dashes 
 *  - start with a lower-case letter 
 *  - end with a lower-case letter or number 
 *  - be unique within the set of BackupPlans in this location 
 */ 
  
 // const backupPlanId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 backupPlan 
 , 
  
 backupPlanId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateBackupPlan 
 (); 
 

checkCreateBackupProgress(name)

  checkCreateBackupProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 Backup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by createBackup() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.Backup , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The BackupPlan within which to create the Backup. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The Backup resource to create. 
 */ 
  
 // const backup = {} 
  
 /** 
 *  The client-provided short name for the Backup resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of Backups in this BackupPlan 
 */ 
  
 // const backupId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateBackup 
 (); 
 

checkCreateRestorePlanProgress(name)

  checkCreateRestorePlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 RestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by createRestorePlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.RestorePlan , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location within which to create the RestorePlan. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The RestorePlan resource object to create. 
 */ 
  
 // const restorePlan = {} 
  
 /** 
 *  Required. The client-provided short name for the RestorePlan resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of RestorePlans in this location 
 */ 
  
 // const restorePlanId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 restorePlan 
 , 
  
 restorePlanId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateRestorePlan 
 (); 
 

checkCreateRestoreProgress(name)

  checkCreateRestoreProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 Restore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by createRestore() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.Restore , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The RestorePlan within which to create the Restore. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The restore resource to create. 
 */ 
  
 // const restore = {} 
  
 /** 
 *  Required. The client-provided short name for the Restore resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of Restores in this RestorePlan. 
 */ 
  
 // const restoreId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 restore 
 , 
  
 restoreId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateRestore 
 (); 
 

checkDeleteBackupPlanProgress(name)

  checkDeleteBackupPlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 Empty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by deleteBackupPlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.protobuf.Empty , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified BackupPlan name. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target BackupPlan's etag google.cloud.gkebackup.v1.BackupPlan.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteBackupPlan 
 (); 
 

checkDeleteBackupProgress(name)

  checkDeleteBackupProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 Empty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by deleteBackup() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.protobuf.Empty , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Name of the Backup resource. 
 *  Format: projects/* /locations/* /backupPlans/* /backups/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target Backup's etag google.cloud.gkebackup.v1.Backup.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any VolumeBackups below this Backup will also be deleted. 
 *  Otherwise, the request will only succeed if the Backup has no 
 *  VolumeBackups. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteBackup 
 (); 
 

checkDeleteRestorePlanProgress(name)

  checkDeleteRestorePlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 Empty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by deleteRestorePlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.protobuf.Empty , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified RestorePlan name. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target RestorePlan's etag google.cloud.gkebackup.v1.RestorePlan.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any Restores below this RestorePlan will also be deleted. 
 *  Otherwise, the request will only succeed if the RestorePlan has no 
 *  Restores. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteRestorePlan 
 (); 
 

checkDeleteRestoreProgress(name)

  checkDeleteRestoreProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 Empty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by deleteRestore() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.protobuf.Empty , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Full name of the Restore 
 *  Format: projects/* /locations/* /restorePlans/* /restores/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target Restore's etag google.cloud.gkebackup.v1.Restore.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any VolumeRestores below this restore will also be deleted. 
 *  Otherwise, the request will only succeed if the restore has no 
 *  VolumeRestores. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteRestore 
 (); 
 

checkUpdateBackupPlanProgress(name)

  checkUpdateBackupPlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 BackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by updateBackupPlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.BackupPlan , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the BackupPlan resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const backupPlan = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  BackupPlan targeted for update. The values for each of these 
 *  updated fields will be taken from the `backup_plan` provided 
 *  with this request. Field names are relative to the root of the resource 
 *  (e.g., `description`, `backup_config.include_volume_data`, etc.) 
 *  If no `update_mask` is provided, all fields in `backup_plan` will be 
 *  written to the target BackupPlan resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored 
 *  and are not used to update the target BackupPlan. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 backupPlan 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateBackupPlan 
 (); 
 

checkUpdateBackupProgress(name)

  checkUpdateBackupProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 Backup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by updateBackup() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.Backup , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the Backup resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const backup = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  Backup targeted for update. The values for each of these 
 *  updated fields will be taken from the `backup_plan` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `backup` will be 
 *  written to the target Backup resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored 
 *  and are not used to update the target Backup. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 backup 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateBackup 
 (); 
 

checkUpdateRestorePlanProgress(name)

  checkUpdateRestorePlanProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 RestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by updateRestorePlan() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.RestorePlan , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the RestorePlan resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const restorePlan = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  RestorePlan targeted for update. The values for each of these 
 *  updated fields will be taken from the `restore_plan` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `restore_plan` will be 
 *  written to the target RestorePlan resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored 
 *  and are not used to update the target RestorePlan. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 restorePlan 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateRestorePlan 
 (); 
 

checkUpdateRestoreProgress(name)

  checkUpdateRestoreProgress 
 ( 
 name 
 : 
  
 string 
 ) 
 : 
  
 Promise<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 Restore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 OperationMetadata 
>> ; 
 

Check the status of the long running operation returned by updateRestore() .

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise < LROperation <protos. google.cloud.gkebackup.v1.Restore , protos. google.cloud.gkebackup.v1.OperationMetadata >>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the Restore resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const restore = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  Restore targeted for update. The values for each of these 
 *  updated fields will be taken from the `restore` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `restore` will be 
 *  written to the target Restore resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored 
 *  and are not used to update the target Restore. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 restore 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateRestore 
 (); 
 

close()

  close 
 () 
 : 
  
 Promise<void> 
 ; 
 

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise <void>

{Promise} A promise that resolves when the client is closed.

createBackup(request, options)

  createBackup 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Creates a Backup for the given BackupPlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The BackupPlan within which to create the Backup. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The Backup resource to create. 
 */ 
  
 // const backup = {} 
  
 /** 
 *  The client-provided short name for the Backup resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of Backups in this BackupPlan 
 */ 
  
 // const backupId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateBackup 
 (); 
 

createBackup(request, options, callback)

  createBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackup(request, callback)

  createBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackupPlan(request, options)

  createBackupPlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupPlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Creates a new BackupPlan in a given location.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location within which to create the BackupPlan. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The BackupPlan resource object to create. 
 */ 
  
 // const backupPlan = {} 
  
 /** 
 *  Required. The client-provided short name for the BackupPlan resource. 
 *  This name must: 
 *  - be between 1 and 63 characters long (inclusive) 
 *  - consist of only lower-case ASCII letters, numbers, and dashes 
 *  - start with a lower-case letter 
 *  - end with a lower-case letter or number 
 *  - be unique within the set of BackupPlans in this location 
 */ 
  
 // const backupPlanId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 backupPlan 
 , 
  
 backupPlanId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateBackupPlan 
 (); 
 

createBackupPlan(request, options, callback)

  createBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupPlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupPlanRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBackupPlan(request, callback)

  createBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateBackupPlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateBackupPlanRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestore(request, options)

  createRestore 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestoreRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Creates a new Restore for the given RestorePlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The RestorePlan within which to create the Restore. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The restore resource to create. 
 */ 
  
 // const restore = {} 
  
 /** 
 *  Required. The client-provided short name for the Restore resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of Restores in this RestorePlan. 
 */ 
  
 // const restoreId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 restore 
 , 
  
 restoreId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateRestore 
 (); 
 

createRestore(request, options, callback)

  createRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestoreRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestoreRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestore(request, callback)

  createRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestoreRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestoreRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestorePlan(request, options)

  createRestorePlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestorePlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Creates a new RestorePlan in a given location.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location within which to create the RestorePlan. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  Required. The RestorePlan resource object to create. 
 */ 
  
 // const restorePlan = {} 
  
 /** 
 *  Required. The client-provided short name for the RestorePlan resource. 
 *  This name must: 
 *   - be between 1 and 63 characters long (inclusive) 
 *   - consist of only lower-case ASCII letters, numbers, and dashes 
 *   - start with a lower-case letter 
 *   - end with a lower-case letter or number 
 *   - be unique within the set of RestorePlans in this location 
 */ 
  
 // const restorePlanId = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callCreateRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 restorePlan 
 , 
  
 restorePlanId 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 createRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callCreateRestorePlan 
 (); 
 

createRestorePlan(request, options, callback)

  createRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestorePlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestorePlanRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRestorePlan(request, callback)

  createRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 ICreateRestorePlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.ICreateRestorePlanRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackup(request, options)

  deleteBackup 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Deletes an existing Backup.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Name of the Backup resource. 
 *  Format: projects/* /locations/* /backupPlans/* /backups/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target Backup's etag google.cloud.gkebackup.v1.Backup.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any VolumeBackups below this Backup will also be deleted. 
 *  Otherwise, the request will only succeed if the Backup has no 
 *  VolumeBackups. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteBackup 
 (); 
 

deleteBackup(request, options, callback)

  deleteBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupRequest
options CallOptions
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackup(request, callback)

  deleteBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupRequest
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackupPlan(request, options)

  deleteBackupPlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupPlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Deletes an existing BackupPlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified BackupPlan name. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target BackupPlan's etag google.cloud.gkebackup.v1.BackupPlan.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteBackupPlan 
 (); 
 

deleteBackupPlan(request, options, callback)

  deleteBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupPlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupPlanRequest
options CallOptions
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBackupPlan(request, callback)

  deleteBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteBackupPlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteBackupPlanRequest
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestore(request, options)

  deleteRestore 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestoreRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Deletes an existing Restore.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Full name of the Restore 
 *  Format: projects/* /locations/* /restorePlans/* /restores/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target Restore's etag google.cloud.gkebackup.v1.Restore.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any VolumeRestores below this restore will also be deleted. 
 *  Otherwise, the request will only succeed if the restore has no 
 *  VolumeRestores. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteRestore 
 (); 
 

deleteRestore(request, options, callback)

  deleteRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestoreRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestoreRequest
options CallOptions
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestore(request, callback)

  deleteRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestoreRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestoreRequest
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestorePlan(request, options)

  deleteRestorePlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestorePlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Deletes an existing RestorePlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified RestorePlan name. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const name = 'abc123' 
  
 /** 
 *  If provided, this value must match the current value of the 
 *  target RestorePlan's etag google.cloud.gkebackup.v1.RestorePlan.etag  field or the request is 
 *  rejected. 
 */ 
  
 // const etag = 'abc123' 
  
 /** 
 *  If set to true, any Restores below this RestorePlan will also be deleted. 
 *  Otherwise, the request will only succeed if the RestorePlan has no 
 *  Restores. 
 */ 
  
 // const force = true 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callDeleteRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 deleteRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callDeleteRestorePlan 
 (); 
 

deleteRestorePlan(request, options, callback)

  deleteRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestorePlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestorePlanRequest
options CallOptions
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRestorePlan(request, callback)

  deleteRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IDeleteRestorePlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 protobuf 
 . 
 IEmpty 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IDeleteRestorePlanRequest
callback Callback < LROperation <protos. google.protobuf.IEmpty , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackup(request, options)

  getBackup 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the details of a single Backup.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IGetBackupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Backup]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Full name of the Backup resource. 
 *  Format: projects/* /locations/* /backupPlans/* /backups/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getBackup 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetBackup 
 (); 
 

getBackup(request, options, callback)

  getBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackup(request, callback)

  getBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupRequest
callback Callback <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlan(request, options)

  getBackupPlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the details of a single BackupPlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [BackupPlan]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified BackupPlan name. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getBackupPlan 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetBackupPlan 
 (); 
 

getBackupPlan(request, options, callback)

  getBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBackupPlan(request, callback)

  getBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetBackupPlanRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest
callback Callback <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

  getProjectId 
 () 
 : 
  
 Promise<string> 
 ; 
 
Returns
Type Description
Promise <string>

getProjectId(callback)

  getProjectId 
 ( 
 callback 
 : 
  
 Callback<string 
 , 
  
 undefined 
 , 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback Callback <string, undefined, undefined>
Returns
Type Description
void

getRestore(request, options)

  getRestore 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieves the details of a single Restore.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IGetRestoreRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Restore]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Name of the restore resource. 
 *  Format: projects/* /locations/* /restorePlans/* /restores/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getRestore 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetRestore 
 (); 
 

getRestore(request, options, callback)

  getRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestoreRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestore(request, callback)

  getRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestoreRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestoreRequest
callback Callback <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IGetRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlan(request, options)

  getRestorePlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the details of a single RestorePlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [RestorePlan]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Fully qualified RestorePlan name. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getRestorePlan 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetRestorePlan 
 (); 
 

getRestorePlan(request, options, callback)

  getRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRestorePlan(request, callback)

  getRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetRestorePlanRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest
callback Callback <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IGetRestorePlanRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeBackup(request, options)

  getVolumeBackup 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the details of a single VolumeBackup.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IVolumeBackup , protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [VolumeBackup]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Full name of the VolumeBackup resource. 
 *  Format: projects/* /locations/* /backupPlans/* /backups/* /volumeBackups/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetVolumeBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getVolumeBackup 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetVolumeBackup 
 (); 
 

getVolumeBackup(request, options, callback)

  getVolumeBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IVolumeBackup , protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeBackup(request, callback)

  getVolumeBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeBackupRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest
callback Callback <protos. google.cloud.gkebackup.v1.IVolumeBackup , protos. google.cloud.gkebackup.v1.IGetVolumeBackupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeRestore(request, options)

  getVolumeRestore 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Retrieve the details of a single VolumeRestore.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IVolumeRestore , protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [VolumeRestore]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. Full name of the VolumeRestore resource. 
 *  Format: projects/* /locations/* /restorePlans/* /restores/* /volumeRestores/* 
 */ 
  
 // const name = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callGetVolumeRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 name 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 response 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 getVolumeRestore 
 ( 
 request 
 ); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callGetVolumeRestore 
 (); 
 

getVolumeRestore(request, options, callback)

  getVolumeRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest
options CallOptions
callback Callback <protos. google.cloud.gkebackup.v1.IVolumeRestore , protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getVolumeRestore(request, callback)

  getVolumeRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
 , 
  
 callback 
 : 
  
 Callback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IGetVolumeRestoreRequest 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest
callback Callback <protos. google.cloud.gkebackup.v1.IVolumeRestore , protos. google.cloud.gkebackup.v1.IGetVolumeRestoreRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

initialize()

  initialize 
 () 
 : 
  
 Promise 
< { 
  
 [ 
 name 
 : 
  
 string 
 ] 
 : 
  
 Function 
 ; 
  
 }>; 
 

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise <{ [name: string]: Function ; }>

{Promise} A promise that resolves to an authenticated service stub.

listBackupPlans(request, options)

  listBackupPlans 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansResponse 
  
 ]>; 
 

Lists BackupPlans in a given location.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IBackupPlan [], protos. google.cloud.gkebackup.v1.IListBackupPlansRequest | null, protos. google.cloud.gkebackup.v1.IListBackupPlansResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [BackupPlan]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listBackupPlansAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listBackupPlans(request, options, callback)

  listBackupPlans 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupPlansRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListBackupPlansRequest , protos. google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos. google.cloud.gkebackup.v1.IBackupPlan >
Returns
Type Description
void

listBackupPlans(request, callback)

  listBackupPlans 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupPlansRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListBackupPlansRequest , protos. google.cloud.gkebackup.v1.IListBackupPlansResponse | null | undefined, protos. google.cloud.gkebackup.v1.IBackupPlan >
Returns
Type Description
void

listBackupPlansAsync(request, options)

  listBackupPlansAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
> ; 
 

Equivalent to listBackupPlans , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IBackupPlan >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [BackupPlan]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location that contains the BackupPlans to list. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token 
 *  received from a previous `ListBackupPlans` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to 
 *  `ListBackupPlans` must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListBackupPlans 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listBackupPlansAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListBackupPlans 
 (); 
 

listBackupPlansStream(request, options)

  listBackupPlansStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupPlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupPlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [BackupPlan] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBackupPlansAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listBackups(request, options)

  listBackups 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsResponse 
  
 ]>; 
 

Lists the Backups for a given BackupPlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IBackup [], protos. google.cloud.gkebackup.v1.IListBackupsRequest | null, protos. google.cloud.gkebackup.v1.IListBackupsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Backup]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listBackups(request, options, callback)

  listBackups 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupsRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListBackupsRequest , protos. google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos. google.cloud.gkebackup.v1.IBackup >
Returns
Type Description
void

listBackups(request, callback)

  listBackups 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupsRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListBackupsRequest , protos. google.cloud.gkebackup.v1.IListBackupsResponse | null | undefined, protos. google.cloud.gkebackup.v1.IBackup >
Returns
Type Description
void

listBackupsAsync(request, options)

  listBackupsAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
> ; 
 

Equivalent to listBackups , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IBackup >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Backup]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The BackupPlan that contains the Backups to list. 
 *  Format: projects/* /locations/* /backupPlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token 
 *  received from a previous `ListBackups` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to 
 *  `ListBackups` must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListBackups 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listBackupsAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListBackups 
 (); 
 

listBackupsStream(request, options)

  listBackupsStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Backup] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRestorePlans(request, options)

  listRestorePlans 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansResponse 
  
 ]>; 
 

Lists RestorePlans in a given location.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IRestorePlan [], protos. google.cloud.gkebackup.v1.IListRestorePlansRequest | null, protos. google.cloud.gkebackup.v1.IListRestorePlansResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [RestorePlan]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRestorePlansAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRestorePlans(request, options, callback)

  listRestorePlans 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestorePlansRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListRestorePlansRequest , protos. google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos. google.cloud.gkebackup.v1.IRestorePlan >
Returns
Type Description
void

listRestorePlans(request, callback)

  listRestorePlans 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestorePlansRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListRestorePlansRequest , protos. google.cloud.gkebackup.v1.IListRestorePlansResponse | null | undefined, protos. google.cloud.gkebackup.v1.IRestorePlan >
Returns
Type Description
void

listRestorePlansAsync(request, options)

  listRestorePlansAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
> ; 
 

Equivalent to listRestorePlans , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IRestorePlan >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [RestorePlan]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The location that contains the RestorePlans to list. 
 *  Format: projects/* /locations/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token 
 *  received from a previous `ListRestorePlans` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to 
 *  `ListRestorePlans` must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListRestorePlans 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listRestorePlansAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListRestorePlans 
 (); 
 

listRestorePlansStream(request, options)

  listRestorePlansStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestorePlansRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestorePlansRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [RestorePlan] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRestorePlansAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRestores(request, options)

  listRestores 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresResponse 
  
 ]>; 
 

Lists the Restores for a given RestorePlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IRestore [], protos. google.cloud.gkebackup.v1.IListRestoresRequest | null, protos. google.cloud.gkebackup.v1.IListRestoresResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Restore]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRestoresAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRestores(request, options, callback)

  listRestores 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestoresRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListRestoresRequest , protos. google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos. google.cloud.gkebackup.v1.IRestore >
Returns
Type Description
void

listRestores(request, callback)

  listRestores 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestoresRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListRestoresRequest , protos. google.cloud.gkebackup.v1.IListRestoresResponse | null | undefined, protos. google.cloud.gkebackup.v1.IRestore >
Returns
Type Description
void

listRestoresAsync(request, options)

  listRestoresAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
> ; 
 

Equivalent to listRestores , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IRestore >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Restore]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The RestorePlan that contains the Restores to list. 
 *  Format: projects/* /locations/* /restorePlans/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token 
 *  received from a previous `ListRestores` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to `ListRestores` 
 *  must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListRestores 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listRestoresAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListRestores 
 (); 
 

listRestoresStream(request, options)

  listRestoresStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Restore] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRestoresAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVolumeBackups(request, options)

  listVolumeBackups 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsResponse 
  
 ]>; 
 

Lists the VolumeBackups for a given Backup.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IVolumeBackup [], protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest | null, protos. google.cloud.gkebackup.v1.IListVolumeBackupsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [VolumeBackup]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listVolumeBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVolumeBackups(request, options, callback)

  listVolumeBackups 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest , protos. google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos. google.cloud.gkebackup.v1.IVolumeBackup >
Returns
Type Description
void

listVolumeBackups(request, callback)

  listVolumeBackups 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest , protos. google.cloud.gkebackup.v1.IListVolumeBackupsResponse | null | undefined, protos. google.cloud.gkebackup.v1.IVolumeBackup >
Returns
Type Description
void

listVolumeBackupsAsync(request, options)

  listVolumeBackupsAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeBackup 
> ; 
 

Equivalent to listVolumeBackups , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IVolumeBackup >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [VolumeBackup]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The Backup that contains the VolumeBackups to list. 
 *  Format: projects/* /locations/* /backupPlans/* /backups/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token 
 *  received from a previous `ListVolumeBackups` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to 
 *  `ListVolumeBackups` must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListVolumeBackups 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listVolumeBackupsAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListVolumeBackups 
 (); 
 

listVolumeBackupsStream(request, options)

  listVolumeBackupsStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeBackupsRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [VolumeBackup] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listVolumeBackupsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVolumeRestores(request, options)

  listVolumeRestores 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
 [], 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
  
 | 
  
 null 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresResponse 
  
 ]>; 
 

Lists the VolumeRestores for a given Restore.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ protos. google.cloud.gkebackup.v1.IVolumeRestore [], protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest | null, protos. google.cloud.gkebackup.v1.IListVolumeRestoresResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [VolumeRestore]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listVolumeRestoresAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listVolumeRestores(request, options, callback)

  listVolumeRestores 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest
options CallOptions
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest , protos. google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos. google.cloud.gkebackup.v1.IVolumeRestore >
Returns
Type Description
void

listVolumeRestores(request, callback)

  listVolumeRestores 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 callback 
 : 
  
 PaginationCallback<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresResponse 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest
callback PaginationCallback <protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest , protos. google.cloud.gkebackup.v1.IListVolumeRestoresResponse | null | undefined, protos. google.cloud.gkebackup.v1.IVolumeRestore >
Returns
Type Description
void

listVolumeRestoresAsync(request, options)

  listVolumeRestoresAsync 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 AsyncIterable<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IVolumeRestore 
> ; 
 

Equivalent to listVolumeRestores , but returns an iterable object.

for - await - of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable <protos. google.cloud.gkebackup.v1.IVolumeRestore >

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [VolumeRestore]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. The Restore that contains the VolumeRestores to list. 
 *  Format: projects/* /locations/* /restorePlans/* /restores/* 
 */ 
  
 // const parent = 'abc123' 
  
 /** 
 *  The target number of results to return in a single response. 
 *  If not specified, a default value will be chosen by the service. 
 *  Note that the response may inclue a partial list and a caller should 
 *  only rely on the response's 
 *  next_page_token google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token 
 *  to determine if there are more instances left to be queried. 
 */ 
  
 // const pageSize = 1234 
  
 /** 
 *  The value of 
 *  next_page_token google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token 
 *  received from a previous `ListVolumeRestores` call. 
 *  Provide this to retrieve the subsequent page in a multi-page list of 
 *  results. When paginating, all other parameters provided to 
 *  `ListVolumeRestores` must match the call that provided the page token. 
 */ 
  
 // const pageToken = 'abc123' 
  
 /** 
 *  Field match expression used to filter the results. 
 */ 
  
 // const filter = 'abc123' 
  
 /** 
 *  Field by which to sort the results. 
 */ 
  
 // const orderBy = 'abc123' 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callListVolumeRestores 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 parent 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 iterable 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
  listVolumeRestoresAsync 
 
 ( 
 request 
 ); 
  
 for 
  
 await 
  
 ( 
 const 
  
 response 
  
 of 
  
 iterable 
 ) 
  
 { 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 } 
  
 callListVolumeRestores 
 (); 
 

listVolumeRestoresStream(request, options)

  listVolumeRestoresStream 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IListVolumeRestoresRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Transform 
 ; 
 

Equivalent to method.name.toCamelCase() , but returns a NodeJS Stream object.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IListVolumeRestoresRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [VolumeRestore] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listVolumeRestoresAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

  locationPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchBackupFromBackupName(backupName)

  matchBackupFromBackupName 
 ( 
 backupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the backup from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the backup.

matchBackupFromVolumeBackupName(volumeBackupName)

  matchBackupFromVolumeBackupName 
 ( 
 volumeBackupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the backup from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the backup.

matchBackupPlanFromBackupName(backupName)

  matchBackupPlanFromBackupName 
 ( 
 backupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the backup_plan from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchBackupPlanFromBackupPlanName(backupPlanName)

  matchBackupPlanFromBackupPlanName 
 ( 
 backupPlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the backup_plan from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchBackupPlanFromVolumeBackupName(volumeBackupName)

  matchBackupPlanFromVolumeBackupName 
 ( 
 volumeBackupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the backup_plan from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the backup_plan.

matchLocationFromBackupName(backupName)

  matchLocationFromBackupName 
 ( 
 backupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromBackupPlanName(backupPlanName)

  matchLocationFromBackupPlanName 
 ( 
 backupPlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

  matchLocationFromLocationName 
 ( 
 locationName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestoreName(restoreName)

  matchLocationFromRestoreName 
 ( 
 restoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRestorePlanName(restorePlanName)

  matchLocationFromRestorePlanName 
 ( 
 restorePlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromVolumeBackupName(volumeBackupName)

  matchLocationFromVolumeBackupName 
 ( 
 volumeBackupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromVolumeRestoreName(volumeRestoreName)

  matchLocationFromVolumeRestoreName 
 ( 
 volumeRestoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the location from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromBackupName(backupName)

  matchProjectFromBackupName 
 ( 
 backupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from Backup resource.

Parameter
Name Description
backupName string

A fully-qualified path representing Backup resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromBackupPlanName(backupPlanName)

  matchProjectFromBackupPlanName 
 ( 
 backupPlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from BackupPlan resource.

Parameter
Name Description
backupPlanName string

A fully-qualified path representing BackupPlan resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

  matchProjectFromLocationName 
 ( 
 locationName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestoreName(restoreName)

  matchProjectFromRestoreName 
 ( 
 restoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRestorePlanName(restorePlanName)

  matchProjectFromRestorePlanName 
 ( 
 restorePlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromVolumeBackupName(volumeBackupName)

  matchProjectFromVolumeBackupName 
 ( 
 volumeBackupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromVolumeRestoreName(volumeRestoreName)

  matchProjectFromVolumeRestoreName 
 ( 
 volumeRestoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the project from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchRestoreFromRestoreName(restoreName)

  matchRestoreFromRestoreName 
 ( 
 restoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the restore from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the restore.

matchRestoreFromVolumeRestoreName(volumeRestoreName)

  matchRestoreFromVolumeRestoreName 
 ( 
 volumeRestoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the restore from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the restore.

matchRestorePlanFromRestoreName(restoreName)

  matchRestorePlanFromRestoreName 
 ( 
 restoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the restore_plan from Restore resource.

Parameter
Name Description
restoreName string

A fully-qualified path representing Restore resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchRestorePlanFromRestorePlanName(restorePlanName)

  matchRestorePlanFromRestorePlanName 
 ( 
 restorePlanName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the restore_plan from RestorePlan resource.

Parameter
Name Description
restorePlanName string

A fully-qualified path representing RestorePlan resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchRestorePlanFromVolumeRestoreName(volumeRestoreName)

  matchRestorePlanFromVolumeRestoreName 
 ( 
 volumeRestoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the restore_plan from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the restore_plan.

matchVolumeBackupFromVolumeBackupName(volumeBackupName)

  matchVolumeBackupFromVolumeBackupName 
 ( 
 volumeBackupName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the volume_backup from VolumeBackup resource.

Parameter
Name Description
volumeBackupName string

A fully-qualified path representing VolumeBackup resource.

Returns
Type Description
string | number

{string} A string representing the volume_backup.

matchVolumeRestoreFromVolumeRestoreName(volumeRestoreName)

  matchVolumeRestoreFromVolumeRestoreName 
 ( 
 volumeRestoreName 
 : 
  
 string 
 ) 
 : 
  
 string 
  
 | 
  
 number 
 ; 
 

Parse the volume_restore from VolumeRestore resource.

Parameter
Name Description
volumeRestoreName string

A fully-qualified path representing VolumeRestore resource.

Returns
Type Description
string | number

{string} A string representing the volume_restore.

restorePath(project, location, restorePlan, restore)

  restorePath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 restorePlan 
 : 
  
 string 
 , 
  
 restore 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified restore resource name string.

Parameters
Name Description
project string
location string
restorePlan string
restore string
Returns
Type Description
string

{string} Resource name string.

restorePlanPath(project, location, restorePlan)

  restorePlanPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 restorePlan 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified restorePlan resource name string.

Parameters
Name Description
project string
location string
restorePlan string
Returns
Type Description
string

{string} Resource name string.

updateBackup(request, options)

  updateBackup 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Update a Backup.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the Backup resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const backup = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  Backup targeted for update. The values for each of these 
 *  updated fields will be taken from the `backup_plan` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `backup` will be 
 *  written to the target Backup resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored 
 *  and are not used to update the target Backup. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateBackup 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 backup 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateBackup 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateBackup 
 (); 
 

updateBackup(request, options, callback)

  updateBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackup(request, callback)

  updateBackup 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackup 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackup , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackupPlan(request, options)

  updateBackupPlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupPlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Update a BackupPlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupPlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the BackupPlan resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const backupPlan = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  BackupPlan targeted for update. The values for each of these 
 *  updated fields will be taken from the `backup_plan` provided 
 *  with this request. Field names are relative to the root of the resource 
 *  (e.g., `description`, `backup_config.include_volume_data`, etc.) 
 *  If no `update_mask` is provided, all fields in `backup_plan` will be 
 *  written to the target BackupPlan resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored 
 *  and are not used to update the target BackupPlan. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateBackupPlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 backupPlan 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateBackupPlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateBackupPlan 
 (); 
 

updateBackupPlan(request, options, callback)

  updateBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupPlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupPlanRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBackupPlan(request, callback)

  updateBackupPlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateBackupPlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IBackupPlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateBackupPlanRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IBackupPlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestore(request, options)

  updateRestore 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestoreRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Update a Restore.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestoreRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the Restore resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const restore = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  Restore targeted for update. The values for each of these 
 *  updated fields will be taken from the `restore` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `restore` will be 
 *  written to the target Restore resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored 
 *  and are not used to update the target Restore. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateRestore 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 restore 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateRestore 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateRestore 
 (); 
 

updateRestore(request, options, callback)

  updateRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestoreRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestoreRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestore(request, callback)

  updateRestore 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestoreRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestore 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestoreRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestore , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestorePlan(request, options)

  updateRestorePlan 
 ( 
 request 
 ?: 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestorePlanRequest 
 , 
  
 options 
 ?: 
  
 CallOptions 
 ) 
 : 
  
 Promise 
< [ 
  
 LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 undefined 
  
 ]>; 
 

Update a RestorePlan.

Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestorePlanRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise <[ LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example
   
 /** 
 * This snippet has been automatically generated and should be regarded as a code template only. 
 * It will require modifications to work. 
 * It may require correct/in-range values for request initialization. 
 * TODO(developer): Uncomment these variables before running the sample. 
 */ 
  
 /** 
 *  Required. A new version of the RestorePlan resource that contains updated fields. 
 *  This may be sparsely populated if an `update_mask` is provided. 
 */ 
  
 // const restorePlan = {} 
  
 /** 
 *  This is used to specify the fields to be overwritten in the 
 *  RestorePlan targeted for update. The values for each of these 
 *  updated fields will be taken from the `restore_plan` provided 
 *  with this request. Field names are relative to the root of the resource. 
 *  If no `update_mask` is provided, all fields in `restore_plan` will be 
 *  written to the target RestorePlan resource. 
 *  Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored 
 *  and are not used to update the target RestorePlan. 
 */ 
  
 // const updateMask = {} 
  
 // Imports the Gkebackup library 
  
 const 
  
 { 
 BackupForGKEClient 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/gke-backup 
' 
 ). 
 v1 
 ; 
  
 // Instantiates a client 
  
 const 
  
 gkebackupClient 
  
 = 
  
 new 
  
  BackupForGKEClient 
 
 (); 
  
 async 
  
 function 
  
 callUpdateRestorePlan 
 () 
  
 { 
  
 // Construct request 
  
 const 
  
 request 
  
 = 
  
 { 
  
 restorePlan 
 , 
  
 }; 
  
 // Run request 
  
 const 
  
 [ 
 operation 
 ] 
  
 = 
  
 await 
  
 gkebackupClient 
 . 
 updateRestorePlan 
 ( 
 request 
 ); 
  
 const 
  
 [ 
 response 
 ] 
  
 = 
  
 await 
  
 operation 
 . 
 promise 
 (); 
  
 console 
 . 
 log 
 ( 
 response 
 ); 
  
 } 
  
 callUpdateRestorePlan 
 (); 
 

updateRestorePlan(request, options, callback)

  updateRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestorePlanRequest 
 , 
  
 options 
 : 
  
 CallOptions 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestorePlanRequest
options CallOptions
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRestorePlan(request, callback)

  updateRestorePlan 
 ( 
 request 
 : 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IUpdateRestorePlanRequest 
 , 
  
 callback 
 : 
  
 Callback<LROperation<protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IRestorePlan 
 , 
  
 protos 
 . 
 google 
 . 
 cloud 
 . 
 gkebackup 
 . 
 v1 
 . 
 IOperationMetadata 
> , 
  
 protos 
 . 
 google 
 . 
 longrunning 
 . 
 IOperation 
  
 | 
  
 null 
  
 | 
  
 undefined 
 , 
  
 {} 
  
 | 
  
 null 
  
 | 
  
 undefined 
> ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
request protos. google.cloud.gkebackup.v1.IUpdateRestorePlanRequest
callback Callback < LROperation <protos. google.cloud.gkebackup.v1.IRestorePlan , protos. google.cloud.gkebackup.v1.IOperationMetadata >, protos. google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

volumeBackupPath(project, location, backupPlan, backup, volumeBackup)

  volumeBackupPath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 backupPlan 
 : 
  
 string 
 , 
  
 backup 
 : 
  
 string 
 , 
  
 volumeBackup 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified volumeBackup resource name string.

Parameters
Name Description
project string
location string
backupPlan string
backup string
volumeBackup string
Returns
Type Description
string

{string} Resource name string.

volumeRestorePath(project, location, restorePlan, restore, volumeRestore)

  volumeRestorePath 
 ( 
 project 
 : 
  
 string 
 , 
  
 location 
 : 
  
 string 
 , 
  
 restorePlan 
 : 
  
 string 
 , 
  
 restore 
 : 
  
 string 
 , 
  
 volumeRestore 
 : 
  
 string 
 ) 
 : 
  
 string 
 ; 
 

Return a fully-qualified volumeRestore resource name string.

Parameters
Name Description
project string
location string
restorePlan string
restore string
volumeRestore string
Returns
Type Description
string

{string} Resource name string.

Design a Mobile Site
View Site in Mobile | Classic
Share by: