Cloud Filestore API v1 - Package cloud.google.com/go/filestore/apiv1 (v1.10.3) Stay organized with collections Save and categorize content based on your preferences.
Package filestore is an auto-generated package for theCloud Filestore API.
The Cloud Filestore API is used for creating and managing cloud fileservers.
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/filestore/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:=filestore.NewCloudFilestoreManagerClient(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:=&filestorepb.CreateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#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 NewCloudFilestoreManagerClient 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.
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[]*filestorepb.Backup,nextPageTokenstring,errerror)// contains filtered or unexported fields}BackupIterator manages a stream of *filestorepb.Backup.
func (*BackupIterator) All
func(it*BackupIterator)All()iter.Seq2[*filestorepb.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()(*filestorepb.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.
CloudFilestoreManagerCallOptions
typeCloudFilestoreManagerCallOptionsstruct{ListInstances[]gax.CallOptionGetInstance[]gax.CallOptionCreateInstance[]gax.CallOptionUpdateInstance[]gax.CallOptionRestoreInstance[]gax.CallOptionRevertInstance[]gax.CallOptionDeleteInstance[]gax.CallOptionListSnapshots[]gax.CallOptionGetSnapshot[]gax.CallOptionCreateSnapshot[]gax.CallOptionDeleteSnapshot[]gax.CallOptionUpdateSnapshot[]gax.CallOptionListBackups[]gax.CallOptionGetBackup[]gax.CallOptionCreateBackup[]gax.CallOptionDeleteBackup[]gax.CallOptionUpdateBackup[]gax.CallOptionPromoteReplica[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}CloudFilestoreManagerCallOptions contains the retry settings for each method of CloudFilestoreManagerClient.
CloudFilestoreManagerClient
typeCloudFilestoreManagerClientstruct{// The call options for this service.CallOptions*CloudFilestoreManagerCallOptions// 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}CloudFilestoreManagerClient is a client for interacting with Cloud Filestore API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Configures and manages Filestore resources.
Filestore Manager v1.
The file.googleapis.com service implements the Filestore API anddefines the following resource model for managing instances:
The service works with a collection of cloud projects, named: /projects/*Each project has a collection of available locations, named: /locations/*Each location has a collection of instances and backups, named:/instances/* and /backups/* respectively.As such, Filestore instances are resources of the form:/projects/{project_number}/locations/{location_id}/instances/{instance_id}and backups are resources of the form:/projects/{project_number}/locations/{location_id}/backup/{backup_id}Note that location_id must be a Google Cloud zone for instances, buta Google Cloud region for backups; for example:
projects/12345/locations/us-central1-c/instances/my-filestoreprojects/12345/locations/us-central1/backups/my-backupfunc NewCloudFilestoreManagerClient
funcNewCloudFilestoreManagerClient(ctxcontext.Context,opts...option.ClientOption)(*CloudFilestoreManagerClient,error)NewCloudFilestoreManagerClient creates a new cloud filestore manager client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Configures and manages Filestore resources.
Filestore Manager v1.
The file.googleapis.com service implements the Filestore API anddefines the following resource model for managing instances:
The service works with a collection of cloud projects, named: /projects/*Each project has a collection of available locations, named: /locations/*Each location has a collection of instances and backups, named:/instances/* and /backups/* respectively.As such, Filestore instances are resources of the form:/projects/{project_number}/locations/{location_id}/instances/{instance_id}and backups are resources of the form:/projects/{project_number}/locations/{location_id}/backup/{backup_id}Note that location_id must be a Google Cloud zone for instances, buta Google Cloud region for backups; for example:
projects/12345/locations/us-central1-c/instances/my-filestoreprojects/12345/locations/us-central1/backups/my-backupExample
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewCloudFilestoreManagerRESTClient
funcNewCloudFilestoreManagerRESTClient(ctxcontext.Context,opts...option.ClientOption)(*CloudFilestoreManagerClient,error)NewCloudFilestoreManagerRESTClient creates a new cloud filestore manager rest client.
Configures and manages Filestore resources.
Filestore Manager v1.
The file.googleapis.com service implements the Filestore API anddefines the following resource model for managing instances:
The service works with a collection of cloud projects, named: /projects/*Each project has a collection of available locations, named: /locations/*Each location has a collection of instances and backups, named:/instances/* and /backups/* respectively.As such, Filestore instances are resources of the form:/projects/{project_number}/locations/{location_id}/instances/{instance_id}and backups are resources of the form:/projects/{project_number}/locations/{location_id}/backup/{backup_id}Note that location_id must be a Google Cloud zone for instances, buta Google Cloud region for backups; for example:
projects/12345/locations/us-central1-c/instances/my-filestoreprojects/12345/locations/us-central1/backups/my-backupExample
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*CloudFilestoreManagerClient) CancelOperation
func(c*CloudFilestoreManagerClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) Close
func(c*CloudFilestoreManagerClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*CloudFilestoreManagerClient) Connection (deprecated)
func(c*CloudFilestoreManagerClient)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 (*CloudFilestoreManagerClient) CreateBackup
func(c*CloudFilestoreManagerClient)CreateBackup(ctxcontext.Context,req*filestorepb.CreateBackupRequest,opts...gax.CallOption)(*CreateBackupOperation,error)CreateBackup creates a backup.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.CreateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#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 (*CloudFilestoreManagerClient) CreateBackupOperation
func(c*CloudFilestoreManagerClient)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 (*CloudFilestoreManagerClient) CreateInstance
func(c*CloudFilestoreManagerClient)CreateInstance(ctxcontext.Context,req*filestorepb.CreateInstanceRequest,opts...gax.CallOption)(*CreateInstanceOperation,error)CreateInstance creates an instance.When creating from a backup, the capacity of the new instance needs to beequal to or larger than the capacity of the backup (and also equal to orlarger than the minimum capacity of the tier).
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.CreateInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#CreateInstanceRequest.}op,err:=c.CreateInstance(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) CreateInstanceOperation
func(c*CloudFilestoreManagerClient)CreateInstanceOperation(namestring)*CreateInstanceOperationCreateInstanceOperation returns a new CreateInstanceOperation from a given name.The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) CreateSnapshot
func(c*CloudFilestoreManagerClient)CreateSnapshot(ctxcontext.Context,req*filestorepb.CreateSnapshotRequest,opts...gax.CallOption)(*CreateSnapshotOperation,error)CreateSnapshot creates a snapshot.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.CreateSnapshotRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#CreateSnapshotRequest.}op,err:=c.CreateSnapshot(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) CreateSnapshotOperation
func(c*CloudFilestoreManagerClient)CreateSnapshotOperation(namestring)*CreateSnapshotOperationCreateSnapshotOperation returns a new CreateSnapshotOperation from a given name.The name must be that of a previously created CreateSnapshotOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) DeleteBackup
func(c*CloudFilestoreManagerClient)DeleteBackup(ctxcontext.Context,req*filestorepb.DeleteBackupRequest,opts...gax.CallOption)(*DeleteBackupOperation,error)DeleteBackup deletes a backup.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.DeleteBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#DeleteBackupRequest.}op,err:=c.DeleteBackup(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*CloudFilestoreManagerClient) DeleteBackupOperation
func(c*CloudFilestoreManagerClient)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 (*CloudFilestoreManagerClient) DeleteInstance
func(c*CloudFilestoreManagerClient)DeleteInstance(ctxcontext.Context,req*filestorepb.DeleteInstanceRequest,opts...gax.CallOption)(*DeleteInstanceOperation,error)DeleteInstance deletes an instance.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.DeleteInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#DeleteInstanceRequest.}op,err:=c.DeleteInstance(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*CloudFilestoreManagerClient) DeleteInstanceOperation
func(c*CloudFilestoreManagerClient)DeleteInstanceOperation(namestring)*DeleteInstanceOperationDeleteInstanceOperation returns a new DeleteInstanceOperation from a given name.The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) DeleteOperation
func(c*CloudFilestoreManagerClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) DeleteSnapshot
func(c*CloudFilestoreManagerClient)DeleteSnapshot(ctxcontext.Context,req*filestorepb.DeleteSnapshotRequest,opts...gax.CallOption)(*DeleteSnapshotOperation,error)DeleteSnapshot deletes a snapshot.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.DeleteSnapshotRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#DeleteSnapshotRequest.}op,err:=c.DeleteSnapshot(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*CloudFilestoreManagerClient) DeleteSnapshotOperation
func(c*CloudFilestoreManagerClient)DeleteSnapshotOperation(namestring)*DeleteSnapshotOperationDeleteSnapshotOperation returns a new DeleteSnapshotOperation from a given name.The name must be that of a previously created DeleteSnapshotOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) GetBackup
func(c*CloudFilestoreManagerClient)GetBackup(ctxcontext.Context,req*filestorepb.GetBackupRequest,opts...gax.CallOption)(*filestorepb.Backup,error)GetBackup gets the details of a specific backup.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.GetBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#GetBackupRequest.}resp,err:=c.GetBackup(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) GetInstance
func(c*CloudFilestoreManagerClient)GetInstance(ctxcontext.Context,req*filestorepb.GetInstanceRequest,opts...gax.CallOption)(*filestorepb.Instance,error)GetInstance gets the details of a specific instance.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.GetInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#GetInstanceRequest.}resp,err:=c.GetInstance(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) GetLocation
func(c*CloudFilestoreManagerClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) GetOperation
func(c*CloudFilestoreManagerClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) GetSnapshot
func(c*CloudFilestoreManagerClient)GetSnapshot(ctxcontext.Context,req*filestorepb.GetSnapshotRequest,opts...gax.CallOption)(*filestorepb.Snapshot,error)GetSnapshot gets the details of a specific snapshot.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.GetSnapshotRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#GetSnapshotRequest.}resp,err:=c.GetSnapshot(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) ListBackups
func(c*CloudFilestoreManagerClient)ListBackups(ctxcontext.Context,req*filestorepb.ListBackupsRequest,opts...gax.CallOption)*BackupIteratorListBackups lists all backups in a project for either a specified location or for alllocations.
Examples
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb""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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#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.(*filestorepb.ListBackupsResponse)}}all
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListBackupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#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 (*CloudFilestoreManagerClient) ListInstances
func(c*CloudFilestoreManagerClient)ListInstances(ctxcontext.Context,req*filestorepb.ListInstancesRequest,opts...gax.CallOption)*InstanceIteratorListInstances lists all instances in a project for either a specified locationor for all locations.
Examples
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb""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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#ListInstancesRequest.}it:=c.ListInstances(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.(*filestorepb.ListInstancesResponse)}}all
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#ListInstancesRequest.}forresp,err:=rangec.ListInstances(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*CloudFilestoreManagerClient) ListLocations
func(c*CloudFilestoreManagerClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) ListOperations
func(c*CloudFilestoreManagerClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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"filestore"cloud.google.com/go/filestore/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:=filestore.NewCloudFilestoreManagerClient(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 (*CloudFilestoreManagerClient) ListSnapshots
func(c*CloudFilestoreManagerClient)ListSnapshots(ctxcontext.Context,req*filestorepb.ListSnapshotsRequest,opts...gax.CallOption)*SnapshotIteratorListSnapshots lists all snapshots in a project for either a specified locationor for all locations.
Examples
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb""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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListSnapshotsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#ListSnapshotsRequest.}it:=c.ListSnapshots(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.(*filestorepb.ListSnapshotsResponse)}}all
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.ListSnapshotsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#ListSnapshotsRequest.}forresp,err:=rangec.ListSnapshots(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*CloudFilestoreManagerClient) PromoteReplica
func(c*CloudFilestoreManagerClient)PromoteReplica(ctxcontext.Context,req*filestorepb.PromoteReplicaRequest,opts...gax.CallOption)(*PromoteReplicaOperation,error)PromoteReplica promote the standby instance (replica).
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.PromoteReplicaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#PromoteReplicaRequest.}op,err:=c.PromoteReplica(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) PromoteReplicaOperation
func(c*CloudFilestoreManagerClient)PromoteReplicaOperation(namestring)*PromoteReplicaOperationPromoteReplicaOperation returns a new PromoteReplicaOperation from a given name.The name must be that of a previously created PromoteReplicaOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) RestoreInstance
func(c*CloudFilestoreManagerClient)RestoreInstance(ctxcontext.Context,req*filestorepb.RestoreInstanceRequest,opts...gax.CallOption)(*RestoreInstanceOperation,error)RestoreInstance restores an existing instance’s file share from a backup.
The capacity of the instance needs to be equal to or larger than thecapacity of the backup (and also equal to or larger than the minimumcapacity of the tier).
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.RestoreInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#RestoreInstanceRequest.}op,err:=c.RestoreInstance(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) RestoreInstanceOperation
func(c*CloudFilestoreManagerClient)RestoreInstanceOperation(namestring)*RestoreInstanceOperationRestoreInstanceOperation returns a new RestoreInstanceOperation from a given name.The name must be that of a previously created RestoreInstanceOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) RevertInstance
func(c*CloudFilestoreManagerClient)RevertInstance(ctxcontext.Context,req*filestorepb.RevertInstanceRequest,opts...gax.CallOption)(*RevertInstanceOperation,error)RevertInstance revert an existing instance’s file system to a specified snapshot.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.RevertInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#RevertInstanceRequest.}op,err:=c.RevertInstance(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) RevertInstanceOperation
func(c*CloudFilestoreManagerClient)RevertInstanceOperation(namestring)*RevertInstanceOperationRevertInstanceOperation returns a new RevertInstanceOperation from a given name.The name must be that of a previously created RevertInstanceOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) UpdateBackup
func(c*CloudFilestoreManagerClient)UpdateBackup(ctxcontext.Context,req*filestorepb.UpdateBackupRequest,opts...gax.CallOption)(*UpdateBackupOperation,error)UpdateBackup updates the settings of a specific backup.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.UpdateBackupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#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 (*CloudFilestoreManagerClient) UpdateBackupOperation
func(c*CloudFilestoreManagerClient)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 (*CloudFilestoreManagerClient) UpdateInstance
func(c*CloudFilestoreManagerClient)UpdateInstance(ctxcontext.Context,req*filestorepb.UpdateInstanceRequest,opts...gax.CallOption)(*UpdateInstanceOperation,error)UpdateInstance updates the settings of a specific instance.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.UpdateInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#UpdateInstanceRequest.}op,err:=c.UpdateInstance(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) UpdateInstanceOperation
func(c*CloudFilestoreManagerClient)UpdateInstanceOperation(namestring)*UpdateInstanceOperationUpdateInstanceOperation returns a new UpdateInstanceOperation from a given name.The name must be that of a previously created UpdateInstanceOperation, possibly from a different process.
func (*CloudFilestoreManagerClient) UpdateSnapshot
func(c*CloudFilestoreManagerClient)UpdateSnapshot(ctxcontext.Context,req*filestorepb.UpdateSnapshotRequest,opts...gax.CallOption)(*UpdateSnapshotOperation,error)UpdateSnapshot updates the settings of a specific snapshot.
Example
packagemainimport("context"filestore"cloud.google.com/go/filestore/apiv1"filestorepb"cloud.google.com/go/filestore/apiv1/filestorepb")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:=filestore.NewCloudFilestoreManagerClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&filestorepb.UpdateSnapshotRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/filestore/apiv1/filestorepb#UpdateSnapshotRequest.}op,err:=c.UpdateSnapshot(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*CloudFilestoreManagerClient) UpdateSnapshotOperation
func(c*CloudFilestoreManagerClient)UpdateSnapshotOperation(namestring)*UpdateSnapshotOperationUpdateSnapshotOperation returns a new UpdateSnapshotOperation from a given name.The name must be that of a previously created UpdateSnapshotOperation, possibly from a different process.
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()(*commonpb.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)(*filestorepb.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)(*filestorepb.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.
CreateInstanceOperation
typeCreateInstanceOperationstruct{// contains filtered or unexported fields}CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done
func(op*CreateInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata
func(op*CreateInstanceOperation)Metadata()(*commonpb.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 (*CreateInstanceOperation) Name
func(op*CreateInstanceOperation)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 (*CreateInstanceOperation) Poll
func(op*CreateInstanceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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 (*CreateInstanceOperation) Wait
func(op*CreateInstanceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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.
CreateSnapshotOperation
typeCreateSnapshotOperationstruct{// contains filtered or unexported fields}CreateSnapshotOperation manages a long-running operation from CreateSnapshot.
func (*CreateSnapshotOperation) Done
func(op*CreateSnapshotOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateSnapshotOperation) Metadata
func(op*CreateSnapshotOperation)Metadata()(*commonpb.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 (*CreateSnapshotOperation) Name
func(op*CreateSnapshotOperation)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 (*CreateSnapshotOperation) Poll
func(op*CreateSnapshotOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Snapshot,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 (*CreateSnapshotOperation) Wait
func(op*CreateSnapshotOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Snapshot,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.
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()(*commonpb.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.
DeleteInstanceOperation
typeDeleteInstanceOperationstruct{// contains filtered or unexported fields}DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done
func(op*DeleteInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata
func(op*DeleteInstanceOperation)Metadata()(*commonpb.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 (*DeleteInstanceOperation) Name
func(op*DeleteInstanceOperation)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 (*DeleteInstanceOperation) Poll
func(op*DeleteInstanceOperation)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 (*DeleteInstanceOperation) Wait
func(op*DeleteInstanceOperation)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.
DeleteSnapshotOperation
typeDeleteSnapshotOperationstruct{// contains filtered or unexported fields}DeleteSnapshotOperation manages a long-running operation from DeleteSnapshot.
func (*DeleteSnapshotOperation) Done
func(op*DeleteSnapshotOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteSnapshotOperation) Metadata
func(op*DeleteSnapshotOperation)Metadata()(*commonpb.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 (*DeleteSnapshotOperation) Name
func(op*DeleteSnapshotOperation)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 (*DeleteSnapshotOperation) Poll
func(op*DeleteSnapshotOperation)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 (*DeleteSnapshotOperation) Wait
func(op*DeleteSnapshotOperation)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.
InstanceIterator
typeInstanceIteratorstruct{// 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[]*filestorepb.Instance,nextPageTokenstring,errerror)// contains filtered or unexported fields}InstanceIterator manages a stream of *filestorepb.Instance.
func (*InstanceIterator) All
func(it*InstanceIterator)All()iter.Seq2[*filestorepb.Instance,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*InstanceIterator) Next
func(it*InstanceIterator)Next()(*filestorepb.Instance,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 (*InstanceIterator) PageInfo
func(it*InstanceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
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.
PromoteReplicaOperation
typePromoteReplicaOperationstruct{// contains filtered or unexported fields}PromoteReplicaOperation manages a long-running operation from PromoteReplica.
func (*PromoteReplicaOperation) Done
func(op*PromoteReplicaOperation)Done()boolDone reports whether the long-running operation has completed.
func (*PromoteReplicaOperation) Metadata
func(op*PromoteReplicaOperation)Metadata()(*commonpb.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 (*PromoteReplicaOperation) Name
func(op*PromoteReplicaOperation)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 (*PromoteReplicaOperation) Poll
func(op*PromoteReplicaOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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 (*PromoteReplicaOperation) Wait
func(op*PromoteReplicaOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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.
RestoreInstanceOperation
typeRestoreInstanceOperationstruct{// contains filtered or unexported fields}RestoreInstanceOperation manages a long-running operation from RestoreInstance.
func (*RestoreInstanceOperation) Done
func(op*RestoreInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RestoreInstanceOperation) Metadata
func(op*RestoreInstanceOperation)Metadata()(*commonpb.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 (*RestoreInstanceOperation) Name
func(op*RestoreInstanceOperation)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 (*RestoreInstanceOperation) Poll
func(op*RestoreInstanceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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 (*RestoreInstanceOperation) Wait
func(op*RestoreInstanceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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.
RevertInstanceOperation
typeRevertInstanceOperationstruct{// contains filtered or unexported fields}RevertInstanceOperation manages a long-running operation from RevertInstance.
func (*RevertInstanceOperation) Done
func(op*RevertInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RevertInstanceOperation) Metadata
func(op*RevertInstanceOperation)Metadata()(*commonpb.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 (*RevertInstanceOperation) Name
func(op*RevertInstanceOperation)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 (*RevertInstanceOperation) Poll
func(op*RevertInstanceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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 (*RevertInstanceOperation) Wait
func(op*RevertInstanceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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.
SnapshotIterator
typeSnapshotIteratorstruct{// 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[]*filestorepb.Snapshot,nextPageTokenstring,errerror)// contains filtered or unexported fields}SnapshotIterator manages a stream of *filestorepb.Snapshot.
func (*SnapshotIterator) All
func(it*SnapshotIterator)All()iter.Seq2[*filestorepb.Snapshot,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SnapshotIterator) Next
func(it*SnapshotIterator)Next()(*filestorepb.Snapshot,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 (*SnapshotIterator) PageInfo
func(it*SnapshotIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
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()(*commonpb.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)(*filestorepb.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)(*filestorepb.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.
UpdateInstanceOperation
typeUpdateInstanceOperationstruct{// contains filtered or unexported fields}UpdateInstanceOperation manages a long-running operation from UpdateInstance.
func (*UpdateInstanceOperation) Done
func(op*UpdateInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateInstanceOperation) Metadata
func(op*UpdateInstanceOperation)Metadata()(*commonpb.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 (*UpdateInstanceOperation) Name
func(op*UpdateInstanceOperation)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 (*UpdateInstanceOperation) Poll
func(op*UpdateInstanceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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 (*UpdateInstanceOperation) Wait
func(op*UpdateInstanceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Instance,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.
UpdateSnapshotOperation
typeUpdateSnapshotOperationstruct{// contains filtered or unexported fields}UpdateSnapshotOperation manages a long-running operation from UpdateSnapshot.
func (*UpdateSnapshotOperation) Done
func(op*UpdateSnapshotOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateSnapshotOperation) Metadata
func(op*UpdateSnapshotOperation)Metadata()(*commonpb.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 (*UpdateSnapshotOperation) Name
func(op*UpdateSnapshotOperation)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 (*UpdateSnapshotOperation) Poll
func(op*UpdateSnapshotOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Snapshot,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 (*UpdateSnapshotOperation) Wait
func(op*UpdateSnapshotOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*filestorepb.Snapshot,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.
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.