Backup for GKE API v1 - Package cloud.google.com/go/gkebackup/apiv1 (v1.8.1) Stay organized with collections Save and categorize content based on your preferences.
Package gkebackup is an auto-generated package for theBackup for GKE API.
Backup for GKE is a managed Kubernetes workload backup and restore servicefor GKE clusters.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/gkebackup/apiv1@latestctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req:=&gkebackuppb.CreateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateBackupRequest.}op,err:=c.CreateBackup(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewBackupForGKEClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
BackupChannelIterator
typeBackupChannelIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.BackupChannel,nextPageTokenstring,errerror)// contains filtered or unexported fields}BackupChannelIterator manages a stream of *gkebackuppb.BackupChannel.
func (*BackupChannelIterator) All
func(it*BackupChannelIterator)All()iter.Seq2[*gkebackuppb.BackupChannel,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*BackupChannelIterator) Next
func(it*BackupChannelIterator)Next()(*gkebackuppb.BackupChannel,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*BackupChannelIterator) PageInfo
func(it*BackupChannelIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BackupForGKECallOptions
typeBackupForGKECallOptionsstruct{CreateBackupPlan[]gax.CallOptionListBackupPlans[]gax.CallOptionGetBackupPlan[]gax.CallOptionUpdateBackupPlan[]gax.CallOptionDeleteBackupPlan[]gax.CallOptionCreateBackupChannel[]gax.CallOptionListBackupChannels[]gax.CallOptionGetBackupChannel[]gax.CallOptionUpdateBackupChannel[]gax.CallOptionDeleteBackupChannel[]gax.CallOptionListBackupPlanBindings[]gax.CallOptionGetBackupPlanBinding[]gax.CallOptionCreateBackup[]gax.CallOptionListBackups[]gax.CallOptionGetBackup[]gax.CallOptionUpdateBackup[]gax.CallOptionDeleteBackup[]gax.CallOptionListVolumeBackups[]gax.CallOptionGetVolumeBackup[]gax.CallOptionCreateRestorePlan[]gax.CallOptionListRestorePlans[]gax.CallOptionGetRestorePlan[]gax.CallOptionUpdateRestorePlan[]gax.CallOptionDeleteRestorePlan[]gax.CallOptionCreateRestoreChannel[]gax.CallOptionListRestoreChannels[]gax.CallOptionGetRestoreChannel[]gax.CallOptionUpdateRestoreChannel[]gax.CallOptionDeleteRestoreChannel[]gax.CallOptionListRestorePlanBindings[]gax.CallOptionGetRestorePlanBinding[]gax.CallOptionCreateRestore[]gax.CallOptionListRestores[]gax.CallOptionGetRestore[]gax.CallOptionUpdateRestore[]gax.CallOptionDeleteRestore[]gax.CallOptionListVolumeRestores[]gax.CallOptionGetVolumeRestore[]gax.CallOptionGetBackupIndexDownloadUrl[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}BackupForGKECallOptions contains the retry settings for each method of BackupForGKEClient.
BackupForGKEClient
typeBackupForGKEClientstruct{// The call options for this service.CallOptions*BackupForGKECallOptions// LROClient is used internally to handle long-running operations.// It is exposed so that its CallOptions can be modified if required.// Users should not Close this client.LROClient*lroauto.OperationsClient// contains filtered or unexported fields}BackupForGKEClient is a client for interacting with Backup for GKE API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
BackupForGKE allows Kubernetes administrators to configure, execute, andmanage backup and restore operations for their GKE clusters.
func NewBackupForGKEClient
funcNewBackupForGKEClient(ctxcontext.Context,opts...option.ClientOption)(*BackupForGKEClient,error)NewBackupForGKEClient creates a new backup forgke client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
BackupForGKE allows Kubernetes administrators to configure, execute, andmanage backup and restore operations for their GKE clusters.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewBackupForGKERESTClient
funcNewBackupForGKERESTClient(ctxcontext.Context,opts...option.ClientOption)(*BackupForGKEClient,error)NewBackupForGKERESTClient creates a new backup forgke rest client.
BackupForGKE allows Kubernetes administrators to configure, execute, andmanage backup and restore operations for their GKE clusters.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKERESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*BackupForGKEClient) CancelOperation
func(c*BackupForGKEClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.CancelOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.}err=c.CancelOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) Close
func(c*BackupForGKEClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*BackupForGKEClient) Connection (deprecated)
func(c*BackupForGKEClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*BackupForGKEClient) CreateBackup
func(c*BackupForGKEClient)CreateBackup(ctxcontext.Context,req*gkebackuppb.CreateBackupRequest,opts...gax.CallOption)(*CreateBackupOperation,error)CreateBackup creates a Backup for the given BackupPlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateBackupRequest.}op,err:=c.CreateBackup(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateBackupChannel
func(c*BackupForGKEClient)CreateBackupChannel(ctxcontext.Context,req*gkebackuppb.CreateBackupChannelRequest,opts...gax.CallOption)(*CreateBackupChannelOperation,error)CreateBackupChannel creates a new BackupChannel in a given location.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateBackupChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateBackupChannelRequest.}op,err:=c.CreateBackupChannel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateBackupChannelOperation
func(c*BackupForGKEClient)CreateBackupChannelOperation(namestring)*CreateBackupChannelOperationCreateBackupChannelOperation returns a new CreateBackupChannelOperation from a given name.The name must be that of a previously created CreateBackupChannelOperation, possibly from a different process.
func (*BackupForGKEClient) CreateBackupOperation
func(c*BackupForGKEClient)CreateBackupOperation(namestring)*CreateBackupOperationCreateBackupOperation returns a new CreateBackupOperation from a given name.The name must be that of a previously created CreateBackupOperation, possibly from a different process.
func (*BackupForGKEClient) CreateBackupPlan
func(c*BackupForGKEClient)CreateBackupPlan(ctxcontext.Context,req*gkebackuppb.CreateBackupPlanRequest,opts...gax.CallOption)(*CreateBackupPlanOperation,error)CreateBackupPlan creates a new BackupPlan in a given location.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateBackupPlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateBackupPlanRequest.}op,err:=c.CreateBackupPlan(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateBackupPlanOperation
func(c*BackupForGKEClient)CreateBackupPlanOperation(namestring)*CreateBackupPlanOperationCreateBackupPlanOperation returns a new CreateBackupPlanOperation from a given name.The name must be that of a previously created CreateBackupPlanOperation, possibly from a different process.
func (*BackupForGKEClient) CreateRestore
func(c*BackupForGKEClient)CreateRestore(ctxcontext.Context,req*gkebackuppb.CreateRestoreRequest,opts...gax.CallOption)(*CreateRestoreOperation,error)CreateRestore creates a new Restore for the given RestorePlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateRestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateRestoreRequest.}op,err:=c.CreateRestore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateRestoreChannel
func(c*BackupForGKEClient)CreateRestoreChannel(ctxcontext.Context,req*gkebackuppb.CreateRestoreChannelRequest,opts...gax.CallOption)(*CreateRestoreChannelOperation,error)CreateRestoreChannel creates a new RestoreChannel in a given location.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateRestoreChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateRestoreChannelRequest.}op,err:=c.CreateRestoreChannel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateRestoreChannelOperation
func(c*BackupForGKEClient)CreateRestoreChannelOperation(namestring)*CreateRestoreChannelOperationCreateRestoreChannelOperation returns a new CreateRestoreChannelOperation from a given name.The name must be that of a previously created CreateRestoreChannelOperation, possibly from a different process.
func (*BackupForGKEClient) CreateRestoreOperation
func(c*BackupForGKEClient)CreateRestoreOperation(namestring)*CreateRestoreOperationCreateRestoreOperation returns a new CreateRestoreOperation from a given name.The name must be that of a previously created CreateRestoreOperation, possibly from a different process.
func (*BackupForGKEClient) CreateRestorePlan
func(c*BackupForGKEClient)CreateRestorePlan(ctxcontext.Context,req*gkebackuppb.CreateRestorePlanRequest,opts...gax.CallOption)(*CreateRestorePlanOperation,error)CreateRestorePlan creates a new RestorePlan in a given location.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.CreateRestorePlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#CreateRestorePlanRequest.}op,err:=c.CreateRestorePlan(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) CreateRestorePlanOperation
func(c*BackupForGKEClient)CreateRestorePlanOperation(namestring)*CreateRestorePlanOperationCreateRestorePlanOperation returns a new CreateRestorePlanOperation from a given name.The name must be that of a previously created CreateRestorePlanOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteBackup
func(c*BackupForGKEClient)DeleteBackup(ctxcontext.Context,req*gkebackuppb.DeleteBackupRequest,opts...gax.CallOption)(*DeleteBackupOperation,error)DeleteBackup deletes an existing Backup.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteBackupRequest.}op,err:=c.DeleteBackup(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteBackupChannel
func(c*BackupForGKEClient)DeleteBackupChannel(ctxcontext.Context,req*gkebackuppb.DeleteBackupChannelRequest,opts...gax.CallOption)(*DeleteBackupChannelOperation,error)DeleteBackupChannel deletes an existing BackupChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteBackupChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteBackupChannelRequest.}op,err:=c.DeleteBackupChannel(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteBackupChannelOperation
func(c*BackupForGKEClient)DeleteBackupChannelOperation(namestring)*DeleteBackupChannelOperationDeleteBackupChannelOperation returns a new DeleteBackupChannelOperation from a given name.The name must be that of a previously created DeleteBackupChannelOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteBackupOperation
func(c*BackupForGKEClient)DeleteBackupOperation(namestring)*DeleteBackupOperationDeleteBackupOperation returns a new DeleteBackupOperation from a given name.The name must be that of a previously created DeleteBackupOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteBackupPlan
func(c*BackupForGKEClient)DeleteBackupPlan(ctxcontext.Context,req*gkebackuppb.DeleteBackupPlanRequest,opts...gax.CallOption)(*DeleteBackupPlanOperation,error)DeleteBackupPlan deletes an existing BackupPlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteBackupPlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteBackupPlanRequest.}op,err:=c.DeleteBackupPlan(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteBackupPlanOperation
func(c*BackupForGKEClient)DeleteBackupPlanOperation(namestring)*DeleteBackupPlanOperationDeleteBackupPlanOperation returns a new DeleteBackupPlanOperation from a given name.The name must be that of a previously created DeleteBackupPlanOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteOperation
func(c*BackupForGKEClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.DeleteOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.}err=c.DeleteOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteRestore
func(c*BackupForGKEClient)DeleteRestore(ctxcontext.Context,req*gkebackuppb.DeleteRestoreRequest,opts...gax.CallOption)(*DeleteRestoreOperation,error)DeleteRestore deletes an existing Restore.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteRestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteRestoreRequest.}op,err:=c.DeleteRestore(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteRestoreChannel
func(c*BackupForGKEClient)DeleteRestoreChannel(ctxcontext.Context,req*gkebackuppb.DeleteRestoreChannelRequest,opts...gax.CallOption)(*DeleteRestoreChannelOperation,error)DeleteRestoreChannel deletes an existing RestoreChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteRestoreChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteRestoreChannelRequest.}op,err:=c.DeleteRestoreChannel(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteRestoreChannelOperation
func(c*BackupForGKEClient)DeleteRestoreChannelOperation(namestring)*DeleteRestoreChannelOperationDeleteRestoreChannelOperation returns a new DeleteRestoreChannelOperation from a given name.The name must be that of a previously created DeleteRestoreChannelOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteRestoreOperation
func(c*BackupForGKEClient)DeleteRestoreOperation(namestring)*DeleteRestoreOperationDeleteRestoreOperation returns a new DeleteRestoreOperation from a given name.The name must be that of a previously created DeleteRestoreOperation, possibly from a different process.
func (*BackupForGKEClient) DeleteRestorePlan
func(c*BackupForGKEClient)DeleteRestorePlan(ctxcontext.Context,req*gkebackuppb.DeleteRestorePlanRequest,opts...gax.CallOption)(*DeleteRestorePlanOperation,error)DeleteRestorePlan deletes an existing RestorePlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.DeleteRestorePlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#DeleteRestorePlanRequest.}op,err:=c.DeleteRestorePlan(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*BackupForGKEClient) DeleteRestorePlanOperation
func(c*BackupForGKEClient)DeleteRestorePlanOperation(namestring)*DeleteRestorePlanOperationDeleteRestorePlanOperation returns a new DeleteRestorePlanOperation from a given name.The name must be that of a previously created DeleteRestorePlanOperation, possibly from a different process.
func (*BackupForGKEClient) GetBackup
func(c*BackupForGKEClient)GetBackup(ctxcontext.Context,req*gkebackuppb.GetBackupRequest,opts...gax.CallOption)(*gkebackuppb.Backup,error)GetBackup retrieve the details of a single Backup.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetBackupRequest.}resp,err:=c.GetBackup(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetBackupChannel
func(c*BackupForGKEClient)GetBackupChannel(ctxcontext.Context,req*gkebackuppb.GetBackupChannelRequest,opts...gax.CallOption)(*gkebackuppb.BackupChannel,error)GetBackupChannel retrieve the details of a single BackupChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetBackupChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetBackupChannelRequest.}resp,err:=c.GetBackupChannel(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetBackupIndexDownloadUrl
func(c*BackupForGKEClient)GetBackupIndexDownloadUrl(ctxcontext.Context,req*gkebackuppb.GetBackupIndexDownloadUrlRequest,opts...gax.CallOption)(*gkebackuppb.GetBackupIndexDownloadUrlResponse,error)GetBackupIndexDownloadUrl retrieve the link to the backupIndex.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetBackupIndexDownloadUrlRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetBackupIndexDownloadUrlRequest.}resp,err:=c.GetBackupIndexDownloadUrl(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetBackupPlan
func(c*BackupForGKEClient)GetBackupPlan(ctxcontext.Context,req*gkebackuppb.GetBackupPlanRequest,opts...gax.CallOption)(*gkebackuppb.BackupPlan,error)GetBackupPlan retrieve the details of a single BackupPlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetBackupPlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetBackupPlanRequest.}resp,err:=c.GetBackupPlan(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetBackupPlanBinding
func(c*BackupForGKEClient)GetBackupPlanBinding(ctxcontext.Context,req*gkebackuppb.GetBackupPlanBindingRequest,opts...gax.CallOption)(*gkebackuppb.BackupPlanBinding,error)GetBackupPlanBinding retrieve the details of a single BackupPlanBinding.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetBackupPlanBindingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetBackupPlanBindingRequest.}resp,err:=c.GetBackupPlanBinding(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetIamPolicy
func(c*BackupForGKEClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetLocation
func(c*BackupForGKEClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.GetLocationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.}resp,err:=c.GetLocation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetOperation
func(c*BackupForGKEClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.GetOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.}resp,err:=c.GetOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetRestore
func(c*BackupForGKEClient)GetRestore(ctxcontext.Context,req*gkebackuppb.GetRestoreRequest,opts...gax.CallOption)(*gkebackuppb.Restore,error)GetRestore retrieves the details of a single Restore.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetRestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetRestoreRequest.}resp,err:=c.GetRestore(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetRestoreChannel
func(c*BackupForGKEClient)GetRestoreChannel(ctxcontext.Context,req*gkebackuppb.GetRestoreChannelRequest,opts...gax.CallOption)(*gkebackuppb.RestoreChannel,error)GetRestoreChannel retrieve the details of a single RestoreChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetRestoreChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetRestoreChannelRequest.}resp,err:=c.GetRestoreChannel(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetRestorePlan
func(c*BackupForGKEClient)GetRestorePlan(ctxcontext.Context,req*gkebackuppb.GetRestorePlanRequest,opts...gax.CallOption)(*gkebackuppb.RestorePlan,error)GetRestorePlan retrieve the details of a single RestorePlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetRestorePlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetRestorePlanRequest.}resp,err:=c.GetRestorePlan(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetRestorePlanBinding
func(c*BackupForGKEClient)GetRestorePlanBinding(ctxcontext.Context,req*gkebackuppb.GetRestorePlanBindingRequest,opts...gax.CallOption)(*gkebackuppb.RestorePlanBinding,error)GetRestorePlanBinding retrieve the details of a single RestorePlanBinding.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetRestorePlanBindingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetRestorePlanBindingRequest.}resp,err:=c.GetRestorePlanBinding(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetVolumeBackup
func(c*BackupForGKEClient)GetVolumeBackup(ctxcontext.Context,req*gkebackuppb.GetVolumeBackupRequest,opts...gax.CallOption)(*gkebackuppb.VolumeBackup,error)GetVolumeBackup retrieve the details of a single VolumeBackup.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetVolumeBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetVolumeBackupRequest.}resp,err:=c.GetVolumeBackup(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) GetVolumeRestore
func(c*BackupForGKEClient)GetVolumeRestore(ctxcontext.Context,req*gkebackuppb.GetVolumeRestoreRequest,opts...gax.CallOption)(*gkebackuppb.VolumeRestore,error)GetVolumeRestore retrieve the details of a single VolumeRestore.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.GetVolumeRestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#GetVolumeRestoreRequest.}resp,err:=c.GetVolumeRestore(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) ListBackupChannels
func(c*BackupForGKEClient)ListBackupChannels(ctxcontext.Context,req*gkebackuppb.ListBackupChannelsRequest,opts...gax.CallOption)*BackupChannelIteratorListBackupChannels lists BackupChannels in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupChannelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupChannelsRequest.}it:=c.ListBackupChannels(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListBackupChannelsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupChannelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupChannelsRequest.}forresp,err:=rangec.ListBackupChannels(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListBackupPlanBindings
func(c*BackupForGKEClient)ListBackupPlanBindings(ctxcontext.Context,req*gkebackuppb.ListBackupPlanBindingsRequest,opts...gax.CallOption)*BackupPlanBindingIteratorListBackupPlanBindings lists BackupPlanBindings in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupPlanBindingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupPlanBindingsRequest.}it:=c.ListBackupPlanBindings(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListBackupPlanBindingsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupPlanBindingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupPlanBindingsRequest.}forresp,err:=rangec.ListBackupPlanBindings(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListBackupPlans
func(c*BackupForGKEClient)ListBackupPlans(ctxcontext.Context,req*gkebackuppb.ListBackupPlansRequest,opts...gax.CallOption)*BackupPlanIteratorListBackupPlans lists BackupPlans in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupPlansRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupPlansRequest.}it:=c.ListBackupPlans(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListBackupPlansResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupPlansRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupPlansRequest.}forresp,err:=rangec.ListBackupPlans(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListBackups
func(c*BackupForGKEClient)ListBackups(ctxcontext.Context,req*gkebackuppb.ListBackupsRequest,opts...gax.CallOption)*BackupIteratorListBackups lists the Backups for a given BackupPlan.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupsRequest.}it:=c.ListBackups(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListBackupsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListBackupsRequest.}forresp,err:=rangec.ListBackups(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListLocations
func(c*BackupForGKEClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}it:=c.ListLocations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*locationpb.ListLocationsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListOperations
func(c*BackupForGKEClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}it:=c.ListOperations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListRestoreChannels
func(c*BackupForGKEClient)ListRestoreChannels(ctxcontext.Context,req*gkebackuppb.ListRestoreChannelsRequest,opts...gax.CallOption)*RestoreChannelIteratorListRestoreChannels lists RestoreChannels in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestoreChannelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestoreChannelsRequest.}it:=c.ListRestoreChannels(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListRestoreChannelsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestoreChannelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestoreChannelsRequest.}forresp,err:=rangec.ListRestoreChannels(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListRestorePlanBindings
func(c*BackupForGKEClient)ListRestorePlanBindings(ctxcontext.Context,req*gkebackuppb.ListRestorePlanBindingsRequest,opts...gax.CallOption)*RestorePlanBindingIteratorListRestorePlanBindings lists RestorePlanBindings in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestorePlanBindingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestorePlanBindingsRequest.}it:=c.ListRestorePlanBindings(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListRestorePlanBindingsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestorePlanBindingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestorePlanBindingsRequest.}forresp,err:=rangec.ListRestorePlanBindings(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListRestorePlans
func(c*BackupForGKEClient)ListRestorePlans(ctxcontext.Context,req*gkebackuppb.ListRestorePlansRequest,opts...gax.CallOption)*RestorePlanIteratorListRestorePlans lists RestorePlans in a given location.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestorePlansRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestorePlansRequest.}it:=c.ListRestorePlans(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListRestorePlansResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestorePlansRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestorePlansRequest.}forresp,err:=rangec.ListRestorePlans(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListRestores
func(c*BackupForGKEClient)ListRestores(ctxcontext.Context,req*gkebackuppb.ListRestoresRequest,opts...gax.CallOption)*RestoreIteratorListRestores lists the Restores for a given RestorePlan.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestoresRequest.}it:=c.ListRestores(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListRestoresResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListRestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListRestoresRequest.}forresp,err:=rangec.ListRestores(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListVolumeBackups
func(c*BackupForGKEClient)ListVolumeBackups(ctxcontext.Context,req*gkebackuppb.ListVolumeBackupsRequest,opts...gax.CallOption)*VolumeBackupIteratorListVolumeBackups lists the VolumeBackups for a given Backup.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListVolumeBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListVolumeBackupsRequest.}it:=c.ListVolumeBackups(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListVolumeBackupsResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListVolumeBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListVolumeBackupsRequest.}forresp,err:=rangec.ListVolumeBackups(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) ListVolumeRestores
func(c*BackupForGKEClient)ListVolumeRestores(ctxcontext.Context,req*gkebackuppb.ListVolumeRestoresRequest,opts...gax.CallOption)*VolumeRestoreIteratorListVolumeRestores lists the VolumeRestores for a given Restore.
Examples
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListVolumeRestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListVolumeRestoresRequest.}it:=c.ListVolumeRestores(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*gkebackuppb.ListVolumeRestoresResponse)}}all
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.ListVolumeRestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#ListVolumeRestoresRequest.}forresp,err:=rangec.ListVolumeRestores(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*BackupForGKEClient) SetIamPolicy
func(c*BackupForGKEClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) TestIamPermissions
func(c*BackupForGKEClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)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.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateBackup
func(c*BackupForGKEClient)UpdateBackup(ctxcontext.Context,req*gkebackuppb.UpdateBackupRequest,opts...gax.CallOption)(*UpdateBackupOperation,error)UpdateBackup update a Backup.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateBackupRequest.}op,err:=c.UpdateBackup(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateBackupChannel
func(c*BackupForGKEClient)UpdateBackupChannel(ctxcontext.Context,req*gkebackuppb.UpdateBackupChannelRequest,opts...gax.CallOption)(*UpdateBackupChannelOperation,error)UpdateBackupChannel update a BackupChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateBackupChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateBackupChannelRequest.}op,err:=c.UpdateBackupChannel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateBackupChannelOperation
func(c*BackupForGKEClient)UpdateBackupChannelOperation(namestring)*UpdateBackupChannelOperationUpdateBackupChannelOperation returns a new UpdateBackupChannelOperation from a given name.The name must be that of a previously created UpdateBackupChannelOperation, possibly from a different process.
func (*BackupForGKEClient) UpdateBackupOperation
func(c*BackupForGKEClient)UpdateBackupOperation(namestring)*UpdateBackupOperationUpdateBackupOperation returns a new UpdateBackupOperation from a given name.The name must be that of a previously created UpdateBackupOperation, possibly from a different process.
func (*BackupForGKEClient) UpdateBackupPlan
func(c*BackupForGKEClient)UpdateBackupPlan(ctxcontext.Context,req*gkebackuppb.UpdateBackupPlanRequest,opts...gax.CallOption)(*UpdateBackupPlanOperation,error)UpdateBackupPlan update a BackupPlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateBackupPlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateBackupPlanRequest.}op,err:=c.UpdateBackupPlan(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateBackupPlanOperation
func(c*BackupForGKEClient)UpdateBackupPlanOperation(namestring)*UpdateBackupPlanOperationUpdateBackupPlanOperation returns a new UpdateBackupPlanOperation from a given name.The name must be that of a previously created UpdateBackupPlanOperation, possibly from a different process.
func (*BackupForGKEClient) UpdateRestore
func(c*BackupForGKEClient)UpdateRestore(ctxcontext.Context,req*gkebackuppb.UpdateRestoreRequest,opts...gax.CallOption)(*UpdateRestoreOperation,error)UpdateRestore update a Restore.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateRestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateRestoreRequest.}op,err:=c.UpdateRestore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateRestoreChannel
func(c*BackupForGKEClient)UpdateRestoreChannel(ctxcontext.Context,req*gkebackuppb.UpdateRestoreChannelRequest,opts...gax.CallOption)(*UpdateRestoreChannelOperation,error)UpdateRestoreChannel update a RestoreChannel.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateRestoreChannelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateRestoreChannelRequest.}op,err:=c.UpdateRestoreChannel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateRestoreChannelOperation
func(c*BackupForGKEClient)UpdateRestoreChannelOperation(namestring)*UpdateRestoreChannelOperationUpdateRestoreChannelOperation returns a new UpdateRestoreChannelOperation from a given name.The name must be that of a previously created UpdateRestoreChannelOperation, possibly from a different process.
func (*BackupForGKEClient) UpdateRestoreOperation
func(c*BackupForGKEClient)UpdateRestoreOperation(namestring)*UpdateRestoreOperationUpdateRestoreOperation returns a new UpdateRestoreOperation from a given name.The name must be that of a previously created UpdateRestoreOperation, possibly from a different process.
func (*BackupForGKEClient) UpdateRestorePlan
func(c*BackupForGKEClient)UpdateRestorePlan(ctxcontext.Context,req*gkebackuppb.UpdateRestorePlanRequest,opts...gax.CallOption)(*UpdateRestorePlanOperation,error)UpdateRestorePlan update a RestorePlan.
Example
packagemainimport("context"gkebackup"cloud.google.com/go/gkebackup/apiv1"gkebackuppb"cloud.google.com/go/gkebackup/apiv1/gkebackuppb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gkebackup.NewBackupForGKEClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gkebackuppb.UpdateRestorePlanRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gkebackup/apiv1/gkebackuppb#UpdateRestorePlanRequest.}op,err:=c.UpdateRestorePlan(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*BackupForGKEClient) UpdateRestorePlanOperation
func(c*BackupForGKEClient)UpdateRestorePlanOperation(namestring)*UpdateRestorePlanOperationUpdateRestorePlanOperation returns a new UpdateRestorePlanOperation from a given name.The name must be that of a previously created UpdateRestorePlanOperation, possibly from a different process.
BackupIterator
typeBackupIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.Backup,nextPageTokenstring,errerror)// contains filtered or unexported fields}BackupIterator manages a stream of *gkebackuppb.Backup.
func (*BackupIterator) All
func(it*BackupIterator)All()iter.Seq2[*gkebackuppb.Backup,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*BackupIterator) Next
func(it*BackupIterator)Next()(*gkebackuppb.Backup,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*BackupIterator) PageInfo
func(it*BackupIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BackupPlanBindingIterator
typeBackupPlanBindingIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.BackupPlanBinding,nextPageTokenstring,errerror)// contains filtered or unexported fields}BackupPlanBindingIterator manages a stream of *gkebackuppb.BackupPlanBinding.
func (*BackupPlanBindingIterator) All
func(it*BackupPlanBindingIterator)All()iter.Seq2[*gkebackuppb.BackupPlanBinding,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*BackupPlanBindingIterator) Next
func(it*BackupPlanBindingIterator)Next()(*gkebackuppb.BackupPlanBinding,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*BackupPlanBindingIterator) PageInfo
func(it*BackupPlanBindingIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BackupPlanIterator
typeBackupPlanIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.BackupPlan,nextPageTokenstring,errerror)// contains filtered or unexported fields}BackupPlanIterator manages a stream of *gkebackuppb.BackupPlan.
func (*BackupPlanIterator) All
func(it*BackupPlanIterator)All()iter.Seq2[*gkebackuppb.BackupPlan,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*BackupPlanIterator) Next
func(it*BackupPlanIterator)Next()(*gkebackuppb.BackupPlan,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*BackupPlanIterator) PageInfo
func(it*BackupPlanIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CreateBackupChannelOperation
typeCreateBackupChannelOperationstruct{// contains filtered or unexported fields}CreateBackupChannelOperation manages a long-running operation from CreateBackupChannel.
func (*CreateBackupChannelOperation) Done
func(op*CreateBackupChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateBackupChannelOperation) Metadata
func(op*CreateBackupChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBackupChannelOperation) Name
func(op*CreateBackupChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateBackupChannelOperation) Poll
func(op*CreateBackupChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupChannel,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateBackupChannelOperation) Wait
func(op*CreateBackupChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupChannel,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateBackupOperation
typeCreateBackupOperationstruct{// contains filtered or unexported fields}CreateBackupOperation manages a long-running operation from CreateBackup.
func (*CreateBackupOperation) Done
func(op*CreateBackupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateBackupOperation) Metadata
func(op*CreateBackupOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBackupOperation) Name
func(op*CreateBackupOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateBackupOperation) Poll
func(op*CreateBackupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Backup,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateBackupOperation) Wait
func(op*CreateBackupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Backup,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateBackupPlanOperation
typeCreateBackupPlanOperationstruct{// contains filtered or unexported fields}CreateBackupPlanOperation manages a long-running operation from CreateBackupPlan.
func (*CreateBackupPlanOperation) Done
func(op*CreateBackupPlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateBackupPlanOperation) Metadata
func(op*CreateBackupPlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBackupPlanOperation) Name
func(op*CreateBackupPlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateBackupPlanOperation) Poll
func(op*CreateBackupPlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupPlan,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateBackupPlanOperation) Wait
func(op*CreateBackupPlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupPlan,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateRestoreChannelOperation
typeCreateRestoreChannelOperationstruct{// contains filtered or unexported fields}CreateRestoreChannelOperation manages a long-running operation from CreateRestoreChannel.
func (*CreateRestoreChannelOperation) Done
func(op*CreateRestoreChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateRestoreChannelOperation) Metadata
func(op*CreateRestoreChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateRestoreChannelOperation) Name
func(op*CreateRestoreChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRestoreChannelOperation) Poll
func(op*CreateRestoreChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestoreChannel,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRestoreChannelOperation) Wait
func(op*CreateRestoreChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestoreChannel,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateRestoreOperation
typeCreateRestoreOperationstruct{// contains filtered or unexported fields}CreateRestoreOperation manages a long-running operation from CreateRestore.
func (*CreateRestoreOperation) Done
func(op*CreateRestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateRestoreOperation) Metadata
func(op*CreateRestoreOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateRestoreOperation) Name
func(op*CreateRestoreOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRestoreOperation) Poll
func(op*CreateRestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Restore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRestoreOperation) Wait
func(op*CreateRestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Restore,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateRestorePlanOperation
typeCreateRestorePlanOperationstruct{// contains filtered or unexported fields}CreateRestorePlanOperation manages a long-running operation from CreateRestorePlan.
func (*CreateRestorePlanOperation) Done
func(op*CreateRestorePlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateRestorePlanOperation) Metadata
func(op*CreateRestorePlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateRestorePlanOperation) Name
func(op*CreateRestorePlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRestorePlanOperation) Poll
func(op*CreateRestorePlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestorePlan,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRestorePlanOperation) Wait
func(op*CreateRestorePlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestorePlan,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBackupChannelOperation
typeDeleteBackupChannelOperationstruct{// contains filtered or unexported fields}DeleteBackupChannelOperation manages a long-running operation from DeleteBackupChannel.
func (*DeleteBackupChannelOperation) Done
func(op*DeleteBackupChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteBackupChannelOperation) Metadata
func(op*DeleteBackupChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBackupChannelOperation) Name
func(op*DeleteBackupChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBackupChannelOperation) Poll
func(op*DeleteBackupChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBackupChannelOperation) Wait
func(op*DeleteBackupChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBackupOperation
typeDeleteBackupOperationstruct{// contains filtered or unexported fields}DeleteBackupOperation manages a long-running operation from DeleteBackup.
func (*DeleteBackupOperation) Done
func(op*DeleteBackupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteBackupOperation) Metadata
func(op*DeleteBackupOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBackupOperation) Name
func(op*DeleteBackupOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBackupOperation) Poll
func(op*DeleteBackupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBackupOperation) Wait
func(op*DeleteBackupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBackupPlanOperation
typeDeleteBackupPlanOperationstruct{// contains filtered or unexported fields}DeleteBackupPlanOperation manages a long-running operation from DeleteBackupPlan.
func (*DeleteBackupPlanOperation) Done
func(op*DeleteBackupPlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteBackupPlanOperation) Metadata
func(op*DeleteBackupPlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBackupPlanOperation) Name
func(op*DeleteBackupPlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBackupPlanOperation) Poll
func(op*DeleteBackupPlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBackupPlanOperation) Wait
func(op*DeleteBackupPlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRestoreChannelOperation
typeDeleteRestoreChannelOperationstruct{// contains filtered or unexported fields}DeleteRestoreChannelOperation manages a long-running operation from DeleteRestoreChannel.
func (*DeleteRestoreChannelOperation) Done
func(op*DeleteRestoreChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteRestoreChannelOperation) Metadata
func(op*DeleteRestoreChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteRestoreChannelOperation) Name
func(op*DeleteRestoreChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteRestoreChannelOperation) Poll
func(op*DeleteRestoreChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRestoreChannelOperation) Wait
func(op*DeleteRestoreChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRestoreOperation
typeDeleteRestoreOperationstruct{// contains filtered or unexported fields}DeleteRestoreOperation manages a long-running operation from DeleteRestore.
func (*DeleteRestoreOperation) Done
func(op*DeleteRestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteRestoreOperation) Metadata
func(op*DeleteRestoreOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteRestoreOperation) Name
func(op*DeleteRestoreOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteRestoreOperation) Poll
func(op*DeleteRestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRestoreOperation) Wait
func(op*DeleteRestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRestorePlanOperation
typeDeleteRestorePlanOperationstruct{// contains filtered or unexported fields}DeleteRestorePlanOperation manages a long-running operation from DeleteRestorePlan.
func (*DeleteRestorePlanOperation) Done
func(op*DeleteRestorePlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteRestorePlanOperation) Metadata
func(op*DeleteRestorePlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteRestorePlanOperation) Name
func(op*DeleteRestorePlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteRestorePlanOperation) Poll
func(op*DeleteRestorePlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRestorePlanOperation) Wait
func(op*DeleteRestorePlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
LocationIterator
typeLocationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All
func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*LocationIterator) Next
func(it*LocationIterator)Next()(*locationpb.Location,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo
func(it*LocationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
typeOperationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RestoreChannelIterator
typeRestoreChannelIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.RestoreChannel,nextPageTokenstring,errerror)// contains filtered or unexported fields}RestoreChannelIterator manages a stream of *gkebackuppb.RestoreChannel.
func (*RestoreChannelIterator) All
func(it*RestoreChannelIterator)All()iter.Seq2[*gkebackuppb.RestoreChannel,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RestoreChannelIterator) Next
func(it*RestoreChannelIterator)Next()(*gkebackuppb.RestoreChannel,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RestoreChannelIterator) PageInfo
func(it*RestoreChannelIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RestoreIterator
typeRestoreIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.Restore,nextPageTokenstring,errerror)// contains filtered or unexported fields}RestoreIterator manages a stream of *gkebackuppb.Restore.
func (*RestoreIterator) All
func(it*RestoreIterator)All()iter.Seq2[*gkebackuppb.Restore,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RestoreIterator) Next
func(it*RestoreIterator)Next()(*gkebackuppb.Restore,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RestoreIterator) PageInfo
func(it*RestoreIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RestorePlanBindingIterator
typeRestorePlanBindingIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.RestorePlanBinding,nextPageTokenstring,errerror)// contains filtered or unexported fields}RestorePlanBindingIterator manages a stream of *gkebackuppb.RestorePlanBinding.
func (*RestorePlanBindingIterator) All
func(it*RestorePlanBindingIterator)All()iter.Seq2[*gkebackuppb.RestorePlanBinding,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RestorePlanBindingIterator) Next
func(it*RestorePlanBindingIterator)Next()(*gkebackuppb.RestorePlanBinding,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RestorePlanBindingIterator) PageInfo
func(it*RestorePlanBindingIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RestorePlanIterator
typeRestorePlanIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.RestorePlan,nextPageTokenstring,errerror)// contains filtered or unexported fields}RestorePlanIterator manages a stream of *gkebackuppb.RestorePlan.
func (*RestorePlanIterator) All
func(it*RestorePlanIterator)All()iter.Seq2[*gkebackuppb.RestorePlan,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RestorePlanIterator) Next
func(it*RestorePlanIterator)Next()(*gkebackuppb.RestorePlan,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RestorePlanIterator) PageInfo
func(it*RestorePlanIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UpdateBackupChannelOperation
typeUpdateBackupChannelOperationstruct{// contains filtered or unexported fields}UpdateBackupChannelOperation manages a long-running operation from UpdateBackupChannel.
func (*UpdateBackupChannelOperation) Done
func(op*UpdateBackupChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateBackupChannelOperation) Metadata
func(op*UpdateBackupChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBackupChannelOperation) Name
func(op*UpdateBackupChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateBackupChannelOperation) Poll
func(op*UpdateBackupChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupChannel,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateBackupChannelOperation) Wait
func(op*UpdateBackupChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupChannel,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateBackupOperation
typeUpdateBackupOperationstruct{// contains filtered or unexported fields}UpdateBackupOperation manages a long-running operation from UpdateBackup.
func (*UpdateBackupOperation) Done
func(op*UpdateBackupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateBackupOperation) Metadata
func(op*UpdateBackupOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBackupOperation) Name
func(op*UpdateBackupOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateBackupOperation) Poll
func(op*UpdateBackupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Backup,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateBackupOperation) Wait
func(op*UpdateBackupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Backup,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateBackupPlanOperation
typeUpdateBackupPlanOperationstruct{// contains filtered or unexported fields}UpdateBackupPlanOperation manages a long-running operation from UpdateBackupPlan.
func (*UpdateBackupPlanOperation) Done
func(op*UpdateBackupPlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateBackupPlanOperation) Metadata
func(op*UpdateBackupPlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBackupPlanOperation) Name
func(op*UpdateBackupPlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateBackupPlanOperation) Poll
func(op*UpdateBackupPlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupPlan,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateBackupPlanOperation) Wait
func(op*UpdateBackupPlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.BackupPlan,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateRestoreChannelOperation
typeUpdateRestoreChannelOperationstruct{// contains filtered or unexported fields}UpdateRestoreChannelOperation manages a long-running operation from UpdateRestoreChannel.
func (*UpdateRestoreChannelOperation) Done
func(op*UpdateRestoreChannelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateRestoreChannelOperation) Metadata
func(op*UpdateRestoreChannelOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateRestoreChannelOperation) Name
func(op*UpdateRestoreChannelOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateRestoreChannelOperation) Poll
func(op*UpdateRestoreChannelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestoreChannel,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRestoreChannelOperation) Wait
func(op*UpdateRestoreChannelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestoreChannel,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateRestoreOperation
typeUpdateRestoreOperationstruct{// contains filtered or unexported fields}UpdateRestoreOperation manages a long-running operation from UpdateRestore.
func (*UpdateRestoreOperation) Done
func(op*UpdateRestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateRestoreOperation) Metadata
func(op*UpdateRestoreOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateRestoreOperation) Name
func(op*UpdateRestoreOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateRestoreOperation) Poll
func(op*UpdateRestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Restore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRestoreOperation) Wait
func(op*UpdateRestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.Restore,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateRestorePlanOperation
typeUpdateRestorePlanOperationstruct{// contains filtered or unexported fields}UpdateRestorePlanOperation manages a long-running operation from UpdateRestorePlan.
func (*UpdateRestorePlanOperation) Done
func(op*UpdateRestorePlanOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateRestorePlanOperation) Metadata
func(op*UpdateRestorePlanOperation)Metadata()(*gkebackuppb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateRestorePlanOperation) Name
func(op*UpdateRestorePlanOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateRestorePlanOperation) Poll
func(op*UpdateRestorePlanOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestorePlan,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRestorePlanOperation) Wait
func(op*UpdateRestorePlanOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*gkebackuppb.RestorePlan,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
VolumeBackupIterator
typeVolumeBackupIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.VolumeBackup,nextPageTokenstring,errerror)// contains filtered or unexported fields}VolumeBackupIterator manages a stream of *gkebackuppb.VolumeBackup.
func (*VolumeBackupIterator) All
func(it*VolumeBackupIterator)All()iter.Seq2[*gkebackuppb.VolumeBackup,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*VolumeBackupIterator) Next
func(it*VolumeBackupIterator)Next()(*gkebackuppb.VolumeBackup,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*VolumeBackupIterator) PageInfo
func(it*VolumeBackupIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
VolumeRestoreIterator
typeVolumeRestoreIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gkebackuppb.VolumeRestore,nextPageTokenstring,errerror)// contains filtered or unexported fields}VolumeRestoreIterator manages a stream of *gkebackuppb.VolumeRestore.
func (*VolumeRestoreIterator) All
func(it*VolumeRestoreIterator)All()iter.Seq2[*gkebackuppb.VolumeRestore,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*VolumeRestoreIterator) Next
func(it*VolumeRestoreIterator)Next()(*gkebackuppb.VolumeRestore,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*VolumeRestoreIterator) PageInfo
func(it*VolumeRestoreIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.