Class BackupForGKEClient (0.62.0)

GitHub RepositoryProduct Reference

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

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
   BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
   BackupPlan response = backupForGKEClient.getBackupPlan(name);
 }
 

Note: close() needs to be called on the BackupForGKEClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

CreateBackupPlan

Creates a new BackupPlan in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupPlanAsync(CreateBackupPlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)

  • createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupPlanOperationCallable()

  • createBackupPlanCallable()

ListBackupPlans

Lists BackupPlans in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupPlans(ListBackupPlansRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupPlans(LocationName parent)

  • listBackupPlans(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupPlansPagedCallable()

  • listBackupPlansCallable()

GetBackupPlan

Retrieve the details of a single BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupPlan(GetBackupPlanRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupPlan(BackupPlanName name)

  • getBackupPlan(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupPlanCallable()

UpdateBackupPlan

Update a BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBackupPlanAsync(UpdateBackupPlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateBackupPlanAsync(BackupPlan backupPlan, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBackupPlanOperationCallable()

  • updateBackupPlanCallable()

DeleteBackupPlan

Deletes an existing BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupPlanAsync(DeleteBackupPlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupPlanAsync(BackupPlanName name)

  • deleteBackupPlanAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupPlanOperationCallable()

  • deleteBackupPlanCallable()

CreateBackupChannel

Creates a new BackupChannel in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupChannelAsync(CreateBackupChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupChannelAsync(LocationName parent, BackupChannel backupChannel, String backupChannelId)

  • createBackupChannelAsync(String parent, BackupChannel backupChannel, String backupChannelId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupChannelOperationCallable()

  • createBackupChannelCallable()

ListBackupChannels

Lists BackupChannels in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupChannels(ListBackupChannelsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupChannels(LocationName parent)

  • listBackupChannels(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupChannelsPagedCallable()

  • listBackupChannelsCallable()

GetBackupChannel

Retrieve the details of a single BackupChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupChannel(GetBackupChannelRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupChannel(BackupChannelName name)

  • getBackupChannel(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupChannelCallable()

UpdateBackupChannel

Update a BackupChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBackupChannelAsync(UpdateBackupChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateBackupChannelAsync(BackupChannel backupChannel, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBackupChannelOperationCallable()

  • updateBackupChannelCallable()

DeleteBackupChannel

Deletes an existing BackupChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupChannelAsync(DeleteBackupChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupChannelAsync(BackupChannelName name)

  • deleteBackupChannelAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupChannelOperationCallable()

  • deleteBackupChannelCallable()

ListBackupPlanBindings

Lists BackupPlanBindings in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupPlanBindings(ListBackupPlanBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupPlanBindings(BackupChannelName parent)

  • listBackupPlanBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupPlanBindingsPagedCallable()

  • listBackupPlanBindingsCallable()

GetBackupPlanBinding

Retrieve the details of a single BackupPlanBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupPlanBinding(GetBackupPlanBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupPlanBinding(BackupPlanBindingName name)

  • getBackupPlanBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupPlanBindingCallable()

CreateBackup

Creates a Backup for the given BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupAsync(CreateBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupAsync(BackupPlanName parent, Backup backup, String backupId)

  • createBackupAsync(String parent, Backup backup, String backupId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupOperationCallable()

  • createBackupCallable()

ListBackups

Lists the Backups for a given BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackups(ListBackupsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackups(BackupPlanName parent)

  • listBackups(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupsPagedCallable()

  • listBackupsCallable()

GetBackup

Retrieve the details of a single Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackup(GetBackupRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackup(BackupName name)

  • getBackup(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupCallable()

UpdateBackup

Update a Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBackupAsync(UpdateBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateBackupAsync(Backup backup, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBackupOperationCallable()

  • updateBackupCallable()

DeleteBackup

Deletes an existing Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupAsync(DeleteBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupAsync(BackupName name)

  • deleteBackupAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupOperationCallable()

  • deleteBackupCallable()

ListVolumeBackups

Lists the VolumeBackups for a given Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listVolumeBackups(ListVolumeBackupsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listVolumeBackups(BackupName parent)

  • listVolumeBackups(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listVolumeBackupsPagedCallable()

  • listVolumeBackupsCallable()

GetVolumeBackup

Retrieve the details of a single VolumeBackup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getVolumeBackup(GetVolumeBackupRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getVolumeBackup(VolumeBackupName name)

  • getVolumeBackup(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getVolumeBackupCallable()

CreateRestorePlan

Creates a new RestorePlan in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRestorePlanAsync(CreateRestorePlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createRestorePlanAsync(LocationName parent, RestorePlan restorePlan, String restorePlanId)

  • createRestorePlanAsync(String parent, RestorePlan restorePlan, String restorePlanId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRestorePlanOperationCallable()

  • createRestorePlanCallable()

ListRestorePlans

Lists RestorePlans in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRestorePlans(ListRestorePlansRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRestorePlans(LocationName parent)

  • listRestorePlans(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRestorePlansPagedCallable()

  • listRestorePlansCallable()

GetRestorePlan

Retrieve the details of a single RestorePlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRestorePlan(GetRestorePlanRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRestorePlan(RestorePlanName name)

  • getRestorePlan(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRestorePlanCallable()

UpdateRestorePlan

Update a RestorePlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRestorePlanAsync(UpdateRestorePlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateRestorePlanAsync(RestorePlan restorePlan, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRestorePlanOperationCallable()

  • updateRestorePlanCallable()

DeleteRestorePlan

Deletes an existing RestorePlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRestorePlanAsync(DeleteRestorePlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteRestorePlanAsync(RestorePlanName name)

  • deleteRestorePlanAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRestorePlanOperationCallable()

  • deleteRestorePlanCallable()

CreateRestoreChannel

Creates a new RestoreChannel in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRestoreChannelAsync(CreateRestoreChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createRestoreChannelAsync(LocationName parent, RestoreChannel restoreChannel, String restoreChannelId)

  • createRestoreChannelAsync(String parent, RestoreChannel restoreChannel, String restoreChannelId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRestoreChannelOperationCallable()

  • createRestoreChannelCallable()

ListRestoreChannels

Lists RestoreChannels in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRestoreChannels(ListRestoreChannelsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRestoreChannels(LocationName parent)

  • listRestoreChannels(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRestoreChannelsPagedCallable()

  • listRestoreChannelsCallable()

GetRestoreChannel

Retrieve the details of a single RestoreChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRestoreChannel(GetRestoreChannelRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRestoreChannel(RestoreChannelName name)

  • getRestoreChannel(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRestoreChannelCallable()

UpdateRestoreChannel

Update a RestoreChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRestoreChannelAsync(UpdateRestoreChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateRestoreChannelAsync(RestoreChannel restoreChannel, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRestoreChannelOperationCallable()

  • updateRestoreChannelCallable()

DeleteRestoreChannel

Deletes an existing RestoreChannel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRestoreChannelAsync(DeleteRestoreChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteRestoreChannelAsync(RestoreChannelName name)

  • deleteRestoreChannelAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRestoreChannelOperationCallable()

  • deleteRestoreChannelCallable()

ListRestorePlanBindings

Lists RestorePlanBindings in a given location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRestorePlanBindings(ListRestorePlanBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRestorePlanBindings(RestoreChannelName parent)

  • listRestorePlanBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRestorePlanBindingsPagedCallable()

  • listRestorePlanBindingsCallable()

GetRestorePlanBinding

Retrieve the details of a single RestorePlanBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRestorePlanBinding(GetRestorePlanBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRestorePlanBinding(RestorePlanBindingName name)

  • getRestorePlanBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRestorePlanBindingCallable()

CreateRestore

Creates a new Restore for the given RestorePlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRestoreAsync(CreateRestoreRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createRestoreAsync(RestorePlanName parent, Restore restore, String restoreId)

  • createRestoreAsync(String parent, Restore restore, String restoreId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRestoreOperationCallable()

  • createRestoreCallable()

ListRestores

Lists the Restores for a given RestorePlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRestores(ListRestoresRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRestores(RestorePlanName parent)

  • listRestores(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRestoresPagedCallable()

  • listRestoresCallable()

GetRestore

Retrieves the details of a single Restore.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRestore(GetRestoreRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRestore(RestoreName name)

  • getRestore(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRestoreCallable()

UpdateRestore

Update a Restore.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRestoreAsync(UpdateRestoreRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateRestoreAsync(Restore restore, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRestoreOperationCallable()

  • updateRestoreCallable()

DeleteRestore

Deletes an existing Restore.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRestoreAsync(DeleteRestoreRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteRestoreAsync(RestoreName name)

  • deleteRestoreAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRestoreOperationCallable()

  • deleteRestoreCallable()

ListVolumeRestores

Lists the VolumeRestores for a given Restore.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listVolumeRestores(ListVolumeRestoresRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listVolumeRestores(RestoreName parent)

  • listVolumeRestores(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listVolumeRestoresPagedCallable()

  • listVolumeRestoresCallable()

GetVolumeRestore

Retrieve the details of a single VolumeRestore.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getVolumeRestore(GetVolumeRestoreRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getVolumeRestore(VolumeRestoreName name)

  • getVolumeRestore(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getVolumeRestoreCallable()

GetBackupIndexDownloadUrl

Retrieve the link to the backupIndex.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupIndexDownloadUrl(GetBackupIndexDownloadUrlRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupIndexDownloadUrl(BackupName backup)

  • getBackupIndexDownloadUrl(String backup)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupIndexDownloadUrlCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of BackupForGKESettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupForGKESettings backupForGKESettings =
     BackupForGKESettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupForGKESettings backupForGKESettings =
     BackupForGKESettings.newBuilder().setEndpoint(myEndpoint).build();
 BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupForGKESettings backupForGKESettings = BackupForGKESettings.newHttpJsonBuilder().build();
 BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > BackupForGKEClient

Static Methods

create()

public static final BackupForGKEClient create()

Constructs an instance of BackupForGKEClient with default settings.

Returns
Type Description
BackupForGKEClient
Exceptions
Type Description
IOException

create(BackupForGKESettings settings)

public static final BackupForGKEClient create(BackupForGKESettings settings)

Constructs an instance of BackupForGKEClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings BackupForGKESettings
Returns
Type Description
BackupForGKEClient
Exceptions
Type Description
IOException

create(BackupForGKEStub stub)

public static final BackupForGKEClient create(BackupForGKEStub stub)

Constructs an instance of BackupForGKEClient, using the given stub for making calls. This is for advanced usage - prefer using create(BackupForGKESettings).

Parameter
Name Description
stub BackupForGKEStub
Returns
Type Description
BackupForGKEClient

Constructors

BackupForGKEClient(BackupForGKESettings settings)

protected BackupForGKEClient(BackupForGKESettings settings)

Constructs an instance of BackupForGKEClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings BackupForGKESettings

BackupForGKEClient(BackupForGKEStub stub)

protected BackupForGKEClient(BackupForGKEStub stub)
Parameter
Name Description
stub BackupForGKEStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit