Cloud Filestore API v1 - Package cloud.google.com/go/filestore/apiv1 (v1.10.3)

Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.

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:

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()[]string

DefaultAuthScopes 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

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.PageInfo

PageInfo 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-backup

func 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-backup

Example

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-backup

Example

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

CancelOperation 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

Close 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.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.

func (*CloudFilestoreManagerClient) CreateBackup

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)*CreateBackupOperation

CreateBackupOperation 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

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)*CreateInstanceOperation

CreateInstanceOperation 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

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)*CreateSnapshotOperation

CreateSnapshotOperation 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

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)*DeleteBackupOperation

DeleteBackupOperation 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

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)*DeleteInstanceOperation

DeleteInstanceOperation 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

DeleteOperation 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

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)*DeleteSnapshotOperation

DeleteSnapshotOperation 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

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

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

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

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

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

ListBackups 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

ListInstances 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

ListLocations 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

ListOperations 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

ListSnapshots 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

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)*PromoteReplicaOperation

PromoteReplicaOperation 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

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)*RestoreInstanceOperation

RestoreInstanceOperation 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

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)*RevertInstanceOperation

RevertInstanceOperation 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

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)*UpdateBackupOperation

UpdateBackupOperation 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

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)*UpdateInstanceOperation

UpdateInstanceOperation 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

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)*UpdateSnapshotOperation

UpdateSnapshotOperation 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

Done reports whether the long-running operation has completed.

func (*CreateBackupOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*CreateInstanceOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*CreateSnapshotOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*DeleteBackupOperation) Metadata

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

Name 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

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 (*DeleteBackupOperation) Wait

Wait 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

Done reports whether the long-running operation has completed.

func (*DeleteInstanceOperation) Metadata

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

Name 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

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 (*DeleteInstanceOperation) Wait

Wait 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

Done reports whether the long-running operation has completed.

func (*DeleteSnapshotOperation) Metadata

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

Name 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

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 (*DeleteSnapshotOperation) Wait

Wait 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

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.PageInfo

PageInfo 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

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.PageInfo

PageInfo 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

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.PageInfo

PageInfo 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

Done reports whether the long-running operation has completed.

func (*PromoteReplicaOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*RestoreInstanceOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*RevertInstanceOperation) Metadata

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

Name 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

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

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

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.PageInfo

PageInfo 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

Done reports whether the long-running operation has completed.

func (*UpdateBackupOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*UpdateInstanceOperation) Metadata

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

Name 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

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

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

Done reports whether the long-running operation has completed.

func (*UpdateSnapshotOperation) Metadata

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

Name 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

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

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.