Package lustre is an auto-generated package for the Google Cloud Managed Lustre API.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page 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/lustre/apiv1@latest 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_Options c, err := lustre.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.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 := &lustrepb.CreateDirectoryPolicyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#CreateDirectoryPolicyRequest. } op, err := c.CreateDirectoryPolicy(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewClient is used for authentication requests and for 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
func DefaultAuthScopes() []stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
type CallOptions struct {
ListInstances []gax.CallOption
GetInstance []gax.CallOption
CreateInstance []gax.CallOption
UpdateInstance []gax.CallOption
DeleteInstance []gax.CallOption
RescheduleMaintenance []gax.CallOption
ImportData []gax.CallOption
ExportData []gax.CallOption
CreateMirror []gax.CallOption
UpdateMirror []gax.CallOption
DeleteMirror []gax.CallOption
GetMirror []gax.CallOption
ListMirrors []gax.CallOption
CreateDirectoryPolicy []gax.CallOption
DeleteDirectoryPolicy []gax.CallOption
GetDirectoryPolicy []gax.CallOption
ListDirectoryPolicies []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// 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
}Client is a client for interacting with Google Cloud Managed Lustre API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewClient
NewClient creates a new lustre client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
NewRESTClient creates a new lustre rest client.
Service describing handlers for resources
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close
Close closes the connection to the API service. Always call Close() when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateDirectoryPolicy
func (c *Client) CreateDirectoryPolicy(ctx context.Context, req *lustrepb.CreateDirectoryPolicyRequest, opts ...gax.CallOption) (*CreateDirectoryPolicyOperation, error)CreateDirectoryPolicy creates a directory policy resource.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.CreateDirectoryPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#CreateDirectoryPolicyRequest.
}
op, err := c.CreateDirectoryPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateDirectoryPolicyOperation
func (c *Client) CreateDirectoryPolicyOperation(name string) *CreateDirectoryPolicyOperationCreateDirectoryPolicyOperation returns a new CreateDirectoryPolicyOperation from a given name. The name must be that of a previously created CreateDirectoryPolicyOperation, possibly from a different process.
func (*Client) CreateInstance
func (c *Client) CreateInstance(ctx context.Context, req *lustrepb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)CreateInstance creates a new instance in a given project and location.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.CreateInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#CreateInstanceRequest.
}
op, err := c.CreateInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateInstanceOperation
func (c *Client) CreateInstanceOperation(name string) *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 (*Client) CreateMirror
func (c *Client) CreateMirror(ctx context.Context, req *lustrepb.CreateMirrorRequest, opts ...gax.CallOption) (*CreateMirrorOperation, error)CreateMirror creates a new mirror in a given instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.CreateMirrorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#CreateMirrorRequest.
}
op, err := c.CreateMirror(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateMirrorOperation
func (c *Client) CreateMirrorOperation(name string) *CreateMirrorOperationCreateMirrorOperation returns a new CreateMirrorOperation from a given name. The name must be that of a previously created CreateMirrorOperation, possibly from a different process.
func (*Client) DeleteDirectoryPolicy
func (c *Client) DeleteDirectoryPolicy(ctx context.Context, req *lustrepb.DeleteDirectoryPolicyRequest, opts ...gax.CallOption) (*DeleteDirectoryPolicyOperation, error)DeleteDirectoryPolicy deletes a directory policy resource.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.DeleteDirectoryPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#DeleteDirectoryPolicyRequest.
}
op, err := c.DeleteDirectoryPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteDirectoryPolicyOperation
func (c *Client) DeleteDirectoryPolicyOperation(name string) *DeleteDirectoryPolicyOperationDeleteDirectoryPolicyOperation returns a new DeleteDirectoryPolicyOperation from a given name. The name must be that of a previously created DeleteDirectoryPolicyOperation, possibly from a different process.
func (*Client) DeleteInstance
func (c *Client) DeleteInstance(ctx context.Context, req *lustrepb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)DeleteInstance deletes a single instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.DeleteInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#DeleteInstanceRequest.
}
op, err := c.DeleteInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteInstanceOperation
func (c *Client) DeleteInstanceOperation(name string) *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 (*Client) DeleteMirror
func (c *Client) DeleteMirror(ctx context.Context, req *lustrepb.DeleteMirrorRequest, opts ...gax.CallOption) (*DeleteMirrorOperation, error)DeleteMirror deletes a single mirror.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.DeleteMirrorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#DeleteMirrorRequest.
}
op, err := c.DeleteMirror(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteMirrorOperation
func (c *Client) DeleteMirrorOperation(name string) *DeleteMirrorOperationDeleteMirrorOperation returns a new DeleteMirrorOperation from a given name. The name must be that of a previously created DeleteMirrorOperation, possibly from a different process.
func (*Client) DeleteOperation
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) ExportData
func (c *Client) ExportData(ctx context.Context, req *lustrepb.ExportDataRequest, opts ...gax.CallOption) (*ExportDataOperation, error)ExportData exports data from a Managed Lustre instance to Cloud Storage.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ExportDataRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ExportDataRequest.
}
op, err := c.ExportData(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ExportDataOperation
func (c *Client) ExportDataOperation(name string) *ExportDataOperationExportDataOperation returns a new ExportDataOperation from a given name. The name must be that of a previously created ExportDataOperation, possibly from a different process.
func (*Client) GetDirectoryPolicy
func (c *Client) GetDirectoryPolicy(ctx context.Context, req *lustrepb.GetDirectoryPolicyRequest, opts ...gax.CallOption) (*lustrepb.DirectoryPolicy, error)GetDirectoryPolicy gets details of a single directory policy.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.GetDirectoryPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#GetDirectoryPolicyRequest.
}
resp, err := c.GetDirectoryPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInstance
func (c *Client) GetInstance(ctx context.Context, req *lustrepb.GetInstanceRequest, opts ...gax.CallOption) (*lustrepb.Instance, error)GetInstance gets details of a single instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.GetInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#GetInstanceRequest.
}
resp, err := c.GetInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)GetLocation gets information about a location.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetMirror
func (c *Client) GetMirror(ctx context.Context, req *lustrepb.GetMirrorRequest, opts ...gax.CallOption) (*lustrepb.Mirror, error)GetMirror gets details of a single mirror.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.GetMirrorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#GetMirrorRequest.
}
resp, err := c.GetMirror(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)GetOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ImportData
func (c *Client) ImportData(ctx context.Context, req *lustrepb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error)ImportData imports data from Cloud Storage to a Managed Lustre instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ImportDataRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ImportDataRequest.
}
op, err := c.ImportData(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ImportDataOperation
func (c *Client) ImportDataOperation(name string) *ImportDataOperationImportDataOperation returns a new ImportDataOperation from a given name. The name must be that of a previously created ImportDataOperation, possibly from a different process.
func (*Client) ListDirectoryPolicies
func (c *Client) ListDirectoryPolicies(ctx context.Context, req *lustrepb.ListDirectoryPoliciesRequest, opts ...gax.CallOption) *DirectoryPolicyIteratorListDirectoryPolicies gets details of multiple directory policies under a given instance.
Examples
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListDirectoryPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListDirectoryPoliciesRequest.
}
it := c.ListDirectoryPolicies(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != 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.(*lustrepb.ListDirectoryPoliciesResponse)
}
}
all
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListDirectoryPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListDirectoryPoliciesRequest.
}
for resp, err := range c.ListDirectoryPolicies(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListInstances
func (c *Client) ListInstances(ctx context.Context, req *lustrepb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIteratorListInstances lists instances in a given project and location.
Examples
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListInstancesRequest.
}
it := c.ListInstances(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != 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.(*lustrepb.ListInstancesResponse)
}
}
all
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListInstancesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListInstancesRequest.
}
for resp, err := range c.ListInstances(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListLocations
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListMirrors
func (c *Client) ListMirrors(ctx context.Context, req *lustrepb.ListMirrorsRequest, opts ...gax.CallOption) *MirrorIteratorListMirrors gets details of multiple mirrors under a given instance.
Examples
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListMirrorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListMirrorsRequest.
}
it := c.ListMirrors(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != 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.(*lustrepb.ListMirrorsResponse)
}
}
all
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.ListMirrorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#ListMirrorsRequest.
}
for resp, err := range c.ListMirrors(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
lustre "cloud.google.com/go/lustre/apiv1"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) RescheduleMaintenance
func (c *Client) RescheduleMaintenance(ctx context.Context, req *lustrepb.RescheduleMaintenanceRequest, opts ...gax.CallOption) (*RescheduleMaintenanceOperation, error)RescheduleMaintenance reschedules a planned maintenance event for a specific instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.RescheduleMaintenanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#RescheduleMaintenanceRequest.
}
op, err := c.RescheduleMaintenance(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) RescheduleMaintenanceOperation
func (c *Client) RescheduleMaintenanceOperation(name string) *RescheduleMaintenanceOperationRescheduleMaintenanceOperation returns a new RescheduleMaintenanceOperation from a given name. The name must be that of a previously created RescheduleMaintenanceOperation, possibly from a different process.
func (*Client) SetIamPolicy
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissions
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
lustre "cloud.google.com/go/lustre/apiv1"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateInstance
func (c *Client) UpdateInstance(ctx context.Context, req *lustrepb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error)UpdateInstance updates the parameters of a single instance.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.UpdateInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#UpdateInstanceRequest.
}
op, err := c.UpdateInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateInstanceOperation
func (c *Client) UpdateInstanceOperation(name string) *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 (*Client) UpdateMirror
func (c *Client) UpdateMirror(ctx context.Context, req *lustrepb.UpdateMirrorRequest, opts ...gax.CallOption) (*UpdateMirrorOperation, error)UpdateMirror updates the parameters of a single mirror.
Example
package main
import (
"context"
lustre "cloud.google.com/go/lustre/apiv1"
lustrepb "cloud.google.com/go/lustre/apiv1/lustrepb"
)
func main() {
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_Options
c, err := lustre.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &lustrepb.UpdateMirrorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/lustre/apiv1/lustrepb#UpdateMirrorRequest.
}
op, err := c.UpdateMirror(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateMirrorOperation
func (c *Client) UpdateMirrorOperation(name string) *UpdateMirrorOperationUpdateMirrorOperation returns a new UpdateMirrorOperation from a given name. The name must be that of a previously created UpdateMirrorOperation, possibly from a different process.
CreateDirectoryPolicyOperation
type CreateDirectoryPolicyOperation struct {
// contains filtered or unexported fields
}CreateDirectoryPolicyOperation manages a long-running operation from CreateDirectoryPolicy.
func (*CreateDirectoryPolicyOperation) Done
func (op *CreateDirectoryPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateDirectoryPolicyOperation) Metadata
func (op *CreateDirectoryPolicyOperation) Metadata() (*lustrepb.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 (*CreateDirectoryPolicyOperation) Name
func (op *CreateDirectoryPolicyOperation) 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 (*CreateDirectoryPolicyOperation) Poll
func (op *CreateDirectoryPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.DirectoryPolicy, 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 and the 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 (*CreateDirectoryPolicyOperation) Wait
func (op *CreateDirectoryPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.DirectoryPolicy, 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
type CreateInstanceOperation struct {
// 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() (*lustrepb.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(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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 and the 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(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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.
CreateMirrorOperation
type CreateMirrorOperation struct {
// contains filtered or unexported fields
}CreateMirrorOperation manages a long-running operation from CreateMirror.
func (*CreateMirrorOperation) Done
func (op *CreateMirrorOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateMirrorOperation) Metadata
func (op *CreateMirrorOperation) Metadata() (*lustrepb.CreateMirrorMetadata, 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 (*CreateMirrorOperation) Name
func (op *CreateMirrorOperation) 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 (*CreateMirrorOperation) Poll
func (op *CreateMirrorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.Mirror, 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 and the 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 (*CreateMirrorOperation) Wait
func (op *CreateMirrorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.Mirror, 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.
DeleteDirectoryPolicyOperation
type DeleteDirectoryPolicyOperation struct {
// contains filtered or unexported fields
}DeleteDirectoryPolicyOperation manages a long-running operation from DeleteDirectoryPolicy.
func (*DeleteDirectoryPolicyOperation) Done
func (op *DeleteDirectoryPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteDirectoryPolicyOperation) Metadata
func (op *DeleteDirectoryPolicyOperation) Metadata() (*lustrepb.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 (*DeleteDirectoryPolicyOperation) Name
func (op *DeleteDirectoryPolicyOperation) 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 (*DeleteDirectoryPolicyOperation) Poll
func (op *DeleteDirectoryPolicyOperation) Poll(ctx context.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 and the 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 (*DeleteDirectoryPolicyOperation) Wait
func (op *DeleteDirectoryPolicyOperation) Wait(ctx context.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
type DeleteInstanceOperation struct {
// 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() (*lustrepb.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(ctx context.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 and the 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(ctx context.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.
DeleteMirrorOperation
type DeleteMirrorOperation struct {
// contains filtered or unexported fields
}DeleteMirrorOperation manages a long-running operation from DeleteMirror.
func (*DeleteMirrorOperation) Done
func (op *DeleteMirrorOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteMirrorOperation) Metadata
func (op *DeleteMirrorOperation) Metadata() (*lustrepb.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 (*DeleteMirrorOperation) Name
func (op *DeleteMirrorOperation) 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 (*DeleteMirrorOperation) Poll
func (op *DeleteMirrorOperation) Poll(ctx context.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 and the 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 (*DeleteMirrorOperation) Wait
func (op *DeleteMirrorOperation) Wait(ctx context.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.
DirectoryPolicyIterator
type DirectoryPolicyIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*lustrepb.DirectoryPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}DirectoryPolicyIterator manages a stream of *lustrepb.DirectoryPolicy.
func (*DirectoryPolicyIterator) All
func (it *DirectoryPolicyIterator) All() iter.Seq2[*lustrepb.DirectoryPolicy, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DirectoryPolicyIterator) Next
func (it *DirectoryPolicyIterator) Next() (*lustrepb.DirectoryPolicy, error)Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*DirectoryPolicyIterator) PageInfo
func (it *DirectoryPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ExportDataOperation
type ExportDataOperation struct {
// contains filtered or unexported fields
}ExportDataOperation manages a long-running operation from ExportData.
func (*ExportDataOperation) Done
func (op *ExportDataOperation) Done() boolDone reports whether the long-running operation has completed.
func (*ExportDataOperation) Metadata
func (op *ExportDataOperation) Metadata() (*lustrepb.ExportDataMetadata, 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 (*ExportDataOperation) Name
func (op *ExportDataOperation) 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 (*ExportDataOperation) Poll
func (op *ExportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.ExportDataResponse, 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 and the 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 (*ExportDataOperation) Wait
func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.ExportDataResponse, 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.
ImportDataOperation
type ImportDataOperation struct {
// contains filtered or unexported fields
}ImportDataOperation manages a long-running operation from ImportData.
func (*ImportDataOperation) Done
func (op *ImportDataOperation) Done() boolDone reports whether the long-running operation has completed.
func (*ImportDataOperation) Metadata
func (op *ImportDataOperation) Metadata() (*lustrepb.ImportDataMetadata, 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 (*ImportDataOperation) Name
func (op *ImportDataOperation) 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 (*ImportDataOperation) Poll
func (op *ImportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.ImportDataResponse, 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 and the 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 (*ImportDataOperation) Wait
func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.ImportDataResponse, 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.
InstanceIterator
type InstanceIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*lustrepb.Instance, nextPageToken string, err error)
// contains filtered or unexported fields
}InstanceIterator manages a stream of *lustrepb.Instance.
func (*InstanceIterator) All
func (it *InstanceIterator) All() iter.Seq2[*lustrepb.Instance, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InstanceIterator) Next
func (it *InstanceIterator) Next() (*lustrepb.Instance, error)Next returns the next result. Its second return value is iterator.Done if there are no more results. 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
type LocationIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
// 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, the iterator 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 more results. 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.
MirrorIterator
type MirrorIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*lustrepb.Mirror, nextPageToken string, err error)
// contains filtered or unexported fields
}MirrorIterator manages a stream of *lustrepb.Mirror.
func (*MirrorIterator) All
func (it *MirrorIterator) All() iter.Seq2[*lustrepb.Mirror, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MirrorIterator) Next
func (it *MirrorIterator) Next() (*lustrepb.Mirror, error)Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*MirrorIterator) PageInfo
func (it *MirrorIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
type OperationIterator struct {
// 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.
Response interface{}
// 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.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// 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, the iterator 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 more results. 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.
RescheduleMaintenanceOperation
type RescheduleMaintenanceOperation struct {
// contains filtered or unexported fields
}RescheduleMaintenanceOperation manages a long-running operation from RescheduleMaintenance.
func (*RescheduleMaintenanceOperation) Done
func (op *RescheduleMaintenanceOperation) Done() boolDone reports whether the long-running operation has completed.
func (*RescheduleMaintenanceOperation) Metadata
func (op *RescheduleMaintenanceOperation) Metadata() (*lustrepb.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 (*RescheduleMaintenanceOperation) Name
func (op *RescheduleMaintenanceOperation) 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 (*RescheduleMaintenanceOperation) Poll
func (op *RescheduleMaintenanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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 and the 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 (*RescheduleMaintenanceOperation) Wait
func (op *RescheduleMaintenanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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.
UpdateInstanceOperation
type UpdateInstanceOperation struct {
// 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() (*lustrepb.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(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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 and the 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(ctx context.Context, opts ...gax.CallOption) (*lustrepb.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.
UpdateMirrorOperation
type UpdateMirrorOperation struct {
// contains filtered or unexported fields
}UpdateMirrorOperation manages a long-running operation from UpdateMirror.
func (*UpdateMirrorOperation) Done
func (op *UpdateMirrorOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateMirrorOperation) Metadata
func (op *UpdateMirrorOperation) Metadata() (*lustrepb.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 (*UpdateMirrorOperation) Name
func (op *UpdateMirrorOperation) 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 (*UpdateMirrorOperation) Poll
func (op *UpdateMirrorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*lustrepb.Mirror, 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 and the 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 (*UpdateMirrorOperation) Wait
func (op *UpdateMirrorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*lustrepb.Mirror, 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.