Vertex AI API v1 - Package cloud.google.com/go/aiplatform/apiv1 (v1.108.0) Stay organized with collections Save and categorize content based on your preferences.
- 1.108.0 (latest)
- 1.107.0
- 1.106.0
- 1.105.0
- 1.104.0
- 1.103.0
- 1.102.0
- 1.101.0
- 1.100.0
- 1.99.0
- 1.98.0
- 1.97.0
- 1.96.0
- 1.95.0
- 1.94.0
- 1.93.0
- 1.92.0
- 1.91.0
- 1.90.0
- 1.89.0
- 1.88.0
- 1.87.0
- 1.86.0
- 1.85.0
- 1.84.0
- 1.83.0
- 1.82.1
- 1.81.0
- 1.80.0
- 1.79.0
- 1.78.0
- 1.77.0
- 1.76.0
- 1.75.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.71.0
- 1.70.0
- 1.69.0
- 1.68.0
- 1.67.0
- 1.66.0
- 1.65.0
- 1.64.0
- 1.63.0
- 1.62.2
- 1.61.0
- 1.60.0
- 1.59.0
- 1.58.2
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.2
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.1
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.1
- 1.35.0
- 1.34.0
- 1.33.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.0.0
- 0.2.0
- 0.1.0
Package aiplatform is an auto-generated package for theVertex AI API.
Train high-quality custom machine learning models with minimal machinelearning expertise and effort.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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:=&aiplatformpb.GenerateSyntheticDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GenerateSyntheticDataRequest.}resp,err:=c.GenerateSyntheticData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewDataFoundryClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AnnotationIterator
typeAnnotationIteratorstruct{// 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[]*aiplatformpb.Annotation,nextPageTokenstring,errerror)// contains filtered or unexported fields}AnnotationIterator manages a stream of *aiplatformpb.Annotation.
func (*AnnotationIterator) All
func(it*AnnotationIterator)All()iter.Seq2[*aiplatformpb.Annotation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AnnotationIterator) Next
func(it*AnnotationIterator)Next()(*aiplatformpb.Annotation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*AnnotationIterator) PageInfo
func(it*AnnotationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ArtifactIterator
typeArtifactIteratorstruct{// 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[]*aiplatformpb.Artifact,nextPageTokenstring,errerror)// contains filtered or unexported fields}ArtifactIterator manages a stream of *aiplatformpb.Artifact.
func (*ArtifactIterator) All
func(it*ArtifactIterator)All()iter.Seq2[*aiplatformpb.Artifact,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ArtifactIterator) Next
func(it*ArtifactIterator)Next()(*aiplatformpb.Artifact,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ArtifactIterator) PageInfo
func(it*ArtifactIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AssignNotebookRuntimeOperation
typeAssignNotebookRuntimeOperationstruct{// contains filtered or unexported fields}AssignNotebookRuntimeOperation manages a long-running operation from AssignNotebookRuntime.
func (*AssignNotebookRuntimeOperation) Done
func(op*AssignNotebookRuntimeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*AssignNotebookRuntimeOperation) Metadata
func(op*AssignNotebookRuntimeOperation)Metadata()(*aiplatformpb.AssignNotebookRuntimeOperationMetadata,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 (*AssignNotebookRuntimeOperation) Name
func(op*AssignNotebookRuntimeOperation)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 (*AssignNotebookRuntimeOperation) Poll
func(op*AssignNotebookRuntimeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookRuntime,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AssignNotebookRuntimeOperation) Wait
func(op*AssignNotebookRuntimeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookRuntime,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.
BatchCancelPipelineJobsOperation
typeBatchCancelPipelineJobsOperationstruct{// contains filtered or unexported fields}BatchCancelPipelineJobsOperation manages a long-running operation from BatchCancelPipelineJobs.
func (*BatchCancelPipelineJobsOperation) Done
func(op*BatchCancelPipelineJobsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchCancelPipelineJobsOperation) Metadata
func(op*BatchCancelPipelineJobsOperation)Metadata()(*aiplatformpb.BatchCancelPipelineJobsOperationMetadata,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 (*BatchCancelPipelineJobsOperation) Name
func(op*BatchCancelPipelineJobsOperation)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 (*BatchCancelPipelineJobsOperation) Poll
func(op*BatchCancelPipelineJobsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchCancelPipelineJobsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchCancelPipelineJobsOperation) Wait
func(op*BatchCancelPipelineJobsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchCancelPipelineJobsResponse,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.
BatchCreateFeaturesOperation
typeBatchCreateFeaturesOperationstruct{// contains filtered or unexported fields}BatchCreateFeaturesOperation manages a long-running operation from BatchCreateFeatures.
func (*BatchCreateFeaturesOperation) Done
func(op*BatchCreateFeaturesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchCreateFeaturesOperation) Metadata
func(op*BatchCreateFeaturesOperation)Metadata()(*aiplatformpb.BatchCreateFeaturesOperationMetadata,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 (*BatchCreateFeaturesOperation) Name
func(op*BatchCreateFeaturesOperation)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 (*BatchCreateFeaturesOperation) Poll
func(op*BatchCreateFeaturesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchCreateFeaturesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchCreateFeaturesOperation) Wait
func(op*BatchCreateFeaturesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchCreateFeaturesResponse,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.
BatchDeletePipelineJobsOperation
typeBatchDeletePipelineJobsOperationstruct{// contains filtered or unexported fields}BatchDeletePipelineJobsOperation manages a long-running operation from BatchDeletePipelineJobs.
func (*BatchDeletePipelineJobsOperation) Done
func(op*BatchDeletePipelineJobsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchDeletePipelineJobsOperation) Metadata
func(op*BatchDeletePipelineJobsOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*BatchDeletePipelineJobsOperation) Name
func(op*BatchDeletePipelineJobsOperation)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 (*BatchDeletePipelineJobsOperation) Poll
func(op*BatchDeletePipelineJobsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchDeletePipelineJobsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchDeletePipelineJobsOperation) Wait
func(op*BatchDeletePipelineJobsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchDeletePipelineJobsResponse,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.
BatchMigrateResourcesOperation
typeBatchMigrateResourcesOperationstruct{// contains filtered or unexported fields}BatchMigrateResourcesOperation manages a long-running operation from BatchMigrateResources.
func (*BatchMigrateResourcesOperation) Done
func(op*BatchMigrateResourcesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchMigrateResourcesOperation) Metadata
func(op*BatchMigrateResourcesOperation)Metadata()(*aiplatformpb.BatchMigrateResourcesOperationMetadata,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 (*BatchMigrateResourcesOperation) Name
func(op*BatchMigrateResourcesOperation)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 (*BatchMigrateResourcesOperation) Poll
func(op*BatchMigrateResourcesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchMigrateResourcesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchMigrateResourcesOperation) Wait
func(op*BatchMigrateResourcesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchMigrateResourcesResponse,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.
BatchPredictionJobIterator
typeBatchPredictionJobIteratorstruct{// 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[]*aiplatformpb.BatchPredictionJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}BatchPredictionJobIterator manages a stream of *aiplatformpb.BatchPredictionJob.
func (*BatchPredictionJobIterator) All
func(it*BatchPredictionJobIterator)All()iter.Seq2[*aiplatformpb.BatchPredictionJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*BatchPredictionJobIterator) Next
func(it*BatchPredictionJobIterator)Next()(*aiplatformpb.BatchPredictionJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*BatchPredictionJobIterator) PageInfo
func(it*BatchPredictionJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BatchReadFeatureValuesOperation
typeBatchReadFeatureValuesOperationstruct{// contains filtered or unexported fields}BatchReadFeatureValuesOperation manages a long-running operation from BatchReadFeatureValues.
func (*BatchReadFeatureValuesOperation) Done
func(op*BatchReadFeatureValuesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*BatchReadFeatureValuesOperation) Metadata
func(op*BatchReadFeatureValuesOperation)Metadata()(*aiplatformpb.BatchReadFeatureValuesOperationMetadata,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 (*BatchReadFeatureValuesOperation) Name
func(op*BatchReadFeatureValuesOperation)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 (*BatchReadFeatureValuesOperation) Poll
func(op*BatchReadFeatureValuesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchReadFeatureValuesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchReadFeatureValuesOperation) Wait
func(op*BatchReadFeatureValuesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.BatchReadFeatureValuesResponse,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.
CachedContentIterator
typeCachedContentIteratorstruct{// 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[]*aiplatformpb.CachedContent,nextPageTokenstring,errerror)// contains filtered or unexported fields}CachedContentIterator manages a stream of *aiplatformpb.CachedContent.
func (*CachedContentIterator) All
func(it*CachedContentIterator)All()iter.Seq2[*aiplatformpb.CachedContent,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*CachedContentIterator) Next
func(it*CachedContentIterator)Next()(*aiplatformpb.CachedContent,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*CachedContentIterator) PageInfo
func(it*CachedContentIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CheckTrialEarlyStoppingStateOperation
typeCheckTrialEarlyStoppingStateOperationstruct{// contains filtered or unexported fields}CheckTrialEarlyStoppingStateOperation manages a long-running operation from CheckTrialEarlyStoppingState.
func (*CheckTrialEarlyStoppingStateOperation) Done
func(op*CheckTrialEarlyStoppingStateOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CheckTrialEarlyStoppingStateOperation) Metadata
func(op*CheckTrialEarlyStoppingStateOperation)Metadata()(*aiplatformpb.CheckTrialEarlyStoppingStateMetatdata,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 (*CheckTrialEarlyStoppingStateOperation) Name
func(op*CheckTrialEarlyStoppingStateOperation)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 (*CheckTrialEarlyStoppingStateOperation) Poll
func(op*CheckTrialEarlyStoppingStateOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.CheckTrialEarlyStoppingStateResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CheckTrialEarlyStoppingStateOperation) Wait
func(op*CheckTrialEarlyStoppingStateOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.CheckTrialEarlyStoppingStateResponse,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.
ContextIterator
typeContextIteratorstruct{// 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[]*aiplatformpb.Context,nextPageTokenstring,errerror)// contains filtered or unexported fields}ContextIterator manages a stream of *aiplatformpb.Context.
func (*ContextIterator) All
func(it*ContextIterator)All()iter.Seq2[*aiplatformpb.Context,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ContextIterator) Next
func(it*ContextIterator)Next()(*aiplatformpb.Context,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ContextIterator) PageInfo
func(it*ContextIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CopyModelOperation
typeCopyModelOperationstruct{// contains filtered or unexported fields}CopyModelOperation manages a long-running operation from CopyModel.
func (*CopyModelOperation) Done
func(op*CopyModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CopyModelOperation) Metadata
func(op*CopyModelOperation)Metadata()(*aiplatformpb.CopyModelOperationMetadata,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 (*CopyModelOperation) Name
func(op*CopyModelOperation)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 (*CopyModelOperation) Poll
func(op*CopyModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.CopyModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CopyModelOperation) Wait
func(op*CopyModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.CopyModelResponse,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.
CreateDatasetOperation
typeCreateDatasetOperationstruct{// contains filtered or unexported fields}CreateDatasetOperation manages a long-running operation from CreateDataset.
func (*CreateDatasetOperation) Done
func(op*CreateDatasetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDatasetOperation) Metadata
func(op*CreateDatasetOperation)Metadata()(*aiplatformpb.CreateDatasetOperationMetadata,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 (*CreateDatasetOperation) Name
func(op*CreateDatasetOperation)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 (*CreateDatasetOperation) Poll
func(op*CreateDatasetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Dataset,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDatasetOperation) Wait
func(op*CreateDatasetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Dataset,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.
CreateDatasetVersionOperation
typeCreateDatasetVersionOperationstruct{// contains filtered or unexported fields}CreateDatasetVersionOperation manages a long-running operation from CreateDatasetVersion.
func (*CreateDatasetVersionOperation) Done
func(op*CreateDatasetVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDatasetVersionOperation) Metadata
func(op*CreateDatasetVersionOperation)Metadata()(*aiplatformpb.CreateDatasetVersionOperationMetadata,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 (*CreateDatasetVersionOperation) Name
func(op*CreateDatasetVersionOperation)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 (*CreateDatasetVersionOperation) Poll
func(op*CreateDatasetVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDatasetVersionOperation) Wait
func(op*CreateDatasetVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,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.
CreateDeploymentResourcePoolOperation
typeCreateDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}CreateDeploymentResourcePoolOperation manages a long-running operation from CreateDeploymentResourcePool.
func (*CreateDeploymentResourcePoolOperation) Done
func(op*CreateDeploymentResourcePoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDeploymentResourcePoolOperation) Metadata
func(op*CreateDeploymentResourcePoolOperation)Metadata()(*aiplatformpb.CreateDeploymentResourcePoolOperationMetadata,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 (*CreateDeploymentResourcePoolOperation) Name
func(op*CreateDeploymentResourcePoolOperation)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 (*CreateDeploymentResourcePoolOperation) Poll
func(op*CreateDeploymentResourcePoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeploymentResourcePool,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDeploymentResourcePoolOperation) Wait
func(op*CreateDeploymentResourcePoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeploymentResourcePool,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.
CreateEndpointOperation
typeCreateEndpointOperationstruct{// contains filtered or unexported fields}CreateEndpointOperation manages a long-running operation from CreateEndpoint.
func (*CreateEndpointOperation) Done
func(op*CreateEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateEndpointOperation) Metadata
func(op*CreateEndpointOperation)Metadata()(*aiplatformpb.CreateEndpointOperationMetadata,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 (*CreateEndpointOperation) Name
func(op*CreateEndpointOperation)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 (*CreateEndpointOperation) Poll
func(op*CreateEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Endpoint,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEndpointOperation) Wait
func(op*CreateEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Endpoint,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.
CreateEntityTypeOperation
typeCreateEntityTypeOperationstruct{// contains filtered or unexported fields}CreateEntityTypeOperation manages a long-running operation from CreateEntityType.
func (*CreateEntityTypeOperation) Done
func(op*CreateEntityTypeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateEntityTypeOperation) Metadata
func(op*CreateEntityTypeOperation)Metadata()(*aiplatformpb.CreateEntityTypeOperationMetadata,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 (*CreateEntityTypeOperation) Name
func(op*CreateEntityTypeOperation)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 (*CreateEntityTypeOperation) Poll
func(op*CreateEntityTypeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.EntityType,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEntityTypeOperation) Wait
func(op*CreateEntityTypeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.EntityType,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.
CreateFeatureGroupOperation
typeCreateFeatureGroupOperationstruct{// contains filtered or unexported fields}CreateFeatureGroupOperation manages a long-running operation from CreateFeatureGroup.
func (*CreateFeatureGroupOperation) Done
func(op*CreateFeatureGroupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateFeatureGroupOperation) Metadata
func(op*CreateFeatureGroupOperation)Metadata()(*aiplatformpb.CreateFeatureGroupOperationMetadata,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 (*CreateFeatureGroupOperation) Name
func(op*CreateFeatureGroupOperation)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 (*CreateFeatureGroupOperation) Poll
func(op*CreateFeatureGroupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureGroup,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateFeatureGroupOperation) Wait
func(op*CreateFeatureGroupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureGroup,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.
CreateFeatureOnlineStoreOperation
typeCreateFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}CreateFeatureOnlineStoreOperation manages a long-running operation from CreateFeatureOnlineStore.
func (*CreateFeatureOnlineStoreOperation) Done
func(op*CreateFeatureOnlineStoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateFeatureOnlineStoreOperation) Metadata
func(op*CreateFeatureOnlineStoreOperation)Metadata()(*aiplatformpb.CreateFeatureOnlineStoreOperationMetadata,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 (*CreateFeatureOnlineStoreOperation) Name
func(op*CreateFeatureOnlineStoreOperation)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 (*CreateFeatureOnlineStoreOperation) Poll
func(op*CreateFeatureOnlineStoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureOnlineStore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateFeatureOnlineStoreOperation) Wait
func(op*CreateFeatureOnlineStoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureOnlineStore,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.
CreateFeatureOperation
typeCreateFeatureOperationstruct{// contains filtered or unexported fields}CreateFeatureOperation manages a long-running operation from CreateFeature.
func (*CreateFeatureOperation) Done
func(op*CreateFeatureOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateFeatureOperation) Metadata
func(op*CreateFeatureOperation)Metadata()(*aiplatformpb.CreateFeatureOperationMetadata,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 (*CreateFeatureOperation) Name
func(op*CreateFeatureOperation)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 (*CreateFeatureOperation) Poll
func(op*CreateFeatureOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Feature,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateFeatureOperation) Wait
func(op*CreateFeatureOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Feature,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.
CreateFeatureViewOperation
typeCreateFeatureViewOperationstruct{// contains filtered or unexported fields}CreateFeatureViewOperation manages a long-running operation from CreateFeatureView.
func (*CreateFeatureViewOperation) Done
func(op*CreateFeatureViewOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateFeatureViewOperation) Metadata
func(op*CreateFeatureViewOperation)Metadata()(*aiplatformpb.CreateFeatureViewOperationMetadata,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 (*CreateFeatureViewOperation) Name
func(op*CreateFeatureViewOperation)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 (*CreateFeatureViewOperation) Poll
func(op*CreateFeatureViewOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureView,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateFeatureViewOperation) Wait
func(op*CreateFeatureViewOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureView,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.
CreateFeaturestoreOperation
typeCreateFeaturestoreOperationstruct{// contains filtered or unexported fields}CreateFeaturestoreOperation manages a long-running operation from CreateFeaturestore.
func (*CreateFeaturestoreOperation) Done
func(op*CreateFeaturestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateFeaturestoreOperation) Metadata
func(op*CreateFeaturestoreOperation)Metadata()(*aiplatformpb.CreateFeaturestoreOperationMetadata,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 (*CreateFeaturestoreOperation) Name
func(op*CreateFeaturestoreOperation)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 (*CreateFeaturestoreOperation) Poll
func(op*CreateFeaturestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Featurestore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateFeaturestoreOperation) Wait
func(op*CreateFeaturestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Featurestore,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.
CreateIndexEndpointOperation
typeCreateIndexEndpointOperationstruct{// contains filtered or unexported fields}CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
func (*CreateIndexEndpointOperation) Done
func(op*CreateIndexEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateIndexEndpointOperation) Metadata
func(op*CreateIndexEndpointOperation)Metadata()(*aiplatformpb.CreateIndexEndpointOperationMetadata,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 (*CreateIndexEndpointOperation) Name
func(op*CreateIndexEndpointOperation)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 (*CreateIndexEndpointOperation) Poll
func(op*CreateIndexEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.IndexEndpoint,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexEndpointOperation) Wait
func(op*CreateIndexEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.IndexEndpoint,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.
CreateIndexOperation
typeCreateIndexOperationstruct{// contains filtered or unexported fields}CreateIndexOperation manages a long-running operation from CreateIndex.
func (*CreateIndexOperation) Done
func(op*CreateIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateIndexOperation) Metadata
func(op*CreateIndexOperation)Metadata()(*aiplatformpb.CreateIndexOperationMetadata,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 (*CreateIndexOperation) Name
func(op*CreateIndexOperation)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 (*CreateIndexOperation) Poll
func(op*CreateIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Index,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexOperation) Wait
func(op*CreateIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Index,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.
CreateMetadataStoreOperation
typeCreateMetadataStoreOperationstruct{// contains filtered or unexported fields}CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore.
func (*CreateMetadataStoreOperation) Done
func(op*CreateMetadataStoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateMetadataStoreOperation) Metadata
func(op*CreateMetadataStoreOperation)Metadata()(*aiplatformpb.CreateMetadataStoreOperationMetadata,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 (*CreateMetadataStoreOperation) Name
func(op*CreateMetadataStoreOperation)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 (*CreateMetadataStoreOperation) Poll
func(op*CreateMetadataStoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MetadataStore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateMetadataStoreOperation) Wait
func(op*CreateMetadataStoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MetadataStore,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.
CreateNotebookExecutionJobOperation
typeCreateNotebookExecutionJobOperationstruct{// contains filtered or unexported fields}CreateNotebookExecutionJobOperation manages a long-running operation from CreateNotebookExecutionJob.
func (*CreateNotebookExecutionJobOperation) Done
func(op*CreateNotebookExecutionJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateNotebookExecutionJobOperation) Metadata
func(op*CreateNotebookExecutionJobOperation)Metadata()(*aiplatformpb.CreateNotebookExecutionJobOperationMetadata,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 (*CreateNotebookExecutionJobOperation) Name
func(op*CreateNotebookExecutionJobOperation)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 (*CreateNotebookExecutionJobOperation) Poll
func(op*CreateNotebookExecutionJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookExecutionJob,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateNotebookExecutionJobOperation) Wait
func(op*CreateNotebookExecutionJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookExecutionJob,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.
CreateNotebookRuntimeTemplateOperation
typeCreateNotebookRuntimeTemplateOperationstruct{// contains filtered or unexported fields}CreateNotebookRuntimeTemplateOperation manages a long-running operation from CreateNotebookRuntimeTemplate.
func (*CreateNotebookRuntimeTemplateOperation) Done
func(op*CreateNotebookRuntimeTemplateOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateNotebookRuntimeTemplateOperation) Metadata
func(op*CreateNotebookRuntimeTemplateOperation)Metadata()(*aiplatformpb.CreateNotebookRuntimeTemplateOperationMetadata,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 (*CreateNotebookRuntimeTemplateOperation) Name
func(op*CreateNotebookRuntimeTemplateOperation)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 (*CreateNotebookRuntimeTemplateOperation) Poll
func(op*CreateNotebookRuntimeTemplateOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookRuntimeTemplate,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateNotebookRuntimeTemplateOperation) Wait
func(op*CreateNotebookRuntimeTemplateOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.NotebookRuntimeTemplate,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.
CreatePersistentResourceOperation
typeCreatePersistentResourceOperationstruct{// contains filtered or unexported fields}CreatePersistentResourceOperation manages a long-running operation from CreatePersistentResource.
func (*CreatePersistentResourceOperation) Done
func(op*CreatePersistentResourceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreatePersistentResourceOperation) Metadata
func(op*CreatePersistentResourceOperation)Metadata()(*aiplatformpb.CreatePersistentResourceOperationMetadata,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 (*CreatePersistentResourceOperation) Name
func(op*CreatePersistentResourceOperation)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 (*CreatePersistentResourceOperation) Poll
func(op*CreatePersistentResourceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreatePersistentResourceOperation) Wait
func(op*CreatePersistentResourceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,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.
CreateRagCorpusOperation
typeCreateRagCorpusOperationstruct{// contains filtered or unexported fields}CreateRagCorpusOperation manages a long-running operation from CreateRagCorpus.
func (*CreateRagCorpusOperation) Done
func(op*CreateRagCorpusOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateRagCorpusOperation) Metadata
func(op*CreateRagCorpusOperation)Metadata()(*aiplatformpb.CreateRagCorpusOperationMetadata,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 (*CreateRagCorpusOperation) Name
func(op*CreateRagCorpusOperation)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 (*CreateRagCorpusOperation) Poll
func(op*CreateRagCorpusOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagCorpus,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateRagCorpusOperation) Wait
func(op*CreateRagCorpusOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagCorpus,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.
CreateReasoningEngineOperation
typeCreateReasoningEngineOperationstruct{// contains filtered or unexported fields}CreateReasoningEngineOperation manages a long-running operation from CreateReasoningEngine.
func (*CreateReasoningEngineOperation) Done
func(op*CreateReasoningEngineOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateReasoningEngineOperation) Metadata
func(op*CreateReasoningEngineOperation)Metadata()(*aiplatformpb.CreateReasoningEngineOperationMetadata,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 (*CreateReasoningEngineOperation) Name
func(op*CreateReasoningEngineOperation)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 (*CreateReasoningEngineOperation) Poll
func(op*CreateReasoningEngineOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ReasoningEngine,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateReasoningEngineOperation) Wait
func(op*CreateReasoningEngineOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ReasoningEngine,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.
CreateSpecialistPoolOperation
typeCreateSpecialistPoolOperationstruct{// contains filtered or unexported fields}CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool.
func (*CreateSpecialistPoolOperation) Done
func(op*CreateSpecialistPoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateSpecialistPoolOperation) Metadata
func(op*CreateSpecialistPoolOperation)Metadata()(*aiplatformpb.CreateSpecialistPoolOperationMetadata,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 (*CreateSpecialistPoolOperation) Name
func(op*CreateSpecialistPoolOperation)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 (*CreateSpecialistPoolOperation) Poll
func(op*CreateSpecialistPoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SpecialistPool,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateSpecialistPoolOperation) Wait
func(op*CreateSpecialistPoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SpecialistPool,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.
CreateTensorboardOperation
typeCreateTensorboardOperationstruct{// contains filtered or unexported fields}CreateTensorboardOperation manages a long-running operation from CreateTensorboard.
func (*CreateTensorboardOperation) Done
func(op*CreateTensorboardOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateTensorboardOperation) Metadata
func(op*CreateTensorboardOperation)Metadata()(*aiplatformpb.CreateTensorboardOperationMetadata,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 (*CreateTensorboardOperation) Name
func(op*CreateTensorboardOperation)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 (*CreateTensorboardOperation) Poll
func(op*CreateTensorboardOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Tensorboard,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateTensorboardOperation) Wait
func(op*CreateTensorboardOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Tensorboard,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.
CustomJobIterator
typeCustomJobIteratorstruct{// 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[]*aiplatformpb.CustomJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}CustomJobIterator manages a stream of *aiplatformpb.CustomJob.
func (*CustomJobIterator) All
func(it*CustomJobIterator)All()iter.Seq2[*aiplatformpb.CustomJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*CustomJobIterator) Next
func(it*CustomJobIterator)Next()(*aiplatformpb.CustomJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*CustomJobIterator) PageInfo
func(it*CustomJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataFoundryCallOptions
typeDataFoundryCallOptionsstruct{GenerateSyntheticData[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}DataFoundryCallOptions contains the retry settings for each method of DataFoundryClient.
DataFoundryClient
typeDataFoundryClientstruct{// The call options for this service.CallOptions*DataFoundryCallOptions// contains filtered or unexported fields}DataFoundryClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for generating and preparing datasets for Gen AI evaluation.
func NewDataFoundryClient
funcNewDataFoundryClient(ctxcontext.Context,opts...option.ClientOption)(*DataFoundryClient,error)NewDataFoundryClient creates a new data foundry service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for generating and preparing datasets for Gen AI evaluation.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*DataFoundryClient) CancelOperation
func(c*DataFoundryClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) Close
func(c*DataFoundryClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*DataFoundryClient) Connection (deprecated)
func(c*DataFoundryClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*DataFoundryClient) DeleteOperation
func(c*DataFoundryClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) GenerateSyntheticData
func(c*DataFoundryClient)GenerateSyntheticData(ctxcontext.Context,req*aiplatformpb.GenerateSyntheticDataRequest,opts...gax.CallOption)(*aiplatformpb.GenerateSyntheticDataResponse,error)GenerateSyntheticData generates synthetic data based on the provided configuration.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GenerateSyntheticDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GenerateSyntheticDataRequest.}resp,err:=c.GenerateSyntheticData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataFoundryClient) GetIamPolicy
func(c*DataFoundryClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataFoundryClient) GetLocation
func(c*DataFoundryClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) GetOperation
func(c*DataFoundryClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) ListLocations
func(c*DataFoundryClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) ListOperations
func(c*DataFoundryClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(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 (*DataFoundryClient) SetIamPolicy
func(c*DataFoundryClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataFoundryClient) TestIamPermissions
func(c*DataFoundryClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DataFoundryClient) WaitOperation
func(c*DataFoundryClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDataFoundryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}DataItemIterator
typeDataItemIteratorstruct{// 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[]*aiplatformpb.DataItem,nextPageTokenstring,errerror)// contains filtered or unexported fields}DataItemIterator manages a stream of *aiplatformpb.DataItem.
func (*DataItemIterator) All
func(it*DataItemIterator)All()iter.Seq2[*aiplatformpb.DataItem,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DataItemIterator) Next
func(it*DataItemIterator)Next()(*aiplatformpb.DataItem,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DataItemIterator) PageInfo
func(it*DataItemIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataItemViewIterator
typeDataItemViewIteratorstruct{// 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[]*aiplatformpb.DataItemView,nextPageTokenstring,errerror)// contains filtered or unexported fields}DataItemViewIterator manages a stream of *aiplatformpb.DataItemView.
func (*DataItemViewIterator) All
func(it*DataItemViewIterator)All()iter.Seq2[*aiplatformpb.DataItemView,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DataItemViewIterator) Next
func(it*DataItemViewIterator)Next()(*aiplatformpb.DataItemView,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DataItemViewIterator) PageInfo
func(it*DataItemViewIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataLabelingJobIterator
typeDataLabelingJobIteratorstruct{// 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[]*aiplatformpb.DataLabelingJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}DataLabelingJobIterator manages a stream of *aiplatformpb.DataLabelingJob.
func (*DataLabelingJobIterator) All
func(it*DataLabelingJobIterator)All()iter.Seq2[*aiplatformpb.DataLabelingJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DataLabelingJobIterator) Next
func(it*DataLabelingJobIterator)Next()(*aiplatformpb.DataLabelingJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DataLabelingJobIterator) PageInfo
func(it*DataLabelingJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DatasetCallOptions
typeDatasetCallOptionsstruct{CreateDataset[]gax.CallOptionGetDataset[]gax.CallOptionUpdateDataset[]gax.CallOptionListDatasets[]gax.CallOptionDeleteDataset[]gax.CallOptionImportData[]gax.CallOptionExportData[]gax.CallOptionCreateDatasetVersion[]gax.CallOptionUpdateDatasetVersion[]gax.CallOptionDeleteDatasetVersion[]gax.CallOptionGetDatasetVersion[]gax.CallOptionListDatasetVersions[]gax.CallOptionRestoreDatasetVersion[]gax.CallOptionListDataItems[]gax.CallOptionSearchDataItems[]gax.CallOptionListSavedQueries[]gax.CallOptionDeleteSavedQuery[]gax.CallOptionGetAnnotationSpec[]gax.CallOptionListAnnotations[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}DatasetCallOptions contains the retry settings for each method of DatasetClient.
DatasetClient
typeDatasetClientstruct{// The call options for this service.CallOptions*DatasetCallOptions// 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}DatasetClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that manages Vertex AI Dataset and its child resources.
func NewDatasetClient
funcNewDatasetClient(ctxcontext.Context,opts...option.ClientOption)(*DatasetClient,error)NewDatasetClient creates a new dataset service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that manages Vertex AI Dataset and its child resources.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*DatasetClient) CancelOperation
func(c*DatasetClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) Close
func(c*DatasetClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*DatasetClient) Connection (deprecated)
func(c*DatasetClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*DatasetClient) CreateDataset
func(c*DatasetClient)CreateDataset(ctxcontext.Context,req*aiplatformpb.CreateDatasetRequest,opts...gax.CallOption)(*CreateDatasetOperation,error)CreateDataset creates a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateDatasetRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateDatasetRequest.}op,err:=c.CreateDataset(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) CreateDatasetOperation
func(c*DatasetClient)CreateDatasetOperation(namestring)*CreateDatasetOperationCreateDatasetOperation returns a new CreateDatasetOperation from a given name.The name must be that of a previously created CreateDatasetOperation, possibly from a different process.
func (*DatasetClient) CreateDatasetVersion
func(c*DatasetClient)CreateDatasetVersion(ctxcontext.Context,req*aiplatformpb.CreateDatasetVersionRequest,opts...gax.CallOption)(*CreateDatasetVersionOperation,error)CreateDatasetVersion create a version from a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateDatasetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateDatasetVersionRequest.}op,err:=c.CreateDatasetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) CreateDatasetVersionOperation
func(c*DatasetClient)CreateDatasetVersionOperation(namestring)*CreateDatasetVersionOperationCreateDatasetVersionOperation returns a new CreateDatasetVersionOperation from a given name.The name must be that of a previously created CreateDatasetVersionOperation, possibly from a different process.
func (*DatasetClient) DeleteDataset
func(c*DatasetClient)DeleteDataset(ctxcontext.Context,req*aiplatformpb.DeleteDatasetRequest,opts...gax.CallOption)(*DeleteDatasetOperation,error)DeleteDataset deletes a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteDatasetRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteDatasetRequest.}op,err:=c.DeleteDataset(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DatasetClient) DeleteDatasetOperation
func(c*DatasetClient)DeleteDatasetOperation(namestring)*DeleteDatasetOperationDeleteDatasetOperation returns a new DeleteDatasetOperation from a given name.The name must be that of a previously created DeleteDatasetOperation, possibly from a different process.
func (*DatasetClient) DeleteDatasetVersion
func(c*DatasetClient)DeleteDatasetVersion(ctxcontext.Context,req*aiplatformpb.DeleteDatasetVersionRequest,opts...gax.CallOption)(*DeleteDatasetVersionOperation,error)DeleteDatasetVersion deletes a Dataset version.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteDatasetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteDatasetVersionRequest.}op,err:=c.DeleteDatasetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DatasetClient) DeleteDatasetVersionOperation
func(c*DatasetClient)DeleteDatasetVersionOperation(namestring)*DeleteDatasetVersionOperationDeleteDatasetVersionOperation returns a new DeleteDatasetVersionOperation from a given name.The name must be that of a previously created DeleteDatasetVersionOperation, possibly from a different process.
func (*DatasetClient) DeleteOperation
func(c*DatasetClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) DeleteSavedQuery
func(c*DatasetClient)DeleteSavedQuery(ctxcontext.Context,req*aiplatformpb.DeleteSavedQueryRequest,opts...gax.CallOption)(*DeleteSavedQueryOperation,error)DeleteSavedQuery deletes a SavedQuery.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteSavedQueryRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteSavedQueryRequest.}op,err:=c.DeleteSavedQuery(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DatasetClient) DeleteSavedQueryOperation
func(c*DatasetClient)DeleteSavedQueryOperation(namestring)*DeleteSavedQueryOperationDeleteSavedQueryOperation returns a new DeleteSavedQueryOperation from a given name.The name must be that of a previously created DeleteSavedQueryOperation, possibly from a different process.
func (*DatasetClient) ExportData
func(c*DatasetClient)ExportData(ctxcontext.Context,req*aiplatformpb.ExportDataRequest,opts...gax.CallOption)(*ExportDataOperation,error)ExportData exports data from a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExportDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExportDataRequest.}op,err:=c.ExportData(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) ExportDataOperation
func(c*DatasetClient)ExportDataOperation(namestring)*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 (*DatasetClient) GetAnnotationSpec
func(c*DatasetClient)GetAnnotationSpec(ctxcontext.Context,req*aiplatformpb.GetAnnotationSpecRequest,opts...gax.CallOption)(*aiplatformpb.AnnotationSpec,error)GetAnnotationSpec gets an AnnotationSpec.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetAnnotationSpecRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetAnnotationSpecRequest.}resp,err:=c.GetAnnotationSpec(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) GetDataset
func(c*DatasetClient)GetDataset(ctxcontext.Context,req*aiplatformpb.GetDatasetRequest,opts...gax.CallOption)(*aiplatformpb.Dataset,error)GetDataset gets a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetDatasetRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetDatasetRequest.}resp,err:=c.GetDataset(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) GetDatasetVersion
func(c*DatasetClient)GetDatasetVersion(ctxcontext.Context,req*aiplatformpb.GetDatasetVersionRequest,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,error)GetDatasetVersion gets a Dataset version.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetDatasetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetDatasetVersionRequest.}resp,err:=c.GetDatasetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) GetIamPolicy
func(c*DatasetClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) GetLocation
func(c*DatasetClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) GetOperation
func(c*DatasetClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) ImportData
func(c*DatasetClient)ImportData(ctxcontext.Context,req*aiplatformpb.ImportDataRequest,opts...gax.CallOption)(*ImportDataOperation,error)ImportData imports data into a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ImportDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ImportDataRequest.}op,err:=c.ImportData(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) ImportDataOperation
func(c*DatasetClient)ImportDataOperation(namestring)*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 (*DatasetClient) ListAnnotations
func(c*DatasetClient)ListAnnotations(ctxcontext.Context,req*aiplatformpb.ListAnnotationsRequest,opts...gax.CallOption)*AnnotationIteratorListAnnotations lists Annotations belongs to a dataitemThis RPC is only available in InternalDatasetService. It is only used forexporting conversation data to CCAI Insights.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListAnnotationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListAnnotationsRequest.}it:=c.ListAnnotations(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.(*aiplatformpb.ListAnnotationsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListAnnotationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListAnnotationsRequest.}forresp,err:=rangec.ListAnnotations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) ListDataItems
func(c*DatasetClient)ListDataItems(ctxcontext.Context,req*aiplatformpb.ListDataItemsRequest,opts...gax.CallOption)*DataItemIteratorListDataItems lists DataItems in a Dataset.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDataItemsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDataItemsRequest.}it:=c.ListDataItems(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.(*aiplatformpb.ListDataItemsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDataItemsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDataItemsRequest.}forresp,err:=rangec.ListDataItems(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) ListDatasetVersions
func(c*DatasetClient)ListDatasetVersions(ctxcontext.Context,req*aiplatformpb.ListDatasetVersionsRequest,opts...gax.CallOption)*DatasetVersionIteratorListDatasetVersions lists DatasetVersions in a Dataset.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDatasetVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDatasetVersionsRequest.}it:=c.ListDatasetVersions(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.(*aiplatformpb.ListDatasetVersionsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDatasetVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDatasetVersionsRequest.}forresp,err:=rangec.ListDatasetVersions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) ListDatasets
func(c*DatasetClient)ListDatasets(ctxcontext.Context,req*aiplatformpb.ListDatasetsRequest,opts...gax.CallOption)*DatasetIteratorListDatasets lists Datasets in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDatasetsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDatasetsRequest.}it:=c.ListDatasets(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.(*aiplatformpb.ListDatasetsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDatasetsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDatasetsRequest.}forresp,err:=rangec.ListDatasets(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) ListLocations
func(c*DatasetClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) ListOperations
func(c*DatasetClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(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 (*DatasetClient) ListSavedQueries
func(c*DatasetClient)ListSavedQueries(ctxcontext.Context,req*aiplatformpb.ListSavedQueriesRequest,opts...gax.CallOption)*SavedQueryIteratorListSavedQueries lists SavedQueries in a Dataset.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSavedQueriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSavedQueriesRequest.}it:=c.ListSavedQueries(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.(*aiplatformpb.ListSavedQueriesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSavedQueriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSavedQueriesRequest.}forresp,err:=rangec.ListSavedQueries(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) RestoreDatasetVersion
func(c*DatasetClient)RestoreDatasetVersion(ctxcontext.Context,req*aiplatformpb.RestoreDatasetVersionRequest,opts...gax.CallOption)(*RestoreDatasetVersionOperation,error)RestoreDatasetVersion restores a dataset version.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RestoreDatasetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RestoreDatasetVersionRequest.}op,err:=c.RestoreDatasetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) RestoreDatasetVersionOperation
func(c*DatasetClient)RestoreDatasetVersionOperation(namestring)*RestoreDatasetVersionOperationRestoreDatasetVersionOperation returns a new RestoreDatasetVersionOperation from a given name.The name must be that of a previously created RestoreDatasetVersionOperation, possibly from a different process.
func (*DatasetClient) SearchDataItems
func(c*DatasetClient)SearchDataItems(ctxcontext.Context,req*aiplatformpb.SearchDataItemsRequest,opts...gax.CallOption)*DataItemViewIteratorSearchDataItems searches DataItems in a Dataset.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchDataItemsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchDataItemsRequest.}it:=c.SearchDataItems(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.(*aiplatformpb.SearchDataItemsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchDataItemsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchDataItemsRequest.}forresp,err:=rangec.SearchDataItems(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DatasetClient) SetIamPolicy
func(c*DatasetClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) TestIamPermissions
func(c*DatasetClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) UpdateDataset
func(c*DatasetClient)UpdateDataset(ctxcontext.Context,req*aiplatformpb.UpdateDatasetRequest,opts...gax.CallOption)(*aiplatformpb.Dataset,error)UpdateDataset updates a Dataset.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateDatasetRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateDatasetRequest.}resp,err:=c.UpdateDataset(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) UpdateDatasetVersion
func(c*DatasetClient)UpdateDatasetVersion(ctxcontext.Context,req*aiplatformpb.UpdateDatasetVersionRequest,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,error)UpdateDatasetVersion updates a DatasetVersion.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateDatasetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateDatasetVersionRequest.}resp,err:=c.UpdateDatasetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DatasetClient) WaitOperation
func(c*DatasetClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDatasetClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}DatasetIterator
typeDatasetIteratorstruct{// 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[]*aiplatformpb.Dataset,nextPageTokenstring,errerror)// contains filtered or unexported fields}DatasetIterator manages a stream of *aiplatformpb.Dataset.
func (*DatasetIterator) All
func(it*DatasetIterator)All()iter.Seq2[*aiplatformpb.Dataset,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DatasetIterator) Next
func(it*DatasetIterator)Next()(*aiplatformpb.Dataset,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DatasetIterator) PageInfo
func(it*DatasetIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DatasetVersionIterator
typeDatasetVersionIteratorstruct{// 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[]*aiplatformpb.DatasetVersion,nextPageTokenstring,errerror)// contains filtered or unexported fields}DatasetVersionIterator manages a stream of *aiplatformpb.DatasetVersion.
func (*DatasetVersionIterator) All
func(it*DatasetVersionIterator)All()iter.Seq2[*aiplatformpb.DatasetVersion,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DatasetVersionIterator) Next
func(it*DatasetVersionIterator)Next()(*aiplatformpb.DatasetVersion,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DatasetVersionIterator) PageInfo
func(it*DatasetVersionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeleteArtifactOperation
typeDeleteArtifactOperationstruct{// contains filtered or unexported fields}DeleteArtifactOperation manages a long-running operation from DeleteArtifact.
func (*DeleteArtifactOperation) Done
func(op*DeleteArtifactOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteArtifactOperation) Metadata
func(op*DeleteArtifactOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteArtifactOperation) Name
func(op*DeleteArtifactOperation)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 (*DeleteArtifactOperation) Poll
func(op*DeleteArtifactOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteArtifactOperation) Wait
func(op*DeleteArtifactOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBatchPredictionJobOperation
typeDeleteBatchPredictionJobOperationstruct{// contains filtered or unexported fields}DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob.
func (*DeleteBatchPredictionJobOperation) Done
func(op*DeleteBatchPredictionJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteBatchPredictionJobOperation) Metadata
func(op*DeleteBatchPredictionJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteBatchPredictionJobOperation) Name
func(op*DeleteBatchPredictionJobOperation)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 (*DeleteBatchPredictionJobOperation) Poll
func(op*DeleteBatchPredictionJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBatchPredictionJobOperation) Wait
func(op*DeleteBatchPredictionJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteContextOperation
typeDeleteContextOperationstruct{// contains filtered or unexported fields}DeleteContextOperation manages a long-running operation from DeleteContext.
func (*DeleteContextOperation) Done
func(op*DeleteContextOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteContextOperation) Metadata
func(op*DeleteContextOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteContextOperation) Name
func(op*DeleteContextOperation)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 (*DeleteContextOperation) Poll
func(op*DeleteContextOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteContextOperation) Wait
func(op*DeleteContextOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteCustomJobOperation
typeDeleteCustomJobOperationstruct{// contains filtered or unexported fields}DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob.
func (*DeleteCustomJobOperation) Done
func(op*DeleteCustomJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteCustomJobOperation) Metadata
func(op*DeleteCustomJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteCustomJobOperation) Name
func(op*DeleteCustomJobOperation)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 (*DeleteCustomJobOperation) Poll
func(op*DeleteCustomJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteCustomJobOperation) Wait
func(op*DeleteCustomJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDataLabelingJobOperation
typeDeleteDataLabelingJobOperationstruct{// contains filtered or unexported fields}DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob.
func (*DeleteDataLabelingJobOperation) Done
func(op*DeleteDataLabelingJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDataLabelingJobOperation) Metadata
func(op*DeleteDataLabelingJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteDataLabelingJobOperation) Name
func(op*DeleteDataLabelingJobOperation)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 (*DeleteDataLabelingJobOperation) Poll
func(op*DeleteDataLabelingJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDataLabelingJobOperation) Wait
func(op*DeleteDataLabelingJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDatasetOperation
typeDeleteDatasetOperationstruct{// contains filtered or unexported fields}DeleteDatasetOperation manages a long-running operation from DeleteDataset.
func (*DeleteDatasetOperation) Done
func(op*DeleteDatasetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDatasetOperation) Metadata
func(op*DeleteDatasetOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteDatasetOperation) Name
func(op*DeleteDatasetOperation)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 (*DeleteDatasetOperation) Poll
func(op*DeleteDatasetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDatasetOperation) Wait
func(op*DeleteDatasetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDatasetVersionOperation
typeDeleteDatasetVersionOperationstruct{// contains filtered or unexported fields}DeleteDatasetVersionOperation manages a long-running operation from DeleteDatasetVersion.
func (*DeleteDatasetVersionOperation) Done
func(op*DeleteDatasetVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDatasetVersionOperation) Metadata
func(op*DeleteDatasetVersionOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteDatasetVersionOperation) Name
func(op*DeleteDatasetVersionOperation)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 (*DeleteDatasetVersionOperation) Poll
func(op*DeleteDatasetVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDatasetVersionOperation) Wait
func(op*DeleteDatasetVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDeploymentResourcePoolOperation
typeDeleteDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}DeleteDeploymentResourcePoolOperation manages a long-running operation from DeleteDeploymentResourcePool.
func (*DeleteDeploymentResourcePoolOperation) Done
func(op*DeleteDeploymentResourcePoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDeploymentResourcePoolOperation) Metadata
func(op*DeleteDeploymentResourcePoolOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteDeploymentResourcePoolOperation) Name
func(op*DeleteDeploymentResourcePoolOperation)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 (*DeleteDeploymentResourcePoolOperation) Poll
func(op*DeleteDeploymentResourcePoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDeploymentResourcePoolOperation) Wait
func(op*DeleteDeploymentResourcePoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteEndpointOperation
typeDeleteEndpointOperationstruct{// contains filtered or unexported fields}DeleteEndpointOperation manages a long-running operation from DeleteEndpoint.
func (*DeleteEndpointOperation) Done
func(op*DeleteEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteEndpointOperation) Metadata
func(op*DeleteEndpointOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteEndpointOperation) Name
func(op*DeleteEndpointOperation)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 (*DeleteEndpointOperation) Poll
func(op*DeleteEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteEndpointOperation) Wait
func(op*DeleteEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteEntityTypeOperation
typeDeleteEntityTypeOperationstruct{// contains filtered or unexported fields}DeleteEntityTypeOperation manages a long-running operation from DeleteEntityType.
func (*DeleteEntityTypeOperation) Done
func(op*DeleteEntityTypeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteEntityTypeOperation) Metadata
func(op*DeleteEntityTypeOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteEntityTypeOperation) Name
func(op*DeleteEntityTypeOperation)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 (*DeleteEntityTypeOperation) Poll
func(op*DeleteEntityTypeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteEntityTypeOperation) Wait
func(op*DeleteEntityTypeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteExecutionOperation
typeDeleteExecutionOperationstruct{// contains filtered or unexported fields}DeleteExecutionOperation manages a long-running operation from DeleteExecution.
func (*DeleteExecutionOperation) Done
func(op*DeleteExecutionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteExecutionOperation) Metadata
func(op*DeleteExecutionOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteExecutionOperation) Name
func(op*DeleteExecutionOperation)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 (*DeleteExecutionOperation) Poll
func(op*DeleteExecutionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteExecutionOperation) Wait
func(op*DeleteExecutionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFeatureGroupOperation
typeDeleteFeatureGroupOperationstruct{// contains filtered or unexported fields}DeleteFeatureGroupOperation manages a long-running operation from DeleteFeatureGroup.
func (*DeleteFeatureGroupOperation) Done
func(op*DeleteFeatureGroupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeatureGroupOperation) Metadata
func(op*DeleteFeatureGroupOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteFeatureGroupOperation) Name
func(op*DeleteFeatureGroupOperation)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 (*DeleteFeatureGroupOperation) Poll
func(op*DeleteFeatureGroupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeatureGroupOperation) Wait
func(op*DeleteFeatureGroupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFeatureOnlineStoreOperation
typeDeleteFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}DeleteFeatureOnlineStoreOperation manages a long-running operation from DeleteFeatureOnlineStore.
func (*DeleteFeatureOnlineStoreOperation) Done
func(op*DeleteFeatureOnlineStoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeatureOnlineStoreOperation) Metadata
func(op*DeleteFeatureOnlineStoreOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteFeatureOnlineStoreOperation) Name
func(op*DeleteFeatureOnlineStoreOperation)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 (*DeleteFeatureOnlineStoreOperation) Poll
func(op*DeleteFeatureOnlineStoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeatureOnlineStoreOperation) Wait
func(op*DeleteFeatureOnlineStoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFeatureOperation
typeDeleteFeatureOperationstruct{// contains filtered or unexported fields}DeleteFeatureOperation manages a long-running operation from DeleteFeature.
func (*DeleteFeatureOperation) Done
func(op*DeleteFeatureOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeatureOperation) Metadata
func(op*DeleteFeatureOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteFeatureOperation) Name
func(op*DeleteFeatureOperation)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 (*DeleteFeatureOperation) Poll
func(op*DeleteFeatureOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeatureOperation) Wait
func(op*DeleteFeatureOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFeatureValuesOperation
typeDeleteFeatureValuesOperationstruct{// contains filtered or unexported fields}DeleteFeatureValuesOperation manages a long-running operation from DeleteFeatureValues.
func (*DeleteFeatureValuesOperation) Done
func(op*DeleteFeatureValuesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeatureValuesOperation) Metadata
func(op*DeleteFeatureValuesOperation)Metadata()(*aiplatformpb.DeleteFeatureValuesOperationMetadata,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 (*DeleteFeatureValuesOperation) Name
func(op*DeleteFeatureValuesOperation)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 (*DeleteFeatureValuesOperation) Poll
func(op*DeleteFeatureValuesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeleteFeatureValuesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeatureValuesOperation) Wait
func(op*DeleteFeatureValuesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeleteFeatureValuesResponse,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.
DeleteFeatureViewOperation
typeDeleteFeatureViewOperationstruct{// contains filtered or unexported fields}DeleteFeatureViewOperation manages a long-running operation from DeleteFeatureView.
func (*DeleteFeatureViewOperation) Done
func(op*DeleteFeatureViewOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeatureViewOperation) Metadata
func(op*DeleteFeatureViewOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteFeatureViewOperation) Name
func(op*DeleteFeatureViewOperation)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 (*DeleteFeatureViewOperation) Poll
func(op*DeleteFeatureViewOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeatureViewOperation) Wait
func(op*DeleteFeatureViewOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFeaturestoreOperation
typeDeleteFeaturestoreOperationstruct{// contains filtered or unexported fields}DeleteFeaturestoreOperation manages a long-running operation from DeleteFeaturestore.
func (*DeleteFeaturestoreOperation) Done
func(op*DeleteFeaturestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteFeaturestoreOperation) Metadata
func(op*DeleteFeaturestoreOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteFeaturestoreOperation) Name
func(op*DeleteFeaturestoreOperation)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 (*DeleteFeaturestoreOperation) Poll
func(op*DeleteFeaturestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteFeaturestoreOperation) Wait
func(op*DeleteFeaturestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteHyperparameterTuningJobOperation
typeDeleteHyperparameterTuningJobOperationstruct{// contains filtered or unexported fields}DeleteHyperparameterTuningJobOperation manages a long-running operation from DeleteHyperparameterTuningJob.
func (*DeleteHyperparameterTuningJobOperation) Done
func(op*DeleteHyperparameterTuningJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteHyperparameterTuningJobOperation) Metadata
func(op*DeleteHyperparameterTuningJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteHyperparameterTuningJobOperation) Name
func(op*DeleteHyperparameterTuningJobOperation)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 (*DeleteHyperparameterTuningJobOperation) Poll
func(op*DeleteHyperparameterTuningJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteHyperparameterTuningJobOperation) Wait
func(op*DeleteHyperparameterTuningJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteIndexEndpointOperation
typeDeleteIndexEndpointOperationstruct{// contains filtered or unexported fields}DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
func (*DeleteIndexEndpointOperation) Done
func(op*DeleteIndexEndpointOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteIndexEndpointOperation) Metadata
func(op*DeleteIndexEndpointOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteIndexEndpointOperation) Name
func(op*DeleteIndexEndpointOperation)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 (*DeleteIndexEndpointOperation) Poll
func(op*DeleteIndexEndpointOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexEndpointOperation) Wait
func(op*DeleteIndexEndpointOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteIndexOperation
typeDeleteIndexOperationstruct{// contains filtered or unexported fields}DeleteIndexOperation manages a long-running operation from DeleteIndex.
func (*DeleteIndexOperation) Done
func(op*DeleteIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteIndexOperation) Metadata
func(op*DeleteIndexOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteIndexOperation) Name
func(op*DeleteIndexOperation)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 (*DeleteIndexOperation) Poll
func(op*DeleteIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexOperation) Wait
func(op*DeleteIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMetadataStoreOperation
typeDeleteMetadataStoreOperationstruct{// contains filtered or unexported fields}DeleteMetadataStoreOperation manages a long-running operation from DeleteMetadataStore.
func (*DeleteMetadataStoreOperation) Done
func(op*DeleteMetadataStoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteMetadataStoreOperation) Metadata
func(op*DeleteMetadataStoreOperation)Metadata()(*aiplatformpb.DeleteMetadataStoreOperationMetadata,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 (*DeleteMetadataStoreOperation) Name
func(op*DeleteMetadataStoreOperation)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 (*DeleteMetadataStoreOperation) Poll
func(op*DeleteMetadataStoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteMetadataStoreOperation) Wait
func(op*DeleteMetadataStoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteModelDeploymentMonitoringJobOperation
typeDeleteModelDeploymentMonitoringJobOperationstruct{// contains filtered or unexported fields}DeleteModelDeploymentMonitoringJobOperation manages a long-running operation from DeleteModelDeploymentMonitoringJob.
func (*DeleteModelDeploymentMonitoringJobOperation) Done
func(op*DeleteModelDeploymentMonitoringJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteModelDeploymentMonitoringJobOperation) Metadata
func(op*DeleteModelDeploymentMonitoringJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteModelDeploymentMonitoringJobOperation) Name
func(op*DeleteModelDeploymentMonitoringJobOperation)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 (*DeleteModelDeploymentMonitoringJobOperation) Poll
func(op*DeleteModelDeploymentMonitoringJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteModelDeploymentMonitoringJobOperation) Wait
func(op*DeleteModelDeploymentMonitoringJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteModelOperation
typeDeleteModelOperationstruct{// contains filtered or unexported fields}DeleteModelOperation manages a long-running operation from DeleteModel.
func (*DeleteModelOperation) Done
func(op*DeleteModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteModelOperation) Metadata
func(op*DeleteModelOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteModelOperation) Name
func(op*DeleteModelOperation)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 (*DeleteModelOperation) Poll
func(op*DeleteModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteModelOperation) Wait
func(op*DeleteModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteModelVersionOperation
typeDeleteModelVersionOperationstruct{// contains filtered or unexported fields}DeleteModelVersionOperation manages a long-running operation from DeleteModelVersion.
func (*DeleteModelVersionOperation) Done
func(op*DeleteModelVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteModelVersionOperation) Metadata
func(op*DeleteModelVersionOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteModelVersionOperation) Name
func(op*DeleteModelVersionOperation)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 (*DeleteModelVersionOperation) Poll
func(op*DeleteModelVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteModelVersionOperation) Wait
func(op*DeleteModelVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteNasJobOperation
typeDeleteNasJobOperationstruct{// contains filtered or unexported fields}DeleteNasJobOperation manages a long-running operation from DeleteNasJob.
func (*DeleteNasJobOperation) Done
func(op*DeleteNasJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteNasJobOperation) Metadata
func(op*DeleteNasJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteNasJobOperation) Name
func(op*DeleteNasJobOperation)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 (*DeleteNasJobOperation) Poll
func(op*DeleteNasJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteNasJobOperation) Wait
func(op*DeleteNasJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteNotebookExecutionJobOperation
typeDeleteNotebookExecutionJobOperationstruct{// contains filtered or unexported fields}DeleteNotebookExecutionJobOperation manages a long-running operation from DeleteNotebookExecutionJob.
func (*DeleteNotebookExecutionJobOperation) Done
func(op*DeleteNotebookExecutionJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteNotebookExecutionJobOperation) Metadata
func(op*DeleteNotebookExecutionJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteNotebookExecutionJobOperation) Name
func(op*DeleteNotebookExecutionJobOperation)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 (*DeleteNotebookExecutionJobOperation) Poll
func(op*DeleteNotebookExecutionJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteNotebookExecutionJobOperation) Wait
func(op*DeleteNotebookExecutionJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteNotebookRuntimeOperation
typeDeleteNotebookRuntimeOperationstruct{// contains filtered or unexported fields}DeleteNotebookRuntimeOperation manages a long-running operation from DeleteNotebookRuntime.
func (*DeleteNotebookRuntimeOperation) Done
func(op*DeleteNotebookRuntimeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteNotebookRuntimeOperation) Metadata
func(op*DeleteNotebookRuntimeOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteNotebookRuntimeOperation) Name
func(op*DeleteNotebookRuntimeOperation)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 (*DeleteNotebookRuntimeOperation) Poll
func(op*DeleteNotebookRuntimeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteNotebookRuntimeOperation) Wait
func(op*DeleteNotebookRuntimeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteNotebookRuntimeTemplateOperation
typeDeleteNotebookRuntimeTemplateOperationstruct{// contains filtered or unexported fields}DeleteNotebookRuntimeTemplateOperation manages a long-running operation from DeleteNotebookRuntimeTemplate.
func (*DeleteNotebookRuntimeTemplateOperation) Done
func(op*DeleteNotebookRuntimeTemplateOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteNotebookRuntimeTemplateOperation) Metadata
func(op*DeleteNotebookRuntimeTemplateOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteNotebookRuntimeTemplateOperation) Name
func(op*DeleteNotebookRuntimeTemplateOperation)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 (*DeleteNotebookRuntimeTemplateOperation) Poll
func(op*DeleteNotebookRuntimeTemplateOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteNotebookRuntimeTemplateOperation) Wait
func(op*DeleteNotebookRuntimeTemplateOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeletePersistentResourceOperation
typeDeletePersistentResourceOperationstruct{// contains filtered or unexported fields}DeletePersistentResourceOperation manages a long-running operation from DeletePersistentResource.
func (*DeletePersistentResourceOperation) Done
func(op*DeletePersistentResourceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeletePersistentResourceOperation) Metadata
func(op*DeletePersistentResourceOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeletePersistentResourceOperation) Name
func(op*DeletePersistentResourceOperation)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 (*DeletePersistentResourceOperation) Poll
func(op*DeletePersistentResourceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeletePersistentResourceOperation) Wait
func(op*DeletePersistentResourceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeletePipelineJobOperation
typeDeletePipelineJobOperationstruct{// contains filtered or unexported fields}DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob.
func (*DeletePipelineJobOperation) Done
func(op*DeletePipelineJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeletePipelineJobOperation) Metadata
func(op*DeletePipelineJobOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeletePipelineJobOperation) Name
func(op*DeletePipelineJobOperation)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 (*DeletePipelineJobOperation) Poll
func(op*DeletePipelineJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeletePipelineJobOperation) Wait
func(op*DeletePipelineJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRagCorpusOperation
typeDeleteRagCorpusOperationstruct{// contains filtered or unexported fields}DeleteRagCorpusOperation manages a long-running operation from DeleteRagCorpus.
func (*DeleteRagCorpusOperation) Done
func(op*DeleteRagCorpusOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteRagCorpusOperation) Metadata
func(op*DeleteRagCorpusOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteRagCorpusOperation) Name
func(op*DeleteRagCorpusOperation)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 (*DeleteRagCorpusOperation) Poll
func(op*DeleteRagCorpusOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRagCorpusOperation) Wait
func(op*DeleteRagCorpusOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRagFileOperation
typeDeleteRagFileOperationstruct{// contains filtered or unexported fields}DeleteRagFileOperation manages a long-running operation from DeleteRagFile.
func (*DeleteRagFileOperation) Done
func(op*DeleteRagFileOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteRagFileOperation) Metadata
func(op*DeleteRagFileOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteRagFileOperation) Name
func(op*DeleteRagFileOperation)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 (*DeleteRagFileOperation) Poll
func(op*DeleteRagFileOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteRagFileOperation) Wait
func(op*DeleteRagFileOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteReasoningEngineOperation
typeDeleteReasoningEngineOperationstruct{// contains filtered or unexported fields}DeleteReasoningEngineOperation manages a long-running operation from DeleteReasoningEngine.
func (*DeleteReasoningEngineOperation) Done
func(op*DeleteReasoningEngineOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteReasoningEngineOperation) Metadata
func(op*DeleteReasoningEngineOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteReasoningEngineOperation) Name
func(op*DeleteReasoningEngineOperation)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 (*DeleteReasoningEngineOperation) Poll
func(op*DeleteReasoningEngineOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteReasoningEngineOperation) Wait
func(op*DeleteReasoningEngineOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSavedQueryOperation
typeDeleteSavedQueryOperationstruct{// contains filtered or unexported fields}DeleteSavedQueryOperation manages a long-running operation from DeleteSavedQuery.
func (*DeleteSavedQueryOperation) Done
func(op*DeleteSavedQueryOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteSavedQueryOperation) Metadata
func(op*DeleteSavedQueryOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteSavedQueryOperation) Name
func(op*DeleteSavedQueryOperation)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 (*DeleteSavedQueryOperation) Poll
func(op*DeleteSavedQueryOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSavedQueryOperation) Wait
func(op*DeleteSavedQueryOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteScheduleOperation
typeDeleteScheduleOperationstruct{// contains filtered or unexported fields}DeleteScheduleOperation manages a long-running operation from DeleteSchedule.
func (*DeleteScheduleOperation) Done
func(op*DeleteScheduleOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteScheduleOperation) Metadata
func(op*DeleteScheduleOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteScheduleOperation) Name
func(op*DeleteScheduleOperation)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 (*DeleteScheduleOperation) Poll
func(op*DeleteScheduleOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteScheduleOperation) Wait
func(op*DeleteScheduleOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSpecialistPoolOperation
typeDeleteSpecialistPoolOperationstruct{// contains filtered or unexported fields}DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool.
func (*DeleteSpecialistPoolOperation) Done
func(op*DeleteSpecialistPoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteSpecialistPoolOperation) Metadata
func(op*DeleteSpecialistPoolOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteSpecialistPoolOperation) Name
func(op*DeleteSpecialistPoolOperation)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 (*DeleteSpecialistPoolOperation) Poll
func(op*DeleteSpecialistPoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSpecialistPoolOperation) Wait
func(op*DeleteSpecialistPoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTensorboardExperimentOperation
typeDeleteTensorboardExperimentOperationstruct{// contains filtered or unexported fields}DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment.
func (*DeleteTensorboardExperimentOperation) Done
func(op*DeleteTensorboardExperimentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteTensorboardExperimentOperation) Metadata
func(op*DeleteTensorboardExperimentOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteTensorboardExperimentOperation) Name
func(op*DeleteTensorboardExperimentOperation)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 (*DeleteTensorboardExperimentOperation) Poll
func(op*DeleteTensorboardExperimentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTensorboardExperimentOperation) Wait
func(op*DeleteTensorboardExperimentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTensorboardOperation
typeDeleteTensorboardOperationstruct{// contains filtered or unexported fields}DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard.
func (*DeleteTensorboardOperation) Done
func(op*DeleteTensorboardOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteTensorboardOperation) Metadata
func(op*DeleteTensorboardOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteTensorboardOperation) Name
func(op*DeleteTensorboardOperation)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 (*DeleteTensorboardOperation) Poll
func(op*DeleteTensorboardOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTensorboardOperation) Wait
func(op*DeleteTensorboardOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTensorboardRunOperation
typeDeleteTensorboardRunOperationstruct{// contains filtered or unexported fields}DeleteTensorboardRunOperation manages a long-running operation from DeleteTensorboardRun.
func (*DeleteTensorboardRunOperation) Done
func(op*DeleteTensorboardRunOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteTensorboardRunOperation) Metadata
func(op*DeleteTensorboardRunOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteTensorboardRunOperation) Name
func(op*DeleteTensorboardRunOperation)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 (*DeleteTensorboardRunOperation) Poll
func(op*DeleteTensorboardRunOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTensorboardRunOperation) Wait
func(op*DeleteTensorboardRunOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTensorboardTimeSeriesOperation
typeDeleteTensorboardTimeSeriesOperationstruct{// contains filtered or unexported fields}DeleteTensorboardTimeSeriesOperation manages a long-running operation from DeleteTensorboardTimeSeries.
func (*DeleteTensorboardTimeSeriesOperation) Done
func(op*DeleteTensorboardTimeSeriesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteTensorboardTimeSeriesOperation) Metadata
func(op*DeleteTensorboardTimeSeriesOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteTensorboardTimeSeriesOperation) Name
func(op*DeleteTensorboardTimeSeriesOperation)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 (*DeleteTensorboardTimeSeriesOperation) Poll
func(op*DeleteTensorboardTimeSeriesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTensorboardTimeSeriesOperation) Wait
func(op*DeleteTensorboardTimeSeriesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTrainingPipelineOperation
typeDeleteTrainingPipelineOperationstruct{// contains filtered or unexported fields}DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline.
func (*DeleteTrainingPipelineOperation) Done
func(op*DeleteTrainingPipelineOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteTrainingPipelineOperation) Metadata
func(op*DeleteTrainingPipelineOperation)Metadata()(*aiplatformpb.DeleteOperationMetadata,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 (*DeleteTrainingPipelineOperation) Name
func(op*DeleteTrainingPipelineOperation)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 (*DeleteTrainingPipelineOperation) Poll
func(op*DeleteTrainingPipelineOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTrainingPipelineOperation) Wait
func(op*DeleteTrainingPipelineOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeployIndexOperation
typeDeployIndexOperationstruct{// contains filtered or unexported fields}DeployIndexOperation manages a long-running operation from DeployIndex.
func (*DeployIndexOperation) Done
func(op*DeployIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeployIndexOperation) Metadata
func(op*DeployIndexOperation)Metadata()(*aiplatformpb.DeployIndexOperationMetadata,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 (*DeployIndexOperation) Name
func(op*DeployIndexOperation)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 (*DeployIndexOperation) Poll
func(op*DeployIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployIndexResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployIndexOperation) Wait
func(op*DeployIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployIndexResponse,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.
DeployModelOperation
typeDeployModelOperationstruct{// contains filtered or unexported fields}DeployModelOperation manages a long-running operation from DeployModel.
func (*DeployModelOperation) Done
func(op*DeployModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeployModelOperation) Metadata
func(op*DeployModelOperation)Metadata()(*aiplatformpb.DeployModelOperationMetadata,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 (*DeployModelOperation) Name
func(op*DeployModelOperation)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 (*DeployModelOperation) Poll
func(op*DeployModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployModelOperation) Wait
func(op*DeployModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployModelResponse,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.
DeployOperation
typeDeployOperationstruct{// contains filtered or unexported fields}DeployOperation manages a long-running operation from Deploy.
func (*DeployOperation) Done
func(op*DeployOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeployOperation) Metadata
func(op*DeployOperation)Metadata()(*aiplatformpb.DeployOperationMetadata,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 (*DeployOperation) Name
func(op*DeployOperation)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 (*DeployOperation) Poll
func(op*DeployOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployOperation) Wait
func(op*DeployOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeployResponse,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.
DeployedModelIterator
typeDeployedModelIteratorstruct{// 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[]*aiplatformpb.DeployedModel,nextPageTokenstring,errerror)// contains filtered or unexported fields}DeployedModelIterator manages a stream of *aiplatformpb.DeployedModel.
func (*DeployedModelIterator) All
func(it*DeployedModelIterator)All()iter.Seq2[*aiplatformpb.DeployedModel,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DeployedModelIterator) Next
func(it*DeployedModelIterator)Next()(*aiplatformpb.DeployedModel,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DeployedModelIterator) PageInfo
func(it*DeployedModelIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeploymentResourcePoolCallOptions
typeDeploymentResourcePoolCallOptionsstruct{CreateDeploymentResourcePool[]gax.CallOptionGetDeploymentResourcePool[]gax.CallOptionListDeploymentResourcePools[]gax.CallOptionUpdateDeploymentResourcePool[]gax.CallOptionDeleteDeploymentResourcePool[]gax.CallOptionQueryDeployedModels[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}DeploymentResourcePoolCallOptions contains the retry settings for each method of DeploymentResourcePoolClient.
DeploymentResourcePoolClient
typeDeploymentResourcePoolClientstruct{// The call options for this service.CallOptions*DeploymentResourcePoolCallOptions// 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}DeploymentResourcePoolClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service that manages the DeploymentResourcePool resource.
func NewDeploymentResourcePoolClient
funcNewDeploymentResourcePoolClient(ctxcontext.Context,opts...option.ClientOption)(*DeploymentResourcePoolClient,error)NewDeploymentResourcePoolClient creates a new deployment resource pool service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service that manages the DeploymentResourcePool resource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*DeploymentResourcePoolClient) CancelOperation
func(c*DeploymentResourcePoolClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) Close
func(c*DeploymentResourcePoolClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*DeploymentResourcePoolClient) Connection (deprecated)
func(c*DeploymentResourcePoolClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*DeploymentResourcePoolClient) CreateDeploymentResourcePool
func(c*DeploymentResourcePoolClient)CreateDeploymentResourcePool(ctxcontext.Context,req*aiplatformpb.CreateDeploymentResourcePoolRequest,opts...gax.CallOption)(*CreateDeploymentResourcePoolOperation,error)CreateDeploymentResourcePool create a DeploymentResourcePool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateDeploymentResourcePoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateDeploymentResourcePoolRequest.}op,err:=c.CreateDeploymentResourcePool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) CreateDeploymentResourcePoolOperation
func(c*DeploymentResourcePoolClient)CreateDeploymentResourcePoolOperation(namestring)*CreateDeploymentResourcePoolOperationCreateDeploymentResourcePoolOperation returns a new CreateDeploymentResourcePoolOperation from a given name.The name must be that of a previously created CreateDeploymentResourcePoolOperation, possibly from a different process.
func (*DeploymentResourcePoolClient) DeleteDeploymentResourcePool
func(c*DeploymentResourcePoolClient)DeleteDeploymentResourcePool(ctxcontext.Context,req*aiplatformpb.DeleteDeploymentResourcePoolRequest,opts...gax.CallOption)(*DeleteDeploymentResourcePoolOperation,error)DeleteDeploymentResourcePool delete a DeploymentResourcePool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteDeploymentResourcePoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteDeploymentResourcePoolRequest.}op,err:=c.DeleteDeploymentResourcePool(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DeploymentResourcePoolClient) DeleteDeploymentResourcePoolOperation
func(c*DeploymentResourcePoolClient)DeleteDeploymentResourcePoolOperation(namestring)*DeleteDeploymentResourcePoolOperationDeleteDeploymentResourcePoolOperation returns a new DeleteDeploymentResourcePoolOperation from a given name.The name must be that of a previously created DeleteDeploymentResourcePoolOperation, possibly from a different process.
func (*DeploymentResourcePoolClient) DeleteOperation
func(c*DeploymentResourcePoolClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) GetDeploymentResourcePool
func(c*DeploymentResourcePoolClient)GetDeploymentResourcePool(ctxcontext.Context,req*aiplatformpb.GetDeploymentResourcePoolRequest,opts...gax.CallOption)(*aiplatformpb.DeploymentResourcePool,error)GetDeploymentResourcePool get a DeploymentResourcePool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetDeploymentResourcePoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetDeploymentResourcePoolRequest.}resp,err:=c.GetDeploymentResourcePool(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) GetIamPolicy
func(c*DeploymentResourcePoolClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) GetLocation
func(c*DeploymentResourcePoolClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) GetOperation
func(c*DeploymentResourcePoolClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) ListDeploymentResourcePools
func(c*DeploymentResourcePoolClient)ListDeploymentResourcePools(ctxcontext.Context,req*aiplatformpb.ListDeploymentResourcePoolsRequest,opts...gax.CallOption)*DeploymentResourcePoolIteratorListDeploymentResourcePools list DeploymentResourcePools in a location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDeploymentResourcePoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDeploymentResourcePoolsRequest.}it:=c.ListDeploymentResourcePools(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.(*aiplatformpb.ListDeploymentResourcePoolsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDeploymentResourcePoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDeploymentResourcePoolsRequest.}forresp,err:=rangec.ListDeploymentResourcePools(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DeploymentResourcePoolClient) ListLocations
func(c*DeploymentResourcePoolClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) ListOperations
func(c*DeploymentResourcePoolClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(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 (*DeploymentResourcePoolClient) QueryDeployedModels
func(c*DeploymentResourcePoolClient)QueryDeployedModels(ctxcontext.Context,req*aiplatformpb.QueryDeployedModelsRequest,opts...gax.CallOption)*DeployedModelIteratorQueryDeployedModels list DeployedModels that have been deployed on this DeploymentResourcePool.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryDeployedModelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryDeployedModelsRequest.}it:=c.QueryDeployedModels(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.(*aiplatformpb.QueryDeployedModelsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryDeployedModelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryDeployedModelsRequest.}forresp,err:=rangec.QueryDeployedModels(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DeploymentResourcePoolClient) SetIamPolicy
func(c*DeploymentResourcePoolClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) TestIamPermissions
func(c*DeploymentResourcePoolClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) UpdateDeploymentResourcePool
func(c*DeploymentResourcePoolClient)UpdateDeploymentResourcePool(ctxcontext.Context,req*aiplatformpb.UpdateDeploymentResourcePoolRequest,opts...gax.CallOption)(*UpdateDeploymentResourcePoolOperation,error)UpdateDeploymentResourcePool update a DeploymentResourcePool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateDeploymentResourcePoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateDeploymentResourcePoolRequest.}op,err:=c.UpdateDeploymentResourcePool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DeploymentResourcePoolClient) UpdateDeploymentResourcePoolOperation
func(c*DeploymentResourcePoolClient)UpdateDeploymentResourcePoolOperation(namestring)*UpdateDeploymentResourcePoolOperationUpdateDeploymentResourcePoolOperation returns a new UpdateDeploymentResourcePoolOperation from a given name.The name must be that of a previously created UpdateDeploymentResourcePoolOperation, possibly from a different process.
func (*DeploymentResourcePoolClient) WaitOperation
func(c*DeploymentResourcePoolClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewDeploymentResourcePoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}DeploymentResourcePoolIterator
typeDeploymentResourcePoolIteratorstruct{// 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[]*aiplatformpb.DeploymentResourcePool,nextPageTokenstring,errerror)// contains filtered or unexported fields}DeploymentResourcePoolIterator manages a stream of *aiplatformpb.DeploymentResourcePool.
func (*DeploymentResourcePoolIterator) All
func(it*DeploymentResourcePoolIterator)All()iter.Seq2[*aiplatformpb.DeploymentResourcePool,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DeploymentResourcePoolIterator) Next
func(it*DeploymentResourcePoolIterator)Next()(*aiplatformpb.DeploymentResourcePool,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DeploymentResourcePoolIterator) PageInfo
func(it*DeploymentResourcePoolIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
EndpointCallOptions
typeEndpointCallOptionsstruct{CreateEndpoint[]gax.CallOptionGetEndpoint[]gax.CallOptionListEndpoints[]gax.CallOptionUpdateEndpoint[]gax.CallOptionUpdateEndpointLongRunning[]gax.CallOptionDeleteEndpoint[]gax.CallOptionDeployModel[]gax.CallOptionUndeployModel[]gax.CallOptionMutateDeployedModel[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}EndpointCallOptions contains the retry settings for each method of EndpointClient.
EndpointClient
typeEndpointClientstruct{// The call options for this service.CallOptions*EndpointCallOptions// 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}EndpointClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s Endpoints.
func NewEndpointClient
funcNewEndpointClient(ctxcontext.Context,opts...option.ClientOption)(*EndpointClient,error)NewEndpointClient creates a new endpoint service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s Endpoints.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*EndpointClient) CancelOperation
func(c*EndpointClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) Close
func(c*EndpointClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*EndpointClient) Connection (deprecated)
func(c*EndpointClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*EndpointClient) CreateEndpoint
func(c*EndpointClient)CreateEndpoint(ctxcontext.Context,req*aiplatformpb.CreateEndpointRequest,opts...gax.CallOption)(*CreateEndpointOperation,error)CreateEndpoint creates an Endpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateEndpointRequest.}op,err:=c.CreateEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) CreateEndpointOperation
func(c*EndpointClient)CreateEndpointOperation(namestring)*CreateEndpointOperationCreateEndpointOperation returns a new CreateEndpointOperation from a given name.The name must be that of a previously created CreateEndpointOperation, possibly from a different process.
func (*EndpointClient) DeleteEndpoint
func(c*EndpointClient)DeleteEndpoint(ctxcontext.Context,req*aiplatformpb.DeleteEndpointRequest,opts...gax.CallOption)(*DeleteEndpointOperation,error)DeleteEndpoint deletes an Endpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteEndpointRequest.}op,err:=c.DeleteEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*EndpointClient) DeleteEndpointOperation
func(c*EndpointClient)DeleteEndpointOperation(namestring)*DeleteEndpointOperationDeleteEndpointOperation returns a new DeleteEndpointOperation from a given name.The name must be that of a previously created DeleteEndpointOperation, possibly from a different process.
func (*EndpointClient) DeleteOperation
func(c*EndpointClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) DeployModel
func(c*EndpointClient)DeployModel(ctxcontext.Context,req*aiplatformpb.DeployModelRequest,opts...gax.CallOption)(*DeployModelOperation,error)DeployModel deploys a Model into this Endpoint, creating a DeployedModel within it.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeployModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeployModelRequest.}op,err:=c.DeployModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) DeployModelOperation
func(c*EndpointClient)DeployModelOperation(namestring)*DeployModelOperationDeployModelOperation returns a new DeployModelOperation from a given name.The name must be that of a previously created DeployModelOperation, possibly from a different process.
func (*EndpointClient) GetEndpoint
func(c*EndpointClient)GetEndpoint(ctxcontext.Context,req*aiplatformpb.GetEndpointRequest,opts...gax.CallOption)(*aiplatformpb.Endpoint,error)GetEndpoint gets an Endpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetEndpointRequest.}resp,err:=c.GetEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) GetIamPolicy
func(c*EndpointClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) GetLocation
func(c*EndpointClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) GetOperation
func(c*EndpointClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) ListEndpoints
func(c*EndpointClient)ListEndpoints(ctxcontext.Context,req*aiplatformpb.ListEndpointsRequest,opts...gax.CallOption)*EndpointIteratorListEndpoints lists Endpoints in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListEndpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListEndpointsRequest.}it:=c.ListEndpoints(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.(*aiplatformpb.ListEndpointsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListEndpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListEndpointsRequest.}forresp,err:=rangec.ListEndpoints(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*EndpointClient) ListLocations
func(c*EndpointClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) ListOperations
func(c*EndpointClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(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 (*EndpointClient) MutateDeployedModel
func(c*EndpointClient)MutateDeployedModel(ctxcontext.Context,req*aiplatformpb.MutateDeployedModelRequest,opts...gax.CallOption)(*MutateDeployedModelOperation,error)MutateDeployedModel updates an existing deployed model. Updatable fields includemin_replica_count, max_replica_count, required_replica_count,autoscaling_metric_specs, disable_container_logging (v1 only), andenable_container_logging (v1beta1 only).
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.MutateDeployedModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#MutateDeployedModelRequest.}op,err:=c.MutateDeployedModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) MutateDeployedModelOperation
func(c*EndpointClient)MutateDeployedModelOperation(namestring)*MutateDeployedModelOperationMutateDeployedModelOperation returns a new MutateDeployedModelOperation from a given name.The name must be that of a previously created MutateDeployedModelOperation, possibly from a different process.
func (*EndpointClient) SetIamPolicy
func(c*EndpointClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) TestIamPermissions
func(c*EndpointClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) UndeployModel
func(c*EndpointClient)UndeployModel(ctxcontext.Context,req*aiplatformpb.UndeployModelRequest,opts...gax.CallOption)(*UndeployModelOperation,error)UndeployModel undeploys a Model from an Endpoint, removing a DeployedModel from it, andfreeing all resources it’s using.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UndeployModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UndeployModelRequest.}op,err:=c.UndeployModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) UndeployModelOperation
func(c*EndpointClient)UndeployModelOperation(namestring)*UndeployModelOperationUndeployModelOperation returns a new UndeployModelOperation from a given name.The name must be that of a previously created UndeployModelOperation, possibly from a different process.
func (*EndpointClient) UpdateEndpoint
func(c*EndpointClient)UpdateEndpoint(ctxcontext.Context,req*aiplatformpb.UpdateEndpointRequest,opts...gax.CallOption)(*aiplatformpb.Endpoint,error)UpdateEndpoint updates an Endpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateEndpointRequest.}resp,err:=c.UpdateEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) UpdateEndpointLongRunning
func(c*EndpointClient)UpdateEndpointLongRunning(ctxcontext.Context,req*aiplatformpb.UpdateEndpointLongRunningRequest,opts...gax.CallOption)(*UpdateEndpointLongRunningOperation,error)UpdateEndpointLongRunning updates an Endpoint with a long running operation.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateEndpointLongRunningRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateEndpointLongRunningRequest.}op,err:=c.UpdateEndpointLongRunning(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EndpointClient) UpdateEndpointLongRunningOperation
func(c*EndpointClient)UpdateEndpointLongRunningOperation(namestring)*UpdateEndpointLongRunningOperationUpdateEndpointLongRunningOperation returns a new UpdateEndpointLongRunningOperation from a given name.The name must be that of a previously created UpdateEndpointLongRunningOperation, possibly from a different process.
func (*EndpointClient) WaitOperation
func(c*EndpointClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}EndpointIterator
typeEndpointIteratorstruct{// 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[]*aiplatformpb.Endpoint,nextPageTokenstring,errerror)// contains filtered or unexported fields}EndpointIterator manages a stream of *aiplatformpb.Endpoint.
func (*EndpointIterator) All
func(it*EndpointIterator)All()iter.Seq2[*aiplatformpb.Endpoint,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*EndpointIterator) Next
func(it*EndpointIterator)Next()(*aiplatformpb.Endpoint,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*EndpointIterator) PageInfo
func(it*EndpointIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
EntityTypeIterator
typeEntityTypeIteratorstruct{// 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[]*aiplatformpb.EntityType,nextPageTokenstring,errerror)// contains filtered or unexported fields}EntityTypeIterator manages a stream of *aiplatformpb.EntityType.
func (*EntityTypeIterator) All
func(it*EntityTypeIterator)All()iter.Seq2[*aiplatformpb.EntityType,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*EntityTypeIterator) Next
func(it*EntityTypeIterator)Next()(*aiplatformpb.EntityType,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*EntityTypeIterator) PageInfo
func(it*EntityTypeIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
EvaluationCallOptions
typeEvaluationCallOptionsstruct{EvaluateInstances[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}EvaluationCallOptions contains the retry settings for each method of EvaluationClient.
EvaluationClient
typeEvaluationClientstruct{// The call options for this service.CallOptions*EvaluationCallOptions// contains filtered or unexported fields}EvaluationClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Vertex AI Online Evaluation Service.
func NewEvaluationClient
funcNewEvaluationClient(ctxcontext.Context,opts...option.ClientOption)(*EvaluationClient,error)NewEvaluationClient creates a new evaluation service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Vertex AI Online Evaluation Service.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*EvaluationClient) CancelOperation
func(c*EvaluationClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) Close
func(c*EvaluationClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*EvaluationClient) Connection (deprecated)
func(c*EvaluationClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*EvaluationClient) DeleteOperation
func(c*EvaluationClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) EvaluateInstances
func(c*EvaluationClient)EvaluateInstances(ctxcontext.Context,req*aiplatformpb.EvaluateInstancesRequest,opts...gax.CallOption)(*aiplatformpb.EvaluateInstancesResponse,error)EvaluateInstances evaluates instances based on a given metric.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.EvaluateInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#EvaluateInstancesRequest.}resp,err:=c.EvaluateInstances(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EvaluationClient) GetIamPolicy
func(c*EvaluationClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EvaluationClient) GetLocation
func(c*EvaluationClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) GetOperation
func(c*EvaluationClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) ListLocations
func(c*EvaluationClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) ListOperations
func(c*EvaluationClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(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 (*EvaluationClient) SetIamPolicy
func(c*EvaluationClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EvaluationClient) TestIamPermissions
func(c*EvaluationClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*EvaluationClient) WaitOperation
func(c*EvaluationClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewEvaluationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ExecutionIterator
typeExecutionIteratorstruct{// 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[]*aiplatformpb.Execution,nextPageTokenstring,errerror)// contains filtered or unexported fields}ExecutionIterator manages a stream of *aiplatformpb.Execution.
func (*ExecutionIterator) All
func(it*ExecutionIterator)All()iter.Seq2[*aiplatformpb.Execution,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ExecutionIterator) Next
func(it*ExecutionIterator)Next()(*aiplatformpb.Execution,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ExecutionIterator) PageInfo
func(it*ExecutionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ExportDataOperation
typeExportDataOperationstruct{// 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()(*aiplatformpb.ExportDataOperationMetadata,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(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.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 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 (*ExportDataOperation) Wait
func(op*ExportDataOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.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.
ExportFeatureValuesOperation
typeExportFeatureValuesOperationstruct{// contains filtered or unexported fields}ExportFeatureValuesOperation manages a long-running operation from ExportFeatureValues.
func (*ExportFeatureValuesOperation) Done
func(op*ExportFeatureValuesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ExportFeatureValuesOperation) Metadata
func(op*ExportFeatureValuesOperation)Metadata()(*aiplatformpb.ExportFeatureValuesOperationMetadata,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 (*ExportFeatureValuesOperation) Name
func(op*ExportFeatureValuesOperation)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 (*ExportFeatureValuesOperation) Poll
func(op*ExportFeatureValuesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ExportFeatureValuesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ExportFeatureValuesOperation) Wait
func(op*ExportFeatureValuesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ExportFeatureValuesResponse,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.
ExportModelOperation
typeExportModelOperationstruct{// contains filtered or unexported fields}ExportModelOperation manages a long-running operation from ExportModel.
func (*ExportModelOperation) Done
func(op*ExportModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ExportModelOperation) Metadata
func(op*ExportModelOperation)Metadata()(*aiplatformpb.ExportModelOperationMetadata,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 (*ExportModelOperation) Name
func(op*ExportModelOperation)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 (*ExportModelOperation) Poll
func(op*ExportModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ExportModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ExportModelOperation) Wait
func(op*ExportModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ExportModelResponse,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.
FeatureGroupIterator
typeFeatureGroupIteratorstruct{// 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[]*aiplatformpb.FeatureGroup,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeatureGroupIterator manages a stream of *aiplatformpb.FeatureGroup.
func (*FeatureGroupIterator) All
func(it*FeatureGroupIterator)All()iter.Seq2[*aiplatformpb.FeatureGroup,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeatureGroupIterator) Next
func(it*FeatureGroupIterator)Next()(*aiplatformpb.FeatureGroup,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeatureGroupIterator) PageInfo
func(it*FeatureGroupIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeatureIterator
typeFeatureIteratorstruct{// 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[]*aiplatformpb.Feature,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeatureIterator manages a stream of *aiplatformpb.Feature.
func (*FeatureIterator) All
func(it*FeatureIterator)All()iter.Seq2[*aiplatformpb.Feature,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeatureIterator) Next
func(it*FeatureIterator)Next()(*aiplatformpb.Feature,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeatureIterator) PageInfo
func(it*FeatureIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeatureOnlineStoreAdminCallOptions
typeFeatureOnlineStoreAdminCallOptionsstruct{CreateFeatureOnlineStore[]gax.CallOptionGetFeatureOnlineStore[]gax.CallOptionListFeatureOnlineStores[]gax.CallOptionUpdateFeatureOnlineStore[]gax.CallOptionDeleteFeatureOnlineStore[]gax.CallOptionCreateFeatureView[]gax.CallOptionGetFeatureView[]gax.CallOptionListFeatureViews[]gax.CallOptionUpdateFeatureView[]gax.CallOptionDeleteFeatureView[]gax.CallOptionSyncFeatureView[]gax.CallOptionGetFeatureViewSync[]gax.CallOptionListFeatureViewSyncs[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}FeatureOnlineStoreAdminCallOptions contains the retry settings for each method of FeatureOnlineStoreAdminClient.
FeatureOnlineStoreAdminClient
typeFeatureOnlineStoreAdminClientstruct{// The call options for this service.CallOptions*FeatureOnlineStoreAdminCallOptions// 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}FeatureOnlineStoreAdminClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that handles CRUD and List for resources forFeatureOnlineStore.
func NewFeatureOnlineStoreAdminClient
funcNewFeatureOnlineStoreAdminClient(ctxcontext.Context,opts...option.ClientOption)(*FeatureOnlineStoreAdminClient,error)NewFeatureOnlineStoreAdminClient creates a new feature online store admin service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that handles CRUD and List for resources forFeatureOnlineStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FeatureOnlineStoreAdminClient) CancelOperation
func(c*FeatureOnlineStoreAdminClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) Close
func(c*FeatureOnlineStoreAdminClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FeatureOnlineStoreAdminClient) Connection (deprecated)
func(c*FeatureOnlineStoreAdminClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*FeatureOnlineStoreAdminClient) CreateFeatureOnlineStore
func(c*FeatureOnlineStoreAdminClient)CreateFeatureOnlineStore(ctxcontext.Context,req*aiplatformpb.CreateFeatureOnlineStoreRequest,opts...gax.CallOption)(*CreateFeatureOnlineStoreOperation,error)CreateFeatureOnlineStore creates a new FeatureOnlineStore in a given project and location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeatureOnlineStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeatureOnlineStoreRequest.}op,err:=c.CreateFeatureOnlineStore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) CreateFeatureOnlineStoreOperation
func(c*FeatureOnlineStoreAdminClient)CreateFeatureOnlineStoreOperation(namestring)*CreateFeatureOnlineStoreOperationCreateFeatureOnlineStoreOperation returns a new CreateFeatureOnlineStoreOperation from a given name.The name must be that of a previously created CreateFeatureOnlineStoreOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) CreateFeatureView
func(c*FeatureOnlineStoreAdminClient)CreateFeatureView(ctxcontext.Context,req*aiplatformpb.CreateFeatureViewRequest,opts...gax.CallOption)(*CreateFeatureViewOperation,error)CreateFeatureView creates a new FeatureView in a given FeatureOnlineStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeatureViewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeatureViewRequest.}op,err:=c.CreateFeatureView(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) CreateFeatureViewOperation
func(c*FeatureOnlineStoreAdminClient)CreateFeatureViewOperation(namestring)*CreateFeatureViewOperationCreateFeatureViewOperation returns a new CreateFeatureViewOperation from a given name.The name must be that of a previously created CreateFeatureViewOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) DeleteFeatureOnlineStore
func(c*FeatureOnlineStoreAdminClient)DeleteFeatureOnlineStore(ctxcontext.Context,req*aiplatformpb.DeleteFeatureOnlineStoreRequest,opts...gax.CallOption)(*DeleteFeatureOnlineStoreOperation,error)DeleteFeatureOnlineStore deletes a single FeatureOnlineStore. The FeatureOnlineStore must notcontain any FeatureViews.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureOnlineStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureOnlineStoreRequest.}op,err:=c.DeleteFeatureOnlineStore(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeatureOnlineStoreAdminClient) DeleteFeatureOnlineStoreOperation
func(c*FeatureOnlineStoreAdminClient)DeleteFeatureOnlineStoreOperation(namestring)*DeleteFeatureOnlineStoreOperationDeleteFeatureOnlineStoreOperation returns a new DeleteFeatureOnlineStoreOperation from a given name.The name must be that of a previously created DeleteFeatureOnlineStoreOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) DeleteFeatureView
func(c*FeatureOnlineStoreAdminClient)DeleteFeatureView(ctxcontext.Context,req*aiplatformpb.DeleteFeatureViewRequest,opts...gax.CallOption)(*DeleteFeatureViewOperation,error)DeleteFeatureView deletes a single FeatureView.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureViewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureViewRequest.}op,err:=c.DeleteFeatureView(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeatureOnlineStoreAdminClient) DeleteFeatureViewOperation
func(c*FeatureOnlineStoreAdminClient)DeleteFeatureViewOperation(namestring)*DeleteFeatureViewOperationDeleteFeatureViewOperation returns a new DeleteFeatureViewOperation from a given name.The name must be that of a previously created DeleteFeatureViewOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) DeleteOperation
func(c*FeatureOnlineStoreAdminClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) GetFeatureOnlineStore
func(c*FeatureOnlineStoreAdminClient)GetFeatureOnlineStore(ctxcontext.Context,req*aiplatformpb.GetFeatureOnlineStoreRequest,opts...gax.CallOption)(*aiplatformpb.FeatureOnlineStore,error)GetFeatureOnlineStore gets details of a single FeatureOnlineStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureOnlineStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureOnlineStoreRequest.}resp,err:=c.GetFeatureOnlineStore(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) GetFeatureView
func(c*FeatureOnlineStoreAdminClient)GetFeatureView(ctxcontext.Context,req*aiplatformpb.GetFeatureViewRequest,opts...gax.CallOption)(*aiplatformpb.FeatureView,error)GetFeatureView gets details of a single FeatureView.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureViewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureViewRequest.}resp,err:=c.GetFeatureView(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) GetFeatureViewSync
func(c*FeatureOnlineStoreAdminClient)GetFeatureViewSync(ctxcontext.Context,req*aiplatformpb.GetFeatureViewSyncRequest,opts...gax.CallOption)(*aiplatformpb.FeatureViewSync,error)GetFeatureViewSync gets details of a single FeatureViewSync.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureViewSyncRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureViewSyncRequest.}resp,err:=c.GetFeatureViewSync(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) GetIamPolicy
func(c*FeatureOnlineStoreAdminClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) GetLocation
func(c*FeatureOnlineStoreAdminClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) GetOperation
func(c*FeatureOnlineStoreAdminClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) ListFeatureOnlineStores
func(c*FeatureOnlineStoreAdminClient)ListFeatureOnlineStores(ctxcontext.Context,req*aiplatformpb.ListFeatureOnlineStoresRequest,opts...gax.CallOption)*FeatureOnlineStoreIteratorListFeatureOnlineStores lists FeatureOnlineStores in a given project and location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureOnlineStoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureOnlineStoresRequest.}it:=c.ListFeatureOnlineStores(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.(*aiplatformpb.ListFeatureOnlineStoresResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureOnlineStoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureOnlineStoresRequest.}forresp,err:=rangec.ListFeatureOnlineStores(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeatureOnlineStoreAdminClient) ListFeatureViewSyncs
func(c*FeatureOnlineStoreAdminClient)ListFeatureViewSyncs(ctxcontext.Context,req*aiplatformpb.ListFeatureViewSyncsRequest,opts...gax.CallOption)*FeatureViewSyncIteratorListFeatureViewSyncs lists FeatureViewSyncs in a given FeatureView.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureViewSyncsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureViewSyncsRequest.}it:=c.ListFeatureViewSyncs(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.(*aiplatformpb.ListFeatureViewSyncsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureViewSyncsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureViewSyncsRequest.}forresp,err:=rangec.ListFeatureViewSyncs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeatureOnlineStoreAdminClient) ListFeatureViews
func(c*FeatureOnlineStoreAdminClient)ListFeatureViews(ctxcontext.Context,req*aiplatformpb.ListFeatureViewsRequest,opts...gax.CallOption)*FeatureViewIteratorListFeatureViews lists FeatureViews in a given FeatureOnlineStore.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureViewsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureViewsRequest.}it:=c.ListFeatureViews(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.(*aiplatformpb.ListFeatureViewsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureViewsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureViewsRequest.}forresp,err:=rangec.ListFeatureViews(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeatureOnlineStoreAdminClient) ListLocations
func(c*FeatureOnlineStoreAdminClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) ListOperations
func(c*FeatureOnlineStoreAdminClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(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 (*FeatureOnlineStoreAdminClient) SetIamPolicy
func(c*FeatureOnlineStoreAdminClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) SyncFeatureView
func(c*FeatureOnlineStoreAdminClient)SyncFeatureView(ctxcontext.Context,req*aiplatformpb.SyncFeatureViewRequest,opts...gax.CallOption)(*aiplatformpb.SyncFeatureViewResponse,error)SyncFeatureView triggers on-demand sync for the FeatureView.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SyncFeatureViewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SyncFeatureViewRequest.}resp,err:=c.SyncFeatureView(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) TestIamPermissions
func(c*FeatureOnlineStoreAdminClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) UpdateFeatureOnlineStore
func(c*FeatureOnlineStoreAdminClient)UpdateFeatureOnlineStore(ctxcontext.Context,req*aiplatformpb.UpdateFeatureOnlineStoreRequest,opts...gax.CallOption)(*UpdateFeatureOnlineStoreOperation,error)UpdateFeatureOnlineStore updates the parameters of a single FeatureOnlineStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeatureOnlineStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeatureOnlineStoreRequest.}op,err:=c.UpdateFeatureOnlineStore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) UpdateFeatureOnlineStoreOperation
func(c*FeatureOnlineStoreAdminClient)UpdateFeatureOnlineStoreOperation(namestring)*UpdateFeatureOnlineStoreOperationUpdateFeatureOnlineStoreOperation returns a new UpdateFeatureOnlineStoreOperation from a given name.The name must be that of a previously created UpdateFeatureOnlineStoreOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) UpdateFeatureView
func(c*FeatureOnlineStoreAdminClient)UpdateFeatureView(ctxcontext.Context,req*aiplatformpb.UpdateFeatureViewRequest,opts...gax.CallOption)(*UpdateFeatureViewOperation,error)UpdateFeatureView updates the parameters of a single FeatureView.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeatureViewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeatureViewRequest.}op,err:=c.UpdateFeatureView(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreAdminClient) UpdateFeatureViewOperation
func(c*FeatureOnlineStoreAdminClient)UpdateFeatureViewOperation(namestring)*UpdateFeatureViewOperationUpdateFeatureViewOperation returns a new UpdateFeatureViewOperation from a given name.The name must be that of a previously created UpdateFeatureViewOperation, possibly from a different process.
func (*FeatureOnlineStoreAdminClient) WaitOperation
func(c*FeatureOnlineStoreAdminClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreAdminClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}FeatureOnlineStoreCallOptions
typeFeatureOnlineStoreCallOptionsstruct{FetchFeatureValues[]gax.CallOptionSearchNearestEntities[]gax.CallOptionFeatureViewDirectWrite[]gax.CallOptionGenerateFetchAccessToken[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}FeatureOnlineStoreCallOptions contains the retry settings for each method of FeatureOnlineStoreClient.
FeatureOnlineStoreClient
typeFeatureOnlineStoreClientstruct{// The call options for this service.CallOptions*FeatureOnlineStoreCallOptions// contains filtered or unexported fields}FeatureOnlineStoreClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for fetching feature values from the online store.
func NewFeatureOnlineStoreClient
funcNewFeatureOnlineStoreClient(ctxcontext.Context,opts...option.ClientOption)(*FeatureOnlineStoreClient,error)NewFeatureOnlineStoreClient creates a new feature online store service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for fetching feature values from the online store.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FeatureOnlineStoreClient) CancelOperation
func(c*FeatureOnlineStoreClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) Close
func(c*FeatureOnlineStoreClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FeatureOnlineStoreClient) Connection (deprecated)
func(c*FeatureOnlineStoreClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*FeatureOnlineStoreClient) DeleteOperation
func(c*FeatureOnlineStoreClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) FeatureViewDirectWrite
func(c*FeatureOnlineStoreClient)FeatureViewDirectWrite(ctxcontext.Context,opts...gax.CallOption)(aiplatformpb.FeatureOnlineStoreService_FeatureViewDirectWriteClient,error)FeatureViewDirectWrite bidirectional streaming RPC to directly write to feature values in afeature view. Requests may not have a one-to-one mapping to responses andresponses may be returned out-of-order to reduce latency.
Example
packagemainimport("context""io"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.FeatureViewDirectWrite(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*aiplatformpb.FeatureViewDirectWriteRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*FeatureOnlineStoreClient) FetchFeatureValues
func(c*FeatureOnlineStoreClient)FetchFeatureValues(ctxcontext.Context,req*aiplatformpb.FetchFeatureValuesRequest,opts...gax.CallOption)(*aiplatformpb.FetchFeatureValuesResponse,error)FetchFeatureValues fetch feature values under a FeatureView.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.FetchFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#FetchFeatureValuesRequest.}resp,err:=c.FetchFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) GenerateFetchAccessToken
func(c*FeatureOnlineStoreClient)GenerateFetchAccessToken(ctxcontext.Context,req*aiplatformpb.GenerateFetchAccessTokenRequest,opts...gax.CallOption)(*aiplatformpb.GenerateFetchAccessTokenResponse,error)GenerateFetchAccessToken rPC to generate an access token for the given feature view. FeatureViewsunder the same FeatureOnlineStore share the same access token.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GenerateFetchAccessTokenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GenerateFetchAccessTokenRequest.}resp,err:=c.GenerateFetchAccessToken(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) GetIamPolicy
func(c*FeatureOnlineStoreClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) GetLocation
func(c*FeatureOnlineStoreClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) GetOperation
func(c*FeatureOnlineStoreClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) ListLocations
func(c*FeatureOnlineStoreClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) ListOperations
func(c*FeatureOnlineStoreClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(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 (*FeatureOnlineStoreClient) SearchNearestEntities
func(c*FeatureOnlineStoreClient)SearchNearestEntities(ctxcontext.Context,req*aiplatformpb.SearchNearestEntitiesRequest,opts...gax.CallOption)(*aiplatformpb.SearchNearestEntitiesResponse,error)SearchNearestEntities search the nearest entities under a FeatureView.Search only works for indexable feature view; if a feature view isn’tindexable, returns Invalid argument response.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchNearestEntitiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchNearestEntitiesRequest.}resp,err:=c.SearchNearestEntities(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) SetIamPolicy
func(c*FeatureOnlineStoreClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) TestIamPermissions
func(c*FeatureOnlineStoreClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureOnlineStoreClient) WaitOperation
func(c*FeatureOnlineStoreClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureOnlineStoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}FeatureOnlineStoreIterator
typeFeatureOnlineStoreIteratorstruct{// 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[]*aiplatformpb.FeatureOnlineStore,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeatureOnlineStoreIterator manages a stream of *aiplatformpb.FeatureOnlineStore.
func (*FeatureOnlineStoreIterator) All
func(it*FeatureOnlineStoreIterator)All()iter.Seq2[*aiplatformpb.FeatureOnlineStore,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeatureOnlineStoreIterator) Next
func(it*FeatureOnlineStoreIterator)Next()(*aiplatformpb.FeatureOnlineStore,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeatureOnlineStoreIterator) PageInfo
func(it*FeatureOnlineStoreIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeatureRegistryCallOptions
typeFeatureRegistryCallOptionsstruct{CreateFeatureGroup[]gax.CallOptionGetFeatureGroup[]gax.CallOptionListFeatureGroups[]gax.CallOptionUpdateFeatureGroup[]gax.CallOptionDeleteFeatureGroup[]gax.CallOptionCreateFeature[]gax.CallOptionBatchCreateFeatures[]gax.CallOptionGetFeature[]gax.CallOptionListFeatures[]gax.CallOptionUpdateFeature[]gax.CallOptionDeleteFeature[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}FeatureRegistryCallOptions contains the retry settings for each method of FeatureRegistryClient.
FeatureRegistryClient
typeFeatureRegistryClientstruct{// The call options for this service.CallOptions*FeatureRegistryCallOptions// 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}FeatureRegistryClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that handles CRUD and List for resources forFeatureRegistry.
func NewFeatureRegistryClient
funcNewFeatureRegistryClient(ctxcontext.Context,opts...option.ClientOption)(*FeatureRegistryClient,error)NewFeatureRegistryClient creates a new feature registry service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that handles CRUD and List for resources forFeatureRegistry.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FeatureRegistryClient) BatchCreateFeatures
func(c*FeatureRegistryClient)BatchCreateFeatures(ctxcontext.Context,req*aiplatformpb.BatchCreateFeaturesRequest,opts...gax.CallOption)(*BatchCreateFeaturesOperation,error)BatchCreateFeatures creates a batch of Features in a given FeatureGroup.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchCreateFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchCreateFeaturesRequest.}op,err:=c.BatchCreateFeatures(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) BatchCreateFeaturesOperation
func(c*FeatureRegistryClient)BatchCreateFeaturesOperation(namestring)*BatchCreateFeaturesOperationBatchCreateFeaturesOperation returns a new BatchCreateFeaturesOperation from a given name.The name must be that of a previously created BatchCreateFeaturesOperation, possibly from a different process.
func (*FeatureRegistryClient) CancelOperation
func(c*FeatureRegistryClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) Close
func(c*FeatureRegistryClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FeatureRegistryClient) Connection (deprecated)
func(c*FeatureRegistryClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*FeatureRegistryClient) CreateFeature
func(c*FeatureRegistryClient)CreateFeature(ctxcontext.Context,req*aiplatformpb.CreateFeatureRequest,opts...gax.CallOption)(*CreateFeatureOperation,error)CreateFeature creates a new Feature in a given FeatureGroup.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeatureRequest.}op,err:=c.CreateFeature(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) CreateFeatureGroup
func(c*FeatureRegistryClient)CreateFeatureGroup(ctxcontext.Context,req*aiplatformpb.CreateFeatureGroupRequest,opts...gax.CallOption)(*CreateFeatureGroupOperation,error)CreateFeatureGroup creates a new FeatureGroup in a given project and location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeatureGroupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeatureGroupRequest.}op,err:=c.CreateFeatureGroup(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) CreateFeatureGroupOperation
func(c*FeatureRegistryClient)CreateFeatureGroupOperation(namestring)*CreateFeatureGroupOperationCreateFeatureGroupOperation returns a new CreateFeatureGroupOperation from a given name.The name must be that of a previously created CreateFeatureGroupOperation, possibly from a different process.
func (*FeatureRegistryClient) CreateFeatureOperation
func(c*FeatureRegistryClient)CreateFeatureOperation(namestring)*CreateFeatureOperationCreateFeatureOperation returns a new CreateFeatureOperation from a given name.The name must be that of a previously created CreateFeatureOperation, possibly from a different process.
func (*FeatureRegistryClient) DeleteFeature
func(c*FeatureRegistryClient)DeleteFeature(ctxcontext.Context,req*aiplatformpb.DeleteFeatureRequest,opts...gax.CallOption)(*DeleteFeatureOperation,error)DeleteFeature deletes a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureRequest.}op,err:=c.DeleteFeature(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeatureRegistryClient) DeleteFeatureGroup
func(c*FeatureRegistryClient)DeleteFeatureGroup(ctxcontext.Context,req*aiplatformpb.DeleteFeatureGroupRequest,opts...gax.CallOption)(*DeleteFeatureGroupOperation,error)DeleteFeatureGroup deletes a single FeatureGroup.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureGroupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureGroupRequest.}op,err:=c.DeleteFeatureGroup(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeatureRegistryClient) DeleteFeatureGroupOperation
func(c*FeatureRegistryClient)DeleteFeatureGroupOperation(namestring)*DeleteFeatureGroupOperationDeleteFeatureGroupOperation returns a new DeleteFeatureGroupOperation from a given name.The name must be that of a previously created DeleteFeatureGroupOperation, possibly from a different process.
func (*FeatureRegistryClient) DeleteFeatureOperation
func(c*FeatureRegistryClient)DeleteFeatureOperation(namestring)*DeleteFeatureOperationDeleteFeatureOperation returns a new DeleteFeatureOperation from a given name.The name must be that of a previously created DeleteFeatureOperation, possibly from a different process.
func (*FeatureRegistryClient) DeleteOperation
func(c*FeatureRegistryClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) GetFeature
func(c*FeatureRegistryClient)GetFeature(ctxcontext.Context,req*aiplatformpb.GetFeatureRequest,opts...gax.CallOption)(*aiplatformpb.Feature,error)GetFeature gets details of a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureRequest.}resp,err:=c.GetFeature(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) GetFeatureGroup
func(c*FeatureRegistryClient)GetFeatureGroup(ctxcontext.Context,req*aiplatformpb.GetFeatureGroupRequest,opts...gax.CallOption)(*aiplatformpb.FeatureGroup,error)GetFeatureGroup gets details of a single FeatureGroup.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureGroupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureGroupRequest.}resp,err:=c.GetFeatureGroup(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) GetIamPolicy
func(c*FeatureRegistryClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) GetLocation
func(c*FeatureRegistryClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) GetOperation
func(c*FeatureRegistryClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) ListFeatureGroups
func(c*FeatureRegistryClient)ListFeatureGroups(ctxcontext.Context,req*aiplatformpb.ListFeatureGroupsRequest,opts...gax.CallOption)*FeatureGroupIteratorListFeatureGroups lists FeatureGroups in a given project and location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureGroupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureGroupsRequest.}it:=c.ListFeatureGroups(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.(*aiplatformpb.ListFeatureGroupsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeatureGroupsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeatureGroupsRequest.}forresp,err:=rangec.ListFeatureGroups(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeatureRegistryClient) ListFeatures
func(c*FeatureRegistryClient)ListFeatures(ctxcontext.Context,req*aiplatformpb.ListFeaturesRequest,opts...gax.CallOption)*FeatureIteratorListFeatures lists Features in a given FeatureGroup.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturesRequest.}it:=c.ListFeatures(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.(*aiplatformpb.ListFeaturesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturesRequest.}forresp,err:=rangec.ListFeatures(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeatureRegistryClient) ListLocations
func(c*FeatureRegistryClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) ListOperations
func(c*FeatureRegistryClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(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 (*FeatureRegistryClient) SetIamPolicy
func(c*FeatureRegistryClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) TestIamPermissions
func(c*FeatureRegistryClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) UpdateFeature
func(c*FeatureRegistryClient)UpdateFeature(ctxcontext.Context,req*aiplatformpb.UpdateFeatureRequest,opts...gax.CallOption)(*UpdateFeatureOperation,error)UpdateFeature updates the parameters of a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeatureRequest.}op,err:=c.UpdateFeature(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) UpdateFeatureGroup
func(c*FeatureRegistryClient)UpdateFeatureGroup(ctxcontext.Context,req*aiplatformpb.UpdateFeatureGroupRequest,opts...gax.CallOption)(*UpdateFeatureGroupOperation,error)UpdateFeatureGroup updates the parameters of a single FeatureGroup.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeatureGroupRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeatureGroupRequest.}op,err:=c.UpdateFeatureGroup(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeatureRegistryClient) UpdateFeatureGroupOperation
func(c*FeatureRegistryClient)UpdateFeatureGroupOperation(namestring)*UpdateFeatureGroupOperationUpdateFeatureGroupOperation returns a new UpdateFeatureGroupOperation from a given name.The name must be that of a previously created UpdateFeatureGroupOperation, possibly from a different process.
func (*FeatureRegistryClient) UpdateFeatureOperation
func(c*FeatureRegistryClient)UpdateFeatureOperation(namestring)*UpdateFeatureOperationUpdateFeatureOperation returns a new UpdateFeatureOperation from a given name.The name must be that of a previously created UpdateFeatureOperation, possibly from a different process.
func (*FeatureRegistryClient) WaitOperation
func(c*FeatureRegistryClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeatureRegistryClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}FeatureViewIterator
typeFeatureViewIteratorstruct{// 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[]*aiplatformpb.FeatureView,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeatureViewIterator manages a stream of *aiplatformpb.FeatureView.
func (*FeatureViewIterator) All
func(it*FeatureViewIterator)All()iter.Seq2[*aiplatformpb.FeatureView,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeatureViewIterator) Next
func(it*FeatureViewIterator)Next()(*aiplatformpb.FeatureView,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeatureViewIterator) PageInfo
func(it*FeatureViewIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeatureViewSyncIterator
typeFeatureViewSyncIteratorstruct{// 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[]*aiplatformpb.FeatureViewSync,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeatureViewSyncIterator manages a stream of *aiplatformpb.FeatureViewSync.
func (*FeatureViewSyncIterator) All
func(it*FeatureViewSyncIterator)All()iter.Seq2[*aiplatformpb.FeatureViewSync,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeatureViewSyncIterator) Next
func(it*FeatureViewSyncIterator)Next()(*aiplatformpb.FeatureViewSync,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeatureViewSyncIterator) PageInfo
func(it*FeatureViewSyncIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeaturestoreCallOptions
typeFeaturestoreCallOptionsstruct{CreateFeaturestore[]gax.CallOptionGetFeaturestore[]gax.CallOptionListFeaturestores[]gax.CallOptionUpdateFeaturestore[]gax.CallOptionDeleteFeaturestore[]gax.CallOptionCreateEntityType[]gax.CallOptionGetEntityType[]gax.CallOptionListEntityTypes[]gax.CallOptionUpdateEntityType[]gax.CallOptionDeleteEntityType[]gax.CallOptionCreateFeature[]gax.CallOptionBatchCreateFeatures[]gax.CallOptionGetFeature[]gax.CallOptionListFeatures[]gax.CallOptionUpdateFeature[]gax.CallOptionDeleteFeature[]gax.CallOptionImportFeatureValues[]gax.CallOptionBatchReadFeatureValues[]gax.CallOptionExportFeatureValues[]gax.CallOptionDeleteFeatureValues[]gax.CallOptionSearchFeatures[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}FeaturestoreCallOptions contains the retry settings for each method of FeaturestoreClient.
FeaturestoreClient
typeFeaturestoreClientstruct{// The call options for this service.CallOptions*FeaturestoreCallOptions// 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}FeaturestoreClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that handles CRUD and List for resources for Featurestore.
func NewFeaturestoreClient
funcNewFeaturestoreClient(ctxcontext.Context,opts...option.ClientOption)(*FeaturestoreClient,error)NewFeaturestoreClient creates a new featurestore service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that handles CRUD and List for resources for Featurestore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FeaturestoreClient) BatchCreateFeatures
func(c*FeaturestoreClient)BatchCreateFeatures(ctxcontext.Context,req*aiplatformpb.BatchCreateFeaturesRequest,opts...gax.CallOption)(*BatchCreateFeaturesOperation,error)BatchCreateFeatures creates a batch of Features in a given EntityType.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchCreateFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchCreateFeaturesRequest.}op,err:=c.BatchCreateFeatures(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) BatchCreateFeaturesOperation
func(c*FeaturestoreClient)BatchCreateFeaturesOperation(namestring)*BatchCreateFeaturesOperationBatchCreateFeaturesOperation returns a new BatchCreateFeaturesOperation from a given name.The name must be that of a previously created BatchCreateFeaturesOperation, possibly from a different process.
func (*FeaturestoreClient) BatchReadFeatureValues
func(c*FeaturestoreClient)BatchReadFeatureValues(ctxcontext.Context,req*aiplatformpb.BatchReadFeatureValuesRequest,opts...gax.CallOption)(*BatchReadFeatureValuesOperation,error)BatchReadFeatureValues batch reads Feature values from a Featurestore.
This API enables batch reading Feature values, where each readinstance in the batch may read Feature values of entities from one ormore EntityTypes. Point-in-time correctness is guaranteed for Featurevalues of each read instance as of each instance’s read timestamp.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchReadFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchReadFeatureValuesRequest.}op,err:=c.BatchReadFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) BatchReadFeatureValuesOperation
func(c*FeaturestoreClient)BatchReadFeatureValuesOperation(namestring)*BatchReadFeatureValuesOperationBatchReadFeatureValuesOperation returns a new BatchReadFeatureValuesOperation from a given name.The name must be that of a previously created BatchReadFeatureValuesOperation, possibly from a different process.
func (*FeaturestoreClient) CancelOperation
func(c*FeaturestoreClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) Close
func(c*FeaturestoreClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FeaturestoreClient) Connection (deprecated)
func(c*FeaturestoreClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*FeaturestoreClient) CreateEntityType
func(c*FeaturestoreClient)CreateEntityType(ctxcontext.Context,req*aiplatformpb.CreateEntityTypeRequest,opts...gax.CallOption)(*CreateEntityTypeOperation,error)CreateEntityType creates a new EntityType in a given Featurestore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateEntityTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateEntityTypeRequest.}op,err:=c.CreateEntityType(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) CreateEntityTypeOperation
func(c*FeaturestoreClient)CreateEntityTypeOperation(namestring)*CreateEntityTypeOperationCreateEntityTypeOperation returns a new CreateEntityTypeOperation from a given name.The name must be that of a previously created CreateEntityTypeOperation, possibly from a different process.
func (*FeaturestoreClient) CreateFeature
func(c*FeaturestoreClient)CreateFeature(ctxcontext.Context,req*aiplatformpb.CreateFeatureRequest,opts...gax.CallOption)(*CreateFeatureOperation,error)CreateFeature creates a new Feature in a given EntityType.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeatureRequest.}op,err:=c.CreateFeature(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) CreateFeatureOperation
func(c*FeaturestoreClient)CreateFeatureOperation(namestring)*CreateFeatureOperationCreateFeatureOperation returns a new CreateFeatureOperation from a given name.The name must be that of a previously created CreateFeatureOperation, possibly from a different process.
func (*FeaturestoreClient) CreateFeaturestore
func(c*FeaturestoreClient)CreateFeaturestore(ctxcontext.Context,req*aiplatformpb.CreateFeaturestoreRequest,opts...gax.CallOption)(*CreateFeaturestoreOperation,error)CreateFeaturestore creates a new Featurestore in a given project and location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateFeaturestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateFeaturestoreRequest.}op,err:=c.CreateFeaturestore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) CreateFeaturestoreOperation
func(c*FeaturestoreClient)CreateFeaturestoreOperation(namestring)*CreateFeaturestoreOperationCreateFeaturestoreOperation returns a new CreateFeaturestoreOperation from a given name.The name must be that of a previously created CreateFeaturestoreOperation, possibly from a different process.
func (*FeaturestoreClient) DeleteEntityType
func(c*FeaturestoreClient)DeleteEntityType(ctxcontext.Context,req*aiplatformpb.DeleteEntityTypeRequest,opts...gax.CallOption)(*DeleteEntityTypeOperation,error)DeleteEntityType deletes a single EntityType. The EntityType must not have any Featuresor force must be set to true for the request to succeed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteEntityTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteEntityTypeRequest.}op,err:=c.DeleteEntityType(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeaturestoreClient) DeleteEntityTypeOperation
func(c*FeaturestoreClient)DeleteEntityTypeOperation(namestring)*DeleteEntityTypeOperationDeleteEntityTypeOperation returns a new DeleteEntityTypeOperation from a given name.The name must be that of a previously created DeleteEntityTypeOperation, possibly from a different process.
func (*FeaturestoreClient) DeleteFeature
func(c*FeaturestoreClient)DeleteFeature(ctxcontext.Context,req*aiplatformpb.DeleteFeatureRequest,opts...gax.CallOption)(*DeleteFeatureOperation,error)DeleteFeature deletes a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureRequest.}op,err:=c.DeleteFeature(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeaturestoreClient) DeleteFeatureOperation
func(c*FeaturestoreClient)DeleteFeatureOperation(namestring)*DeleteFeatureOperationDeleteFeatureOperation returns a new DeleteFeatureOperation from a given name.The name must be that of a previously created DeleteFeatureOperation, possibly from a different process.
func (*FeaturestoreClient) DeleteFeatureValues
func(c*FeaturestoreClient)DeleteFeatureValues(ctxcontext.Context,req*aiplatformpb.DeleteFeatureValuesRequest,opts...gax.CallOption)(*DeleteFeatureValuesOperation,error)DeleteFeatureValues delete Feature values from Featurestore.
The progress of the deletion is tracked by the returned operation. Thedeleted feature values are guaranteed to be invisible to subsequent readoperations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature valuesreturned from reads and exports may be inconsistent. If consistency isrequired, the caller must retry the same delete request again and wait tillthe new operation returned is marked as successfully done.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeatureValuesRequest.}op,err:=c.DeleteFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) DeleteFeatureValuesOperation
func(c*FeaturestoreClient)DeleteFeatureValuesOperation(namestring)*DeleteFeatureValuesOperationDeleteFeatureValuesOperation returns a new DeleteFeatureValuesOperation from a given name.The name must be that of a previously created DeleteFeatureValuesOperation, possibly from a different process.
func (*FeaturestoreClient) DeleteFeaturestore
func(c*FeaturestoreClient)DeleteFeaturestore(ctxcontext.Context,req*aiplatformpb.DeleteFeaturestoreRequest,opts...gax.CallOption)(*DeleteFeaturestoreOperation,error)DeleteFeaturestore deletes a single Featurestore. The Featurestore must not contain anyEntityTypes or force must be set to true for the request to succeed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteFeaturestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteFeaturestoreRequest.}op,err:=c.DeleteFeaturestore(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*FeaturestoreClient) DeleteFeaturestoreOperation
func(c*FeaturestoreClient)DeleteFeaturestoreOperation(namestring)*DeleteFeaturestoreOperationDeleteFeaturestoreOperation returns a new DeleteFeaturestoreOperation from a given name.The name must be that of a previously created DeleteFeaturestoreOperation, possibly from a different process.
func (*FeaturestoreClient) DeleteOperation
func(c*FeaturestoreClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) ExportFeatureValues
func(c*FeaturestoreClient)ExportFeatureValues(ctxcontext.Context,req*aiplatformpb.ExportFeatureValuesRequest,opts...gax.CallOption)(*ExportFeatureValuesOperation,error)ExportFeatureValues exports Feature values from all the entities of a target EntityType.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExportFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExportFeatureValuesRequest.}op,err:=c.ExportFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) ExportFeatureValuesOperation
func(c*FeaturestoreClient)ExportFeatureValuesOperation(namestring)*ExportFeatureValuesOperationExportFeatureValuesOperation returns a new ExportFeatureValuesOperation from a given name.The name must be that of a previously created ExportFeatureValuesOperation, possibly from a different process.
func (*FeaturestoreClient) GetEntityType
func(c*FeaturestoreClient)GetEntityType(ctxcontext.Context,req*aiplatformpb.GetEntityTypeRequest,opts...gax.CallOption)(*aiplatformpb.EntityType,error)GetEntityType gets details of a single EntityType.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetEntityTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetEntityTypeRequest.}resp,err:=c.GetEntityType(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) GetFeature
func(c*FeaturestoreClient)GetFeature(ctxcontext.Context,req*aiplatformpb.GetFeatureRequest,opts...gax.CallOption)(*aiplatformpb.Feature,error)GetFeature gets details of a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeatureRequest.}resp,err:=c.GetFeature(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) GetFeaturestore
func(c*FeaturestoreClient)GetFeaturestore(ctxcontext.Context,req*aiplatformpb.GetFeaturestoreRequest,opts...gax.CallOption)(*aiplatformpb.Featurestore,error)GetFeaturestore gets details of a single Featurestore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetFeaturestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetFeaturestoreRequest.}resp,err:=c.GetFeaturestore(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) GetIamPolicy
func(c*FeaturestoreClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) GetLocation
func(c*FeaturestoreClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) GetOperation
func(c*FeaturestoreClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) ImportFeatureValues
func(c*FeaturestoreClient)ImportFeatureValues(ctxcontext.Context,req*aiplatformpb.ImportFeatureValuesRequest,opts...gax.CallOption)(*ImportFeatureValuesOperation,error)ImportFeatureValues imports Feature values into the Featurestore from a source storage.
The progress of the import is tracked by the returned operation. Theimported features are guaranteed to be visible to subsequent readoperations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned fromreads and exports may be inconsistent. If consistency isrequired, the caller must retry the same import request again and wait tillthe new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
Source data for import contains multiple distinct Feature values forthe same entity ID and timestamp.Source is modified during an import. This includes adding, updating, orremoving source data and/or metadata. Examples of updating metadatainclude but are not limited to changing storage location, storage class,or retention policy.Online serving cluster is under-provisioned.Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ImportFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ImportFeatureValuesRequest.}op,err:=c.ImportFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) ImportFeatureValuesOperation
func(c*FeaturestoreClient)ImportFeatureValuesOperation(namestring)*ImportFeatureValuesOperationImportFeatureValuesOperation returns a new ImportFeatureValuesOperation from a given name.The name must be that of a previously created ImportFeatureValuesOperation, possibly from a different process.
func (*FeaturestoreClient) ListEntityTypes
func(c*FeaturestoreClient)ListEntityTypes(ctxcontext.Context,req*aiplatformpb.ListEntityTypesRequest,opts...gax.CallOption)*EntityTypeIteratorListEntityTypes lists EntityTypes in a given Featurestore.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListEntityTypesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListEntityTypesRequest.}it:=c.ListEntityTypes(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.(*aiplatformpb.ListEntityTypesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListEntityTypesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListEntityTypesRequest.}forresp,err:=rangec.ListEntityTypes(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeaturestoreClient) ListFeatures
func(c*FeaturestoreClient)ListFeatures(ctxcontext.Context,req*aiplatformpb.ListFeaturesRequest,opts...gax.CallOption)*FeatureIteratorListFeatures lists Features in a given EntityType.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturesRequest.}it:=c.ListFeatures(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.(*aiplatformpb.ListFeaturesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturesRequest.}forresp,err:=rangec.ListFeatures(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeaturestoreClient) ListFeaturestores
func(c*FeaturestoreClient)ListFeaturestores(ctxcontext.Context,req*aiplatformpb.ListFeaturestoresRequest,opts...gax.CallOption)*FeaturestoreIteratorListFeaturestores lists Featurestores in a given project and location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturestoresRequest.}it:=c.ListFeaturestores(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.(*aiplatformpb.ListFeaturestoresResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListFeaturestoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListFeaturestoresRequest.}forresp,err:=rangec.ListFeaturestores(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeaturestoreClient) ListLocations
func(c*FeaturestoreClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) ListOperations
func(c*FeaturestoreClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(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 (*FeaturestoreClient) SearchFeatures
func(c*FeaturestoreClient)SearchFeatures(ctxcontext.Context,req*aiplatformpb.SearchFeaturesRequest,opts...gax.CallOption)*FeatureIteratorSearchFeatures searches Features matching a query in a given project.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchFeaturesRequest.}it:=c.SearchFeatures(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.(*aiplatformpb.SearchFeaturesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchFeaturesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchFeaturesRequest.}forresp,err:=rangec.SearchFeatures(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FeaturestoreClient) SetIamPolicy
func(c*FeaturestoreClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) TestIamPermissions
func(c*FeaturestoreClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) UpdateEntityType
func(c*FeaturestoreClient)UpdateEntityType(ctxcontext.Context,req*aiplatformpb.UpdateEntityTypeRequest,opts...gax.CallOption)(*aiplatformpb.EntityType,error)UpdateEntityType updates the parameters of a single EntityType.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateEntityTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateEntityTypeRequest.}resp,err:=c.UpdateEntityType(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) UpdateFeature
func(c*FeaturestoreClient)UpdateFeature(ctxcontext.Context,req*aiplatformpb.UpdateFeatureRequest,opts...gax.CallOption)(*aiplatformpb.Feature,error)UpdateFeature updates the parameters of a single Feature.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeatureRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeatureRequest.}resp,err:=c.UpdateFeature(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) UpdateFeaturestore
func(c*FeaturestoreClient)UpdateFeaturestore(ctxcontext.Context,req*aiplatformpb.UpdateFeaturestoreRequest,opts...gax.CallOption)(*UpdateFeaturestoreOperation,error)UpdateFeaturestore updates the parameters of a single Featurestore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateFeaturestoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateFeaturestoreRequest.}op,err:=c.UpdateFeaturestore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreClient) UpdateFeaturestoreOperation
func(c*FeaturestoreClient)UpdateFeaturestoreOperation(namestring)*UpdateFeaturestoreOperationUpdateFeaturestoreOperation returns a new UpdateFeaturestoreOperation from a given name.The name must be that of a previously created UpdateFeaturestoreOperation, possibly from a different process.
func (*FeaturestoreClient) WaitOperation
func(c*FeaturestoreClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}FeaturestoreIterator
typeFeaturestoreIteratorstruct{// 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[]*aiplatformpb.Featurestore,nextPageTokenstring,errerror)// contains filtered or unexported fields}FeaturestoreIterator manages a stream of *aiplatformpb.Featurestore.
func (*FeaturestoreIterator) All
func(it*FeaturestoreIterator)All()iter.Seq2[*aiplatformpb.Featurestore,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FeaturestoreIterator) Next
func(it*FeaturestoreIterator)Next()(*aiplatformpb.Featurestore,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FeaturestoreIterator) PageInfo
func(it*FeaturestoreIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FeaturestoreOnlineServingCallOptions
typeFeaturestoreOnlineServingCallOptionsstruct{ReadFeatureValues[]gax.CallOptionStreamingReadFeatureValues[]gax.CallOptionWriteFeatureValues[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}FeaturestoreOnlineServingCallOptions contains the retry settings for each method of FeaturestoreOnlineServingClient.
FeaturestoreOnlineServingClient
typeFeaturestoreOnlineServingClientstruct{// The call options for this service.CallOptions*FeaturestoreOnlineServingCallOptions// contains filtered or unexported fields}FeaturestoreOnlineServingClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for serving online feature values.
func NewFeaturestoreOnlineServingClient
funcNewFeaturestoreOnlineServingClient(ctxcontext.Context,opts...option.ClientOption)(*FeaturestoreOnlineServingClient,error)NewFeaturestoreOnlineServingClient creates a new featurestore online serving service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for serving online feature values.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FeaturestoreOnlineServingClient) CancelOperation
func(c*FeaturestoreOnlineServingClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) Close
func(c*FeaturestoreOnlineServingClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FeaturestoreOnlineServingClient) Connection (deprecated)
func(c*FeaturestoreOnlineServingClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*FeaturestoreOnlineServingClient) DeleteOperation
func(c*FeaturestoreOnlineServingClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) GetIamPolicy
func(c*FeaturestoreOnlineServingClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreOnlineServingClient) GetLocation
func(c*FeaturestoreOnlineServingClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) GetOperation
func(c*FeaturestoreOnlineServingClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) ListLocations
func(c*FeaturestoreOnlineServingClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) ListOperations
func(c*FeaturestoreOnlineServingClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(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 (*FeaturestoreOnlineServingClient) ReadFeatureValues
func(c*FeaturestoreOnlineServingClient)ReadFeatureValues(ctxcontext.Context,req*aiplatformpb.ReadFeatureValuesRequest,opts...gax.CallOption)(*aiplatformpb.ReadFeatureValuesResponse,error)ReadFeatureValues reads Feature values of a specific entity of an EntityType. For readingfeature values of multiple entities of an EntityType, please useStreamingReadFeatureValues.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ReadFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ReadFeatureValuesRequest.}resp,err:=c.ReadFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreOnlineServingClient) SetIamPolicy
func(c*FeaturestoreOnlineServingClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreOnlineServingClient) StreamingReadFeatureValues
func(c*FeaturestoreOnlineServingClient)StreamingReadFeatureValues(ctxcontext.Context,req*aiplatformpb.StreamingReadFeatureValuesRequest,opts...gax.CallOption)(aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient,error)StreamingReadFeatureValues reads Feature values for multiple entities. Depending on their size, datafor different entities may be brokenup across multiple responses.
func (*FeaturestoreOnlineServingClient) TestIamPermissions
func(c*FeaturestoreOnlineServingClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreOnlineServingClient) WaitOperation
func(c*FeaturestoreOnlineServingClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FeaturestoreOnlineServingClient) WriteFeatureValues
func(c*FeaturestoreOnlineServingClient)WriteFeatureValues(ctxcontext.Context,req*aiplatformpb.WriteFeatureValuesRequest,opts...gax.CallOption)(*aiplatformpb.WriteFeatureValuesResponse,error)WriteFeatureValues writes Feature values of one or more entities of an EntityType.
The Feature values are merged into existing entities if any. The Featurevalues to be written must have timestamp within the online storageretention.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewFeaturestoreOnlineServingClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.WriteFeatureValuesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#WriteFeatureValuesRequest.}resp,err:=c.WriteFeatureValues(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}GenAiCacheCallOptions
typeGenAiCacheCallOptionsstruct{CreateCachedContent[]gax.CallOptionGetCachedContent[]gax.CallOptionUpdateCachedContent[]gax.CallOptionDeleteCachedContent[]gax.CallOptionListCachedContents[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}GenAiCacheCallOptions contains the retry settings for each method of GenAiCacheClient.
GenAiCacheClient
typeGenAiCacheClientstruct{// The call options for this service.CallOptions*GenAiCacheCallOptions// contains filtered or unexported fields}GenAiCacheClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for managing Vertex AI’s CachedContent resource.
func NewGenAiCacheClient
funcNewGenAiCacheClient(ctxcontext.Context,opts...option.ClientOption)(*GenAiCacheClient,error)NewGenAiCacheClient creates a new gen ai cache service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for managing Vertex AI’s CachedContent resource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*GenAiCacheClient) CancelOperation
func(c*GenAiCacheClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) Close
func(c*GenAiCacheClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*GenAiCacheClient) Connection (deprecated)
func(c*GenAiCacheClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*GenAiCacheClient) CreateCachedContent
func(c*GenAiCacheClient)CreateCachedContent(ctxcontext.Context,req*aiplatformpb.CreateCachedContentRequest,opts...gax.CallOption)(*aiplatformpb.CachedContent,error)CreateCachedContent creates cached content, this call will initialize the cached content in thedata storage, and users need to pay for the cache data storage.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateCachedContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateCachedContentRequest.}resp,err:=c.CreateCachedContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) DeleteCachedContent
func(c*GenAiCacheClient)DeleteCachedContent(ctxcontext.Context,req*aiplatformpb.DeleteCachedContentRequest,opts...gax.CallOption)errorDeleteCachedContent deletes cached content
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteCachedContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteCachedContentRequest.}err=c.DeleteCachedContent(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*GenAiCacheClient) DeleteOperation
func(c*GenAiCacheClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) GetCachedContent
func(c*GenAiCacheClient)GetCachedContent(ctxcontext.Context,req*aiplatformpb.GetCachedContentRequest,opts...gax.CallOption)(*aiplatformpb.CachedContent,error)GetCachedContent gets cached content configurations
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetCachedContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetCachedContentRequest.}resp,err:=c.GetCachedContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) GetIamPolicy
func(c*GenAiCacheClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) GetLocation
func(c*GenAiCacheClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) GetOperation
func(c*GenAiCacheClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) ListCachedContents
func(c*GenAiCacheClient)ListCachedContents(ctxcontext.Context,req*aiplatformpb.ListCachedContentsRequest,opts...gax.CallOption)*CachedContentIteratorListCachedContents lists cached contents in a project
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListCachedContentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListCachedContentsRequest.}it:=c.ListCachedContents(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.(*aiplatformpb.ListCachedContentsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListCachedContentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListCachedContentsRequest.}forresp,err:=rangec.ListCachedContents(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*GenAiCacheClient) ListLocations
func(c*GenAiCacheClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) ListOperations
func(c*GenAiCacheClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(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 (*GenAiCacheClient) SetIamPolicy
func(c*GenAiCacheClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) TestIamPermissions
func(c*GenAiCacheClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) UpdateCachedContent
func(c*GenAiCacheClient)UpdateCachedContent(ctxcontext.Context,req*aiplatformpb.UpdateCachedContentRequest,opts...gax.CallOption)(*aiplatformpb.CachedContent,error)UpdateCachedContent updates cached content configurations
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateCachedContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateCachedContentRequest.}resp,err:=c.UpdateCachedContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiCacheClient) WaitOperation
func(c*GenAiCacheClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiCacheClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}GenAiTuningCallOptions
typeGenAiTuningCallOptionsstruct{CreateTuningJob[]gax.CallOptionGetTuningJob[]gax.CallOptionListTuningJobs[]gax.CallOptionCancelTuningJob[]gax.CallOptionRebaseTunedModel[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}GenAiTuningCallOptions contains the retry settings for each method of GenAiTuningClient.
GenAiTuningClient
typeGenAiTuningClientstruct{// The call options for this service.CallOptions*GenAiTuningCallOptions// 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}GenAiTuningClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing GenAI Tuning Jobs.
func NewGenAiTuningClient
funcNewGenAiTuningClient(ctxcontext.Context,opts...option.ClientOption)(*GenAiTuningClient,error)NewGenAiTuningClient creates a new gen ai tuning service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing GenAI Tuning Jobs.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*GenAiTuningClient) CancelOperation
func(c*GenAiTuningClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) CancelTuningJob
func(c*GenAiTuningClient)CancelTuningJob(ctxcontext.Context,req*aiplatformpb.CancelTuningJobRequest,opts...gax.CallOption)errorCancelTuningJob cancels a TuningJob.Starts asynchronous cancellation on the TuningJob. The server makes a besteffort to cancel the job, but success is not guaranteed. Clients can useGenAiTuningService.GetTuningJobor other methods to check whether the cancellation succeeded or whether thejob completed despite cancellation. On successful cancellation, theTuningJob is not deleted; instead it becomes a job with aTuningJob.error value with agoogle.rpc.Status.code of 1, corresponding toCode.CANCELLED, andTuningJob.state is set toCANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelTuningJobRequest.}err=c.CancelTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*GenAiTuningClient) Close
func(c*GenAiTuningClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*GenAiTuningClient) Connection (deprecated)
func(c*GenAiTuningClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*GenAiTuningClient) CreateTuningJob
func(c*GenAiTuningClient)CreateTuningJob(ctxcontext.Context,req*aiplatformpb.CreateTuningJobRequest,opts...gax.CallOption)(*aiplatformpb.TuningJob,error)CreateTuningJob creates a TuningJob. A created TuningJob right away will be attempted tobe run.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTuningJobRequest.}resp,err:=c.CreateTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) DeleteOperation
func(c*GenAiTuningClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) GetIamPolicy
func(c*GenAiTuningClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) GetLocation
func(c*GenAiTuningClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) GetOperation
func(c*GenAiTuningClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) GetTuningJob
func(c*GenAiTuningClient)GetTuningJob(ctxcontext.Context,req*aiplatformpb.GetTuningJobRequest,opts...gax.CallOption)(*aiplatformpb.TuningJob,error)GetTuningJob gets a TuningJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTuningJobRequest.}resp,err:=c.GetTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) ListLocations
func(c*GenAiTuningClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) ListOperations
func(c*GenAiTuningClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(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 (*GenAiTuningClient) ListTuningJobs
func(c*GenAiTuningClient)ListTuningJobs(ctxcontext.Context,req*aiplatformpb.ListTuningJobsRequest,opts...gax.CallOption)*TuningJobIteratorListTuningJobs lists TuningJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTuningJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTuningJobsRequest.}it:=c.ListTuningJobs(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.(*aiplatformpb.ListTuningJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTuningJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTuningJobsRequest.}forresp,err:=rangec.ListTuningJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*GenAiTuningClient) RebaseTunedModel
func(c*GenAiTuningClient)RebaseTunedModel(ctxcontext.Context,req*aiplatformpb.RebaseTunedModelRequest,opts...gax.CallOption)(*RebaseTunedModelOperation,error)RebaseTunedModel rebase a TunedModel.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RebaseTunedModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RebaseTunedModelRequest.}op,err:=c.RebaseTunedModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) RebaseTunedModelOperation
func(c*GenAiTuningClient)RebaseTunedModelOperation(namestring)*RebaseTunedModelOperationRebaseTunedModelOperation returns a new RebaseTunedModelOperation from a given name.The name must be that of a previously created RebaseTunedModelOperation, possibly from a different process.
func (*GenAiTuningClient) SetIamPolicy
func(c*GenAiTuningClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) TestIamPermissions
func(c*GenAiTuningClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GenAiTuningClient) WaitOperation
func(c*GenAiTuningClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewGenAiTuningClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}HyperparameterTuningJobIterator
typeHyperparameterTuningJobIteratorstruct{// 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[]*aiplatformpb.HyperparameterTuningJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}HyperparameterTuningJobIterator manages a stream of *aiplatformpb.HyperparameterTuningJob.
func (*HyperparameterTuningJobIterator) All
func(it*HyperparameterTuningJobIterator)All()iter.Seq2[*aiplatformpb.HyperparameterTuningJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*HyperparameterTuningJobIterator) Next
func(it*HyperparameterTuningJobIterator)Next()(*aiplatformpb.HyperparameterTuningJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*HyperparameterTuningJobIterator) PageInfo
func(it*HyperparameterTuningJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ImportDataOperation
typeImportDataOperationstruct{// 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()(*aiplatformpb.ImportDataOperationMetadata,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(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.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 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 (*ImportDataOperation) Wait
func(op*ImportDataOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.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.
ImportFeatureValuesOperation
typeImportFeatureValuesOperationstruct{// contains filtered or unexported fields}ImportFeatureValuesOperation manages a long-running operation from ImportFeatureValues.
func (*ImportFeatureValuesOperation) Done
func(op*ImportFeatureValuesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ImportFeatureValuesOperation) Metadata
func(op*ImportFeatureValuesOperation)Metadata()(*aiplatformpb.ImportFeatureValuesOperationMetadata,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 (*ImportFeatureValuesOperation) Name
func(op*ImportFeatureValuesOperation)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 (*ImportFeatureValuesOperation) Poll
func(op*ImportFeatureValuesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ImportFeatureValuesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ImportFeatureValuesOperation) Wait
func(op*ImportFeatureValuesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ImportFeatureValuesResponse,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.
ImportRagFilesOperation
typeImportRagFilesOperationstruct{// contains filtered or unexported fields}ImportRagFilesOperation manages a long-running operation from ImportRagFiles.
func (*ImportRagFilesOperation) Done
func(op*ImportRagFilesOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ImportRagFilesOperation) Metadata
func(op*ImportRagFilesOperation)Metadata()(*aiplatformpb.ImportRagFilesOperationMetadata,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 (*ImportRagFilesOperation) Name
func(op*ImportRagFilesOperation)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 (*ImportRagFilesOperation) Poll
func(op*ImportRagFilesOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ImportRagFilesResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ImportRagFilesOperation) Wait
func(op*ImportRagFilesOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ImportRagFilesResponse,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.
IndexCallOptions
typeIndexCallOptionsstruct{CreateIndex[]gax.CallOptionGetIndex[]gax.CallOptionListIndexes[]gax.CallOptionUpdateIndex[]gax.CallOptionDeleteIndex[]gax.CallOptionUpsertDatapoints[]gax.CallOptionRemoveDatapoints[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}IndexCallOptions contains the retry settings for each method of IndexClient.
IndexClient
typeIndexClientstruct{// The call options for this service.CallOptions*IndexCallOptions// 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}IndexClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s Index resources.
func NewIndexClient
funcNewIndexClient(ctxcontext.Context,opts...option.ClientOption)(*IndexClient,error)NewIndexClient creates a new index service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s Index resources.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*IndexClient) CancelOperation
func(c*IndexClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) Close
func(c*IndexClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*IndexClient) Connection (deprecated)
func(c*IndexClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*IndexClient) CreateIndex
func(c*IndexClient)CreateIndex(ctxcontext.Context,req*aiplatformpb.CreateIndexRequest,opts...gax.CallOption)(*CreateIndexOperation,error)CreateIndex creates an Index.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateIndexRequest.}op,err:=c.CreateIndex(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) CreateIndexOperation
func(c*IndexClient)CreateIndexOperation(namestring)*CreateIndexOperationCreateIndexOperation returns a new CreateIndexOperation from a given name.The name must be that of a previously created CreateIndexOperation, possibly from a different process.
func (*IndexClient) DeleteIndex
func(c*IndexClient)DeleteIndex(ctxcontext.Context,req*aiplatformpb.DeleteIndexRequest,opts...gax.CallOption)(*DeleteIndexOperation,error)DeleteIndex deletes an Index.An Index can only be deleted when all itsDeployedIndexes hadbeen undeployed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteIndexRequest.}op,err:=c.DeleteIndex(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*IndexClient) DeleteIndexOperation
func(c*IndexClient)DeleteIndexOperation(namestring)*DeleteIndexOperationDeleteIndexOperation returns a new DeleteIndexOperation from a given name.The name must be that of a previously created DeleteIndexOperation, possibly from a different process.
func (*IndexClient) DeleteOperation
func(c*IndexClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) GetIamPolicy
func(c*IndexClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) GetIndex
func(c*IndexClient)GetIndex(ctxcontext.Context,req*aiplatformpb.GetIndexRequest,opts...gax.CallOption)(*aiplatformpb.Index,error)GetIndex gets an Index.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetIndexRequest.}resp,err:=c.GetIndex(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) GetLocation
func(c*IndexClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) GetOperation
func(c*IndexClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) ListIndexes
func(c*IndexClient)ListIndexes(ctxcontext.Context,req*aiplatformpb.ListIndexesRequest,opts...gax.CallOption)*IndexIteratorListIndexes lists Indexes in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListIndexesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListIndexesRequest.}it:=c.ListIndexes(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.(*aiplatformpb.ListIndexesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListIndexesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListIndexesRequest.}forresp,err:=rangec.ListIndexes(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*IndexClient) ListLocations
func(c*IndexClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) ListOperations
func(c*IndexClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(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 (*IndexClient) RemoveDatapoints
func(c*IndexClient)RemoveDatapoints(ctxcontext.Context,req*aiplatformpb.RemoveDatapointsRequest,opts...gax.CallOption)(*aiplatformpb.RemoveDatapointsResponse,error)RemoveDatapoints remove Datapoints from an Index.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RemoveDatapointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RemoveDatapointsRequest.}resp,err:=c.RemoveDatapoints(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) SetIamPolicy
func(c*IndexClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) TestIamPermissions
func(c*IndexClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) UpdateIndex
func(c*IndexClient)UpdateIndex(ctxcontext.Context,req*aiplatformpb.UpdateIndexRequest,opts...gax.CallOption)(*UpdateIndexOperation,error)UpdateIndex updates an Index.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateIndexRequest.}op,err:=c.UpdateIndex(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) UpdateIndexOperation
func(c*IndexClient)UpdateIndexOperation(namestring)*UpdateIndexOperationUpdateIndexOperation returns a new UpdateIndexOperation from a given name.The name must be that of a previously created UpdateIndexOperation, possibly from a different process.
func (*IndexClient) UpsertDatapoints
func(c*IndexClient)UpsertDatapoints(ctxcontext.Context,req*aiplatformpb.UpsertDatapointsRequest,opts...gax.CallOption)(*aiplatformpb.UpsertDatapointsResponse,error)UpsertDatapoints add/update Datapoints into an Index.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpsertDatapointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpsertDatapointsRequest.}resp,err:=c.UpsertDatapoints(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexClient) WaitOperation
func(c*IndexClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}IndexEndpointCallOptions
typeIndexEndpointCallOptionsstruct{CreateIndexEndpoint[]gax.CallOptionGetIndexEndpoint[]gax.CallOptionListIndexEndpoints[]gax.CallOptionUpdateIndexEndpoint[]gax.CallOptionDeleteIndexEndpoint[]gax.CallOptionDeployIndex[]gax.CallOptionUndeployIndex[]gax.CallOptionMutateDeployedIndex[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}IndexEndpointCallOptions contains the retry settings for each method of IndexEndpointClient.
IndexEndpointClient
typeIndexEndpointClientstruct{// The call options for this service.CallOptions*IndexEndpointCallOptions// 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}IndexEndpointClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s IndexEndpoints.
func NewIndexEndpointClient
funcNewIndexEndpointClient(ctxcontext.Context,opts...option.ClientOption)(*IndexEndpointClient,error)NewIndexEndpointClient creates a new index endpoint service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s IndexEndpoints.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*IndexEndpointClient) CancelOperation
func(c*IndexEndpointClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) Close
func(c*IndexEndpointClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*IndexEndpointClient) Connection (deprecated)
func(c*IndexEndpointClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*IndexEndpointClient) CreateIndexEndpoint
func(c*IndexEndpointClient)CreateIndexEndpoint(ctxcontext.Context,req*aiplatformpb.CreateIndexEndpointRequest,opts...gax.CallOption)(*CreateIndexEndpointOperation,error)CreateIndexEndpoint creates an IndexEndpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateIndexEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateIndexEndpointRequest.}op,err:=c.CreateIndexEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) CreateIndexEndpointOperation
func(c*IndexEndpointClient)CreateIndexEndpointOperation(namestring)*CreateIndexEndpointOperationCreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name.The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process.
func (*IndexEndpointClient) DeleteIndexEndpoint
func(c*IndexEndpointClient)DeleteIndexEndpoint(ctxcontext.Context,req*aiplatformpb.DeleteIndexEndpointRequest,opts...gax.CallOption)(*DeleteIndexEndpointOperation,error)DeleteIndexEndpoint deletes an IndexEndpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteIndexEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteIndexEndpointRequest.}op,err:=c.DeleteIndexEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*IndexEndpointClient) DeleteIndexEndpointOperation
func(c*IndexEndpointClient)DeleteIndexEndpointOperation(namestring)*DeleteIndexEndpointOperationDeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name.The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process.
func (*IndexEndpointClient) DeleteOperation
func(c*IndexEndpointClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) DeployIndex
func(c*IndexEndpointClient)DeployIndex(ctxcontext.Context,req*aiplatformpb.DeployIndexRequest,opts...gax.CallOption)(*DeployIndexOperation,error)DeployIndex deploys an Index into this IndexEndpoint, creating a DeployedIndex withinit.Only non-empty Indexes can be deployed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeployIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeployIndexRequest.}op,err:=c.DeployIndex(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) DeployIndexOperation
func(c*IndexEndpointClient)DeployIndexOperation(namestring)*DeployIndexOperationDeployIndexOperation returns a new DeployIndexOperation from a given name.The name must be that of a previously created DeployIndexOperation, possibly from a different process.
func (*IndexEndpointClient) GetIamPolicy
func(c*IndexEndpointClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) GetIndexEndpoint
func(c*IndexEndpointClient)GetIndexEndpoint(ctxcontext.Context,req*aiplatformpb.GetIndexEndpointRequest,opts...gax.CallOption)(*aiplatformpb.IndexEndpoint,error)GetIndexEndpoint gets an IndexEndpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetIndexEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetIndexEndpointRequest.}resp,err:=c.GetIndexEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) GetLocation
func(c*IndexEndpointClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) GetOperation
func(c*IndexEndpointClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) ListIndexEndpoints
func(c*IndexEndpointClient)ListIndexEndpoints(ctxcontext.Context,req*aiplatformpb.ListIndexEndpointsRequest,opts...gax.CallOption)*IndexEndpointIteratorListIndexEndpoints lists IndexEndpoints in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListIndexEndpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListIndexEndpointsRequest.}it:=c.ListIndexEndpoints(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.(*aiplatformpb.ListIndexEndpointsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListIndexEndpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListIndexEndpointsRequest.}forresp,err:=rangec.ListIndexEndpoints(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*IndexEndpointClient) ListLocations
func(c*IndexEndpointClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) ListOperations
func(c*IndexEndpointClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(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 (*IndexEndpointClient) MutateDeployedIndex
func(c*IndexEndpointClient)MutateDeployedIndex(ctxcontext.Context,req*aiplatformpb.MutateDeployedIndexRequest,opts...gax.CallOption)(*MutateDeployedIndexOperation,error)MutateDeployedIndex update an existing DeployedIndex under an IndexEndpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.MutateDeployedIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#MutateDeployedIndexRequest.}op,err:=c.MutateDeployedIndex(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) MutateDeployedIndexOperation
func(c*IndexEndpointClient)MutateDeployedIndexOperation(namestring)*MutateDeployedIndexOperationMutateDeployedIndexOperation returns a new MutateDeployedIndexOperation from a given name.The name must be that of a previously created MutateDeployedIndexOperation, possibly from a different process.
func (*IndexEndpointClient) SetIamPolicy
func(c*IndexEndpointClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) TestIamPermissions
func(c*IndexEndpointClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) UndeployIndex
func(c*IndexEndpointClient)UndeployIndex(ctxcontext.Context,req*aiplatformpb.UndeployIndexRequest,opts...gax.CallOption)(*UndeployIndexOperation,error)UndeployIndex undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it,and freeing all resources it’s using.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UndeployIndexRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UndeployIndexRequest.}op,err:=c.UndeployIndex(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) UndeployIndexOperation
func(c*IndexEndpointClient)UndeployIndexOperation(namestring)*UndeployIndexOperationUndeployIndexOperation returns a new UndeployIndexOperation from a given name.The name must be that of a previously created UndeployIndexOperation, possibly from a different process.
func (*IndexEndpointClient) UpdateIndexEndpoint
func(c*IndexEndpointClient)UpdateIndexEndpoint(ctxcontext.Context,req*aiplatformpb.UpdateIndexEndpointRequest,opts...gax.CallOption)(*aiplatformpb.IndexEndpoint,error)UpdateIndexEndpoint updates an IndexEndpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateIndexEndpointRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateIndexEndpointRequest.}resp,err:=c.UpdateIndexEndpoint(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*IndexEndpointClient) WaitOperation
func(c*IndexEndpointClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewIndexEndpointClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}IndexEndpointIterator
typeIndexEndpointIteratorstruct{// 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[]*aiplatformpb.IndexEndpoint,nextPageTokenstring,errerror)// contains filtered or unexported fields}IndexEndpointIterator manages a stream of *aiplatformpb.IndexEndpoint.
func (*IndexEndpointIterator) All
func(it*IndexEndpointIterator)All()iter.Seq2[*aiplatformpb.IndexEndpoint,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*IndexEndpointIterator) Next
func(it*IndexEndpointIterator)Next()(*aiplatformpb.IndexEndpoint,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*IndexEndpointIterator) PageInfo
func(it*IndexEndpointIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
IndexIterator
typeIndexIteratorstruct{// 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[]*aiplatformpb.Index,nextPageTokenstring,errerror)// contains filtered or unexported fields}IndexIterator manages a stream of *aiplatformpb.Index.
func (*IndexIterator) All
func(it*IndexIterator)All()iter.Seq2[*aiplatformpb.Index,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*IndexIterator) Next
func(it*IndexIterator)Next()(*aiplatformpb.Index,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*IndexIterator) PageInfo
func(it*IndexIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
JobCallOptions
typeJobCallOptionsstruct{CreateCustomJob[]gax.CallOptionGetCustomJob[]gax.CallOptionListCustomJobs[]gax.CallOptionDeleteCustomJob[]gax.CallOptionCancelCustomJob[]gax.CallOptionCreateDataLabelingJob[]gax.CallOptionGetDataLabelingJob[]gax.CallOptionListDataLabelingJobs[]gax.CallOptionDeleteDataLabelingJob[]gax.CallOptionCancelDataLabelingJob[]gax.CallOptionCreateHyperparameterTuningJob[]gax.CallOptionGetHyperparameterTuningJob[]gax.CallOptionListHyperparameterTuningJobs[]gax.CallOptionDeleteHyperparameterTuningJob[]gax.CallOptionCancelHyperparameterTuningJob[]gax.CallOptionCreateNasJob[]gax.CallOptionGetNasJob[]gax.CallOptionListNasJobs[]gax.CallOptionDeleteNasJob[]gax.CallOptionCancelNasJob[]gax.CallOptionGetNasTrialDetail[]gax.CallOptionListNasTrialDetails[]gax.CallOptionCreateBatchPredictionJob[]gax.CallOptionGetBatchPredictionJob[]gax.CallOptionListBatchPredictionJobs[]gax.CallOptionDeleteBatchPredictionJob[]gax.CallOptionCancelBatchPredictionJob[]gax.CallOptionCreateModelDeploymentMonitoringJob[]gax.CallOptionSearchModelDeploymentMonitoringStatsAnomalies[]gax.CallOptionGetModelDeploymentMonitoringJob[]gax.CallOptionListModelDeploymentMonitoringJobs[]gax.CallOptionUpdateModelDeploymentMonitoringJob[]gax.CallOptionDeleteModelDeploymentMonitoringJob[]gax.CallOptionPauseModelDeploymentMonitoringJob[]gax.CallOptionResumeModelDeploymentMonitoringJob[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}JobCallOptions contains the retry settings for each method of JobClient.
JobClient
typeJobClientstruct{// The call options for this service.CallOptions*JobCallOptions// 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}JobClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s jobs.
func NewJobClient
NewJobClient creates a new job service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s jobs.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*JobClient) CancelBatchPredictionJob
func(c*JobClient)CancelBatchPredictionJob(ctxcontext.Context,req*aiplatformpb.CancelBatchPredictionJobRequest,opts...gax.CallOption)errorCancelBatchPredictionJob cancels a BatchPredictionJob.
Starts asynchronous cancellation on the BatchPredictionJob. The servermakes the best effort to cancel the job, but success is notguaranteed. Clients can useJobService.GetBatchPredictionJobor other methods to check whether the cancellation succeeded or whether thejob completed despite cancellation. On a successful cancellation,the BatchPredictionJob is not deleted;instead itsBatchPredictionJob.stateis set to CANCELLED. Any files already outputted by the job are notdeleted.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelBatchPredictionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelBatchPredictionJobRequest.}err=c.CancelBatchPredictionJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) CancelCustomJob
func(c*JobClient)CancelCustomJob(ctxcontext.Context,req*aiplatformpb.CancelCustomJobRequest,opts...gax.CallOption)errorCancelCustomJob cancels a CustomJob.Starts asynchronous cancellation on the CustomJob. The servermakes a best effort to cancel the job, but success is notguaranteed. Clients can useJobService.GetCustomJobor other methods to check whether the cancellation succeeded or whether thejob completed despite cancellation. On successful cancellation,the CustomJob is not deleted; instead it becomes a job witha CustomJob.error value witha google.rpc.Status.code of 1, corresponding toCode.CANCELLED, andCustomJob.state is set toCANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelCustomJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelCustomJobRequest.}err=c.CancelCustomJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) CancelDataLabelingJob
func(c*JobClient)CancelDataLabelingJob(ctxcontext.Context,req*aiplatformpb.CancelDataLabelingJobRequest,opts...gax.CallOption)errorCancelDataLabelingJob cancels a DataLabelingJob. Success of cancellation is not guaranteed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelDataLabelingJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelDataLabelingJobRequest.}err=c.CancelDataLabelingJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) CancelHyperparameterTuningJob
func(c*JobClient)CancelHyperparameterTuningJob(ctxcontext.Context,req*aiplatformpb.CancelHyperparameterTuningJobRequest,opts...gax.CallOption)errorCancelHyperparameterTuningJob cancels a HyperparameterTuningJob.Starts asynchronous cancellation on the HyperparameterTuningJob. The servermakes a best effort to cancel the job, but success is notguaranteed. Clients can useJobService.GetHyperparameterTuningJobor other methods to check whether the cancellation succeeded or whether thejob completed despite cancellation. On successful cancellation,the HyperparameterTuningJob is not deleted; instead it becomes a job withaHyperparameterTuningJob.errorvalue with a google.rpc.Status.code of 1,corresponding to Code.CANCELLED, andHyperparameterTuningJob.stateis set to CANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelHyperparameterTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelHyperparameterTuningJobRequest.}err=c.CancelHyperparameterTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) CancelNasJob
func(c*JobClient)CancelNasJob(ctxcontext.Context,req*aiplatformpb.CancelNasJobRequest,opts...gax.CallOption)errorCancelNasJob cancels a NasJob.Starts asynchronous cancellation on the NasJob. The servermakes a best effort to cancel the job, but success is notguaranteed. Clients can useJobService.GetNasJob orother methods to check whether the cancellation succeeded or whether thejob completed despite cancellation. On successful cancellation,the NasJob is not deleted; instead it becomes a job witha NasJob.error value with agoogle.rpc.Status.code of 1, corresponding toCode.CANCELLED, andNasJob.state is set toCANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelNasJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelNasJobRequest.}err=c.CancelNasJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) CancelOperation
func(c*JobClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*JobClient) Connection (deprecated)
func(c*JobClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*JobClient) CreateBatchPredictionJob
func(c*JobClient)CreateBatchPredictionJob(ctxcontext.Context,req*aiplatformpb.CreateBatchPredictionJobRequest,opts...gax.CallOption)(*aiplatformpb.BatchPredictionJob,error)CreateBatchPredictionJob creates a BatchPredictionJob. A BatchPredictionJob once created willright away be attempted to start.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateBatchPredictionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateBatchPredictionJobRequest.}resp,err:=c.CreateBatchPredictionJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) CreateCustomJob
func(c*JobClient)CreateCustomJob(ctxcontext.Context,req*aiplatformpb.CreateCustomJobRequest,opts...gax.CallOption)(*aiplatformpb.CustomJob,error)CreateCustomJob creates a CustomJob. A created CustomJob right awaywill be attempted to be run.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateCustomJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateCustomJobRequest.}resp,err:=c.CreateCustomJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) CreateDataLabelingJob
func(c*JobClient)CreateDataLabelingJob(ctxcontext.Context,req*aiplatformpb.CreateDataLabelingJobRequest,opts...gax.CallOption)(*aiplatformpb.DataLabelingJob,error)CreateDataLabelingJob creates a DataLabelingJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateDataLabelingJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateDataLabelingJobRequest.}resp,err:=c.CreateDataLabelingJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) CreateHyperparameterTuningJob
func(c*JobClient)CreateHyperparameterTuningJob(ctxcontext.Context,req*aiplatformpb.CreateHyperparameterTuningJobRequest,opts...gax.CallOption)(*aiplatformpb.HyperparameterTuningJob,error)CreateHyperparameterTuningJob creates a HyperparameterTuningJob
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateHyperparameterTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateHyperparameterTuningJobRequest.}resp,err:=c.CreateHyperparameterTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) CreateModelDeploymentMonitoringJob
func(c*JobClient)CreateModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.CreateModelDeploymentMonitoringJobRequest,opts...gax.CallOption)(*aiplatformpb.ModelDeploymentMonitoringJob,error)CreateModelDeploymentMonitoringJob creates a ModelDeploymentMonitoringJob. It will run periodically on aconfigured interval.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateModelDeploymentMonitoringJobRequest.}resp,err:=c.CreateModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) CreateNasJob
func(c*JobClient)CreateNasJob(ctxcontext.Context,req*aiplatformpb.CreateNasJobRequest,opts...gax.CallOption)(*aiplatformpb.NasJob,error)CreateNasJob creates a NasJob
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateNasJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateNasJobRequest.}resp,err:=c.CreateNasJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) DeleteBatchPredictionJob
func(c*JobClient)DeleteBatchPredictionJob(ctxcontext.Context,req*aiplatformpb.DeleteBatchPredictionJobRequest,opts...gax.CallOption)(*DeleteBatchPredictionJobOperation,error)DeleteBatchPredictionJob deletes a BatchPredictionJob. Can only be called on jobs that alreadyfinished.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteBatchPredictionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteBatchPredictionJobRequest.}op,err:=c.DeleteBatchPredictionJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteBatchPredictionJobOperation
func(c*JobClient)DeleteBatchPredictionJobOperation(namestring)*DeleteBatchPredictionJobOperationDeleteBatchPredictionJobOperation returns a new DeleteBatchPredictionJobOperation from a given name.The name must be that of a previously created DeleteBatchPredictionJobOperation, possibly from a different process.
func (*JobClient) DeleteCustomJob
func(c*JobClient)DeleteCustomJob(ctxcontext.Context,req*aiplatformpb.DeleteCustomJobRequest,opts...gax.CallOption)(*DeleteCustomJobOperation,error)DeleteCustomJob deletes a CustomJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteCustomJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteCustomJobRequest.}op,err:=c.DeleteCustomJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteCustomJobOperation
func(c*JobClient)DeleteCustomJobOperation(namestring)*DeleteCustomJobOperationDeleteCustomJobOperation returns a new DeleteCustomJobOperation from a given name.The name must be that of a previously created DeleteCustomJobOperation, possibly from a different process.
func (*JobClient) DeleteDataLabelingJob
func(c*JobClient)DeleteDataLabelingJob(ctxcontext.Context,req*aiplatformpb.DeleteDataLabelingJobRequest,opts...gax.CallOption)(*DeleteDataLabelingJobOperation,error)DeleteDataLabelingJob deletes a DataLabelingJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteDataLabelingJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteDataLabelingJobRequest.}op,err:=c.DeleteDataLabelingJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteDataLabelingJobOperation
func(c*JobClient)DeleteDataLabelingJobOperation(namestring)*DeleteDataLabelingJobOperationDeleteDataLabelingJobOperation returns a new DeleteDataLabelingJobOperation from a given name.The name must be that of a previously created DeleteDataLabelingJobOperation, possibly from a different process.
func (*JobClient) DeleteHyperparameterTuningJob
func(c*JobClient)DeleteHyperparameterTuningJob(ctxcontext.Context,req*aiplatformpb.DeleteHyperparameterTuningJobRequest,opts...gax.CallOption)(*DeleteHyperparameterTuningJobOperation,error)DeleteHyperparameterTuningJob deletes a HyperparameterTuningJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteHyperparameterTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteHyperparameterTuningJobRequest.}op,err:=c.DeleteHyperparameterTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteHyperparameterTuningJobOperation
func(c*JobClient)DeleteHyperparameterTuningJobOperation(namestring)*DeleteHyperparameterTuningJobOperationDeleteHyperparameterTuningJobOperation returns a new DeleteHyperparameterTuningJobOperation from a given name.The name must be that of a previously created DeleteHyperparameterTuningJobOperation, possibly from a different process.
func (*JobClient) DeleteModelDeploymentMonitoringJob
func(c*JobClient)DeleteModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.DeleteModelDeploymentMonitoringJobRequest,opts...gax.CallOption)(*DeleteModelDeploymentMonitoringJobOperation,error)DeleteModelDeploymentMonitoringJob deletes a ModelDeploymentMonitoringJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteModelDeploymentMonitoringJobRequest.}op,err:=c.DeleteModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteModelDeploymentMonitoringJobOperation
func(c*JobClient)DeleteModelDeploymentMonitoringJobOperation(namestring)*DeleteModelDeploymentMonitoringJobOperationDeleteModelDeploymentMonitoringJobOperation returns a new DeleteModelDeploymentMonitoringJobOperation from a given name.The name must be that of a previously created DeleteModelDeploymentMonitoringJobOperation, possibly from a different process.
func (*JobClient) DeleteNasJob
func(c*JobClient)DeleteNasJob(ctxcontext.Context,req*aiplatformpb.DeleteNasJobRequest,opts...gax.CallOption)(*DeleteNasJobOperation,error)DeleteNasJob deletes a NasJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteNasJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteNasJobRequest.}op,err:=c.DeleteNasJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*JobClient) DeleteNasJobOperation
func(c*JobClient)DeleteNasJobOperation(namestring)*DeleteNasJobOperationDeleteNasJobOperation returns a new DeleteNasJobOperation from a given name.The name must be that of a previously created DeleteNasJobOperation, possibly from a different process.
func (*JobClient) DeleteOperation
func(c*JobClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) GetBatchPredictionJob
func(c*JobClient)GetBatchPredictionJob(ctxcontext.Context,req*aiplatformpb.GetBatchPredictionJobRequest,opts...gax.CallOption)(*aiplatformpb.BatchPredictionJob,error)GetBatchPredictionJob gets a BatchPredictionJob
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetBatchPredictionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetBatchPredictionJobRequest.}resp,err:=c.GetBatchPredictionJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetCustomJob
func(c*JobClient)GetCustomJob(ctxcontext.Context,req*aiplatformpb.GetCustomJobRequest,opts...gax.CallOption)(*aiplatformpb.CustomJob,error)GetCustomJob gets a CustomJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetCustomJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetCustomJobRequest.}resp,err:=c.GetCustomJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetDataLabelingJob
func(c*JobClient)GetDataLabelingJob(ctxcontext.Context,req*aiplatformpb.GetDataLabelingJobRequest,opts...gax.CallOption)(*aiplatformpb.DataLabelingJob,error)GetDataLabelingJob gets a DataLabelingJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetDataLabelingJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetDataLabelingJobRequest.}resp,err:=c.GetDataLabelingJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetHyperparameterTuningJob
func(c*JobClient)GetHyperparameterTuningJob(ctxcontext.Context,req*aiplatformpb.GetHyperparameterTuningJobRequest,opts...gax.CallOption)(*aiplatformpb.HyperparameterTuningJob,error)GetHyperparameterTuningJob gets a HyperparameterTuningJob
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetHyperparameterTuningJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetHyperparameterTuningJobRequest.}resp,err:=c.GetHyperparameterTuningJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetIamPolicy
func(c*JobClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetLocation
func(c*JobClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) GetModelDeploymentMonitoringJob
func(c*JobClient)GetModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.GetModelDeploymentMonitoringJobRequest,opts...gax.CallOption)(*aiplatformpb.ModelDeploymentMonitoringJob,error)GetModelDeploymentMonitoringJob gets a ModelDeploymentMonitoringJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetModelDeploymentMonitoringJobRequest.}resp,err:=c.GetModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetNasJob
func(c*JobClient)GetNasJob(ctxcontext.Context,req*aiplatformpb.GetNasJobRequest,opts...gax.CallOption)(*aiplatformpb.NasJob,error)GetNasJob gets a NasJob
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetNasJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetNasJobRequest.}resp,err:=c.GetNasJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetNasTrialDetail
func(c*JobClient)GetNasTrialDetail(ctxcontext.Context,req*aiplatformpb.GetNasTrialDetailRequest,opts...gax.CallOption)(*aiplatformpb.NasTrialDetail,error)GetNasTrialDetail gets a NasTrialDetail.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetNasTrialDetailRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetNasTrialDetailRequest.}resp,err:=c.GetNasTrialDetail(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) GetOperation
func(c*JobClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) ListBatchPredictionJobs
func(c*JobClient)ListBatchPredictionJobs(ctxcontext.Context,req*aiplatformpb.ListBatchPredictionJobsRequest,opts...gax.CallOption)*BatchPredictionJobIteratorListBatchPredictionJobs lists BatchPredictionJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListBatchPredictionJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListBatchPredictionJobsRequest.}it:=c.ListBatchPredictionJobs(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.(*aiplatformpb.ListBatchPredictionJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListBatchPredictionJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListBatchPredictionJobsRequest.}forresp,err:=rangec.ListBatchPredictionJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListCustomJobs
func(c*JobClient)ListCustomJobs(ctxcontext.Context,req*aiplatformpb.ListCustomJobsRequest,opts...gax.CallOption)*CustomJobIteratorListCustomJobs lists CustomJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListCustomJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListCustomJobsRequest.}it:=c.ListCustomJobs(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.(*aiplatformpb.ListCustomJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListCustomJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListCustomJobsRequest.}forresp,err:=rangec.ListCustomJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListDataLabelingJobs
func(c*JobClient)ListDataLabelingJobs(ctxcontext.Context,req*aiplatformpb.ListDataLabelingJobsRequest,opts...gax.CallOption)*DataLabelingJobIteratorListDataLabelingJobs lists DataLabelingJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDataLabelingJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDataLabelingJobsRequest.}it:=c.ListDataLabelingJobs(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.(*aiplatformpb.ListDataLabelingJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListDataLabelingJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListDataLabelingJobsRequest.}forresp,err:=rangec.ListDataLabelingJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListHyperparameterTuningJobs
func(c*JobClient)ListHyperparameterTuningJobs(ctxcontext.Context,req*aiplatformpb.ListHyperparameterTuningJobsRequest,opts...gax.CallOption)*HyperparameterTuningJobIteratorListHyperparameterTuningJobs lists HyperparameterTuningJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListHyperparameterTuningJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListHyperparameterTuningJobsRequest.}it:=c.ListHyperparameterTuningJobs(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.(*aiplatformpb.ListHyperparameterTuningJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListHyperparameterTuningJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListHyperparameterTuningJobsRequest.}forresp,err:=rangec.ListHyperparameterTuningJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListLocations
func(c*JobClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) ListModelDeploymentMonitoringJobs
func(c*JobClient)ListModelDeploymentMonitoringJobs(ctxcontext.Context,req*aiplatformpb.ListModelDeploymentMonitoringJobsRequest,opts...gax.CallOption)*ModelDeploymentMonitoringJobIteratorListModelDeploymentMonitoringJobs lists ModelDeploymentMonitoringJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelDeploymentMonitoringJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelDeploymentMonitoringJobsRequest.}it:=c.ListModelDeploymentMonitoringJobs(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.(*aiplatformpb.ListModelDeploymentMonitoringJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelDeploymentMonitoringJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelDeploymentMonitoringJobsRequest.}forresp,err:=rangec.ListModelDeploymentMonitoringJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListNasJobs
func(c*JobClient)ListNasJobs(ctxcontext.Context,req*aiplatformpb.ListNasJobsRequest,opts...gax.CallOption)*NasJobIteratorListNasJobs lists NasJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNasJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNasJobsRequest.}it:=c.ListNasJobs(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.(*aiplatformpb.ListNasJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNasJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNasJobsRequest.}forresp,err:=rangec.ListNasJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListNasTrialDetails
func(c*JobClient)ListNasTrialDetails(ctxcontext.Context,req*aiplatformpb.ListNasTrialDetailsRequest,opts...gax.CallOption)*NasTrialDetailIteratorListNasTrialDetails list top NasTrialDetails of a NasJob.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNasTrialDetailsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNasTrialDetailsRequest.}it:=c.ListNasTrialDetails(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.(*aiplatformpb.ListNasTrialDetailsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNasTrialDetailsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNasTrialDetailsRequest.}forresp,err:=rangec.ListNasTrialDetails(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) ListOperations
func(c*JobClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(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 (*JobClient) PauseModelDeploymentMonitoringJob
func(c*JobClient)PauseModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.PauseModelDeploymentMonitoringJobRequest,opts...gax.CallOption)errorPauseModelDeploymentMonitoringJob pauses a ModelDeploymentMonitoringJob. If the job is running, the servermakes a best effort to cancel the job. Will markModelDeploymentMonitoringJob.stateto ‘PAUSED’.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PauseModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PauseModelDeploymentMonitoringJobRequest.}err=c.PauseModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) ResumeModelDeploymentMonitoringJob
func(c*JobClient)ResumeModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.ResumeModelDeploymentMonitoringJobRequest,opts...gax.CallOption)errorResumeModelDeploymentMonitoringJob resumes a paused ModelDeploymentMonitoringJob. It will start to run fromnext scheduled time. A deleted ModelDeploymentMonitoringJob can’t beresumed.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ResumeModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ResumeModelDeploymentMonitoringJobRequest.}err=c.ResumeModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*JobClient) SearchModelDeploymentMonitoringStatsAnomalies
func(c*JobClient)SearchModelDeploymentMonitoringStatsAnomalies(ctxcontext.Context,req*aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest,opts...gax.CallOption)*ModelMonitoringStatsAnomaliesIteratorSearchModelDeploymentMonitoringStatsAnomalies searches Model Monitoring Statistics generated within a given time window.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchModelDeploymentMonitoringStatsAnomaliesRequest.}it:=c.SearchModelDeploymentMonitoringStatsAnomalies(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.(*aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchModelDeploymentMonitoringStatsAnomaliesRequest.}forresp,err:=rangec.SearchModelDeploymentMonitoringStatsAnomalies(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*JobClient) SetIamPolicy
func(c*JobClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) TestIamPermissions
func(c*JobClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) UpdateModelDeploymentMonitoringJob
func(c*JobClient)UpdateModelDeploymentMonitoringJob(ctxcontext.Context,req*aiplatformpb.UpdateModelDeploymentMonitoringJobRequest,opts...gax.CallOption)(*UpdateModelDeploymentMonitoringJobOperation,error)UpdateModelDeploymentMonitoringJob updates a ModelDeploymentMonitoringJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateModelDeploymentMonitoringJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateModelDeploymentMonitoringJobRequest.}op,err:=c.UpdateModelDeploymentMonitoringJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*JobClient) UpdateModelDeploymentMonitoringJobOperation
func(c*JobClient)UpdateModelDeploymentMonitoringJobOperation(namestring)*UpdateModelDeploymentMonitoringJobOperationUpdateModelDeploymentMonitoringJobOperation returns a new UpdateModelDeploymentMonitoringJobOperation from a given name.The name must be that of a previously created UpdateModelDeploymentMonitoringJobOperation, possibly from a different process.
func (*JobClient) WaitOperation
func(c*JobClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewJobClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}LlmUtilityCallOptions
typeLlmUtilityCallOptionsstruct{CountTokens[]gax.CallOptionComputeTokens[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}LlmUtilityCallOptions contains the retry settings for each method of LlmUtilityClient.
LlmUtilityClient
typeLlmUtilityClientstruct{// The call options for this service.CallOptions*LlmUtilityCallOptions// contains filtered or unexported fields}LlmUtilityClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for LLM related utility functions.
func NewLlmUtilityClient
funcNewLlmUtilityClient(ctxcontext.Context,opts...option.ClientOption)(*LlmUtilityClient,error)NewLlmUtilityClient creates a new llm utility service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for LLM related utility functions.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*LlmUtilityClient) CancelOperation
func(c*LlmUtilityClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) Close
func(c*LlmUtilityClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*LlmUtilityClient) ComputeTokens
func(c*LlmUtilityClient)ComputeTokens(ctxcontext.Context,req*aiplatformpb.ComputeTokensRequest,opts...gax.CallOption)(*aiplatformpb.ComputeTokensResponse,error)ComputeTokens return a list of tokens based on the input text.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ComputeTokensRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ComputeTokensRequest.}resp,err:=c.ComputeTokens(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LlmUtilityClient) Connection (deprecated)
func(c*LlmUtilityClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*LlmUtilityClient) CountTokens
func(c*LlmUtilityClient)CountTokens(ctxcontext.Context,req*aiplatformpb.CountTokensRequest,opts...gax.CallOption)(*aiplatformpb.CountTokensResponse,error)CountTokens perform a token counting.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CountTokensRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CountTokensRequest.}resp,err:=c.CountTokens(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LlmUtilityClient) DeleteOperation
func(c*LlmUtilityClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) GetIamPolicy
func(c*LlmUtilityClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LlmUtilityClient) GetLocation
func(c*LlmUtilityClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) GetOperation
func(c*LlmUtilityClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) ListLocations
func(c*LlmUtilityClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) ListOperations
func(c*LlmUtilityClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(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 (*LlmUtilityClient) SetIamPolicy
func(c*LlmUtilityClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LlmUtilityClient) TestIamPermissions
func(c*LlmUtilityClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*LlmUtilityClient) WaitOperation
func(c*LlmUtilityClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewLlmUtilityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}LocationIterator
typeLocationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All
func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*LocationIterator) Next
func(it*LocationIterator)Next()(*locationpb.Location,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo
func(it*LocationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MatchCallOptions
typeMatchCallOptionsstruct{FindNeighbors[]gax.CallOptionReadIndexDatapoints[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}MatchCallOptions contains the retry settings for each method of MatchClient.
MatchClient
typeMatchClientstruct{// The call options for this service.CallOptions*MatchCallOptions// contains filtered or unexported fields}MatchClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
MatchService is a Google managed service for efficient vector similaritysearch at scale.
func NewMatchClient
funcNewMatchClient(ctxcontext.Context,opts...option.ClientOption)(*MatchClient,error)NewMatchClient creates a new match service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
MatchService is a Google managed service for efficient vector similaritysearch at scale.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*MatchClient) CancelOperation
func(c*MatchClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) Close
func(c*MatchClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*MatchClient) Connection (deprecated)
func(c*MatchClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*MatchClient) DeleteOperation
func(c*MatchClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) FindNeighbors
func(c*MatchClient)FindNeighbors(ctxcontext.Context,req*aiplatformpb.FindNeighborsRequest,opts...gax.CallOption)(*aiplatformpb.FindNeighborsResponse,error)FindNeighbors finds the nearest neighbors of each vector within the request.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.FindNeighborsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#FindNeighborsRequest.}resp,err:=c.FindNeighbors(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MatchClient) GetIamPolicy
func(c*MatchClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MatchClient) GetLocation
func(c*MatchClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) GetOperation
func(c*MatchClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) ListLocations
func(c*MatchClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) ListOperations
func(c*MatchClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(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 (*MatchClient) ReadIndexDatapoints
func(c*MatchClient)ReadIndexDatapoints(ctxcontext.Context,req*aiplatformpb.ReadIndexDatapointsRequest,opts...gax.CallOption)(*aiplatformpb.ReadIndexDatapointsResponse,error)ReadIndexDatapoints reads the datapoints/vectors of the given IDs.A maximum of 1000 datapoints can be retrieved in a batch.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ReadIndexDatapointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ReadIndexDatapointsRequest.}resp,err:=c.ReadIndexDatapoints(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MatchClient) SetIamPolicy
func(c*MatchClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MatchClient) TestIamPermissions
func(c*MatchClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MatchClient) WaitOperation
func(c*MatchClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMatchClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}MetadataCallOptions
typeMetadataCallOptionsstruct{CreateMetadataStore[]gax.CallOptionGetMetadataStore[]gax.CallOptionListMetadataStores[]gax.CallOptionDeleteMetadataStore[]gax.CallOptionCreateArtifact[]gax.CallOptionGetArtifact[]gax.CallOptionListArtifacts[]gax.CallOptionUpdateArtifact[]gax.CallOptionDeleteArtifact[]gax.CallOptionPurgeArtifacts[]gax.CallOptionCreateContext[]gax.CallOptionGetContext[]gax.CallOptionListContexts[]gax.CallOptionUpdateContext[]gax.CallOptionDeleteContext[]gax.CallOptionPurgeContexts[]gax.CallOptionAddContextArtifactsAndExecutions[]gax.CallOptionAddContextChildren[]gax.CallOptionRemoveContextChildren[]gax.CallOptionQueryContextLineageSubgraph[]gax.CallOptionCreateExecution[]gax.CallOptionGetExecution[]gax.CallOptionListExecutions[]gax.CallOptionUpdateExecution[]gax.CallOptionDeleteExecution[]gax.CallOptionPurgeExecutions[]gax.CallOptionAddExecutionEvents[]gax.CallOptionQueryExecutionInputsAndOutputs[]gax.CallOptionCreateMetadataSchema[]gax.CallOptionGetMetadataSchema[]gax.CallOptionListMetadataSchemas[]gax.CallOptionQueryArtifactLineageSubgraph[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}MetadataCallOptions contains the retry settings for each method of MetadataClient.
MetadataClient
typeMetadataClientstruct{// The call options for this service.CallOptions*MetadataCallOptions// 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}MetadataClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for reading and writing metadata entries.
func NewMetadataClient
funcNewMetadataClient(ctxcontext.Context,opts...option.ClientOption)(*MetadataClient,error)NewMetadataClient creates a new metadata service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for reading and writing metadata entries.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*MetadataClient) AddContextArtifactsAndExecutions
func(c*MetadataClient)AddContextArtifactsAndExecutions(ctxcontext.Context,req*aiplatformpb.AddContextArtifactsAndExecutionsRequest,opts...gax.CallOption)(*aiplatformpb.AddContextArtifactsAndExecutionsResponse,error)AddContextArtifactsAndExecutions adds a set of Artifacts and Executions to a Context. If any of theArtifacts or Executions have already been added to a Context, they aresimply skipped.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AddContextArtifactsAndExecutionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AddContextArtifactsAndExecutionsRequest.}resp,err:=c.AddContextArtifactsAndExecutions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) AddContextChildren
func(c*MetadataClient)AddContextChildren(ctxcontext.Context,req*aiplatformpb.AddContextChildrenRequest,opts...gax.CallOption)(*aiplatformpb.AddContextChildrenResponse,error)AddContextChildren adds a set of Contexts as children to a parent Context. If any of thechild Contexts have already been added to the parent Context, they aresimply skipped. If this call would create a cycle or cause any Context tohave more than 10 parents, the request will fail with an INVALID_ARGUMENTerror.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AddContextChildrenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AddContextChildrenRequest.}resp,err:=c.AddContextChildren(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) AddExecutionEvents
func(c*MetadataClient)AddExecutionEvents(ctxcontext.Context,req*aiplatformpb.AddExecutionEventsRequest,opts...gax.CallOption)(*aiplatformpb.AddExecutionEventsResponse,error)AddExecutionEvents adds Events to the specified Execution. An Event indicates whether anArtifact was used as an input or output for an Execution. If an Eventalready exists between the Execution and the Artifact, the Event isskipped.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AddExecutionEventsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AddExecutionEventsRequest.}resp,err:=c.AddExecutionEvents(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CancelOperation
func(c*MetadataClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) Close
func(c*MetadataClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*MetadataClient) Connection (deprecated)
func(c*MetadataClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*MetadataClient) CreateArtifact
func(c*MetadataClient)CreateArtifact(ctxcontext.Context,req*aiplatformpb.CreateArtifactRequest,opts...gax.CallOption)(*aiplatformpb.Artifact,error)CreateArtifact creates an Artifact associated with a MetadataStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateArtifactRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateArtifactRequest.}resp,err:=c.CreateArtifact(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CreateContext
func(c*MetadataClient)CreateContext(ctxcontext.Context,req*aiplatformpb.CreateContextRequest,opts...gax.CallOption)(*aiplatformpb.Context,error)CreateContext creates a Context associated with a MetadataStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateContextRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateContextRequest.}resp,err:=c.CreateContext(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CreateExecution
func(c*MetadataClient)CreateExecution(ctxcontext.Context,req*aiplatformpb.CreateExecutionRequest,opts...gax.CallOption)(*aiplatformpb.Execution,error)CreateExecution creates an Execution associated with a MetadataStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateExecutionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateExecutionRequest.}resp,err:=c.CreateExecution(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CreateMetadataSchema
func(c*MetadataClient)CreateMetadataSchema(ctxcontext.Context,req*aiplatformpb.CreateMetadataSchemaRequest,opts...gax.CallOption)(*aiplatformpb.MetadataSchema,error)CreateMetadataSchema creates a MetadataSchema.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateMetadataSchemaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateMetadataSchemaRequest.}resp,err:=c.CreateMetadataSchema(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CreateMetadataStore
func(c*MetadataClient)CreateMetadataStore(ctxcontext.Context,req*aiplatformpb.CreateMetadataStoreRequest,opts...gax.CallOption)(*CreateMetadataStoreOperation,error)CreateMetadataStore initializes a MetadataStore, including allocation of resources.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateMetadataStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateMetadataStoreRequest.}op,err:=c.CreateMetadataStore(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) CreateMetadataStoreOperation
func(c*MetadataClient)CreateMetadataStoreOperation(namestring)*CreateMetadataStoreOperationCreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name.The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process.
func (*MetadataClient) DeleteArtifact
func(c*MetadataClient)DeleteArtifact(ctxcontext.Context,req*aiplatformpb.DeleteArtifactRequest,opts...gax.CallOption)(*DeleteArtifactOperation,error)DeleteArtifact deletes an Artifact.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteArtifactRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteArtifactRequest.}op,err:=c.DeleteArtifact(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*MetadataClient) DeleteArtifactOperation
func(c*MetadataClient)DeleteArtifactOperation(namestring)*DeleteArtifactOperationDeleteArtifactOperation returns a new DeleteArtifactOperation from a given name.The name must be that of a previously created DeleteArtifactOperation, possibly from a different process.
func (*MetadataClient) DeleteContext
func(c*MetadataClient)DeleteContext(ctxcontext.Context,req*aiplatformpb.DeleteContextRequest,opts...gax.CallOption)(*DeleteContextOperation,error)DeleteContext deletes a stored Context.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteContextRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteContextRequest.}op,err:=c.DeleteContext(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*MetadataClient) DeleteContextOperation
func(c*MetadataClient)DeleteContextOperation(namestring)*DeleteContextOperationDeleteContextOperation returns a new DeleteContextOperation from a given name.The name must be that of a previously created DeleteContextOperation, possibly from a different process.
func (*MetadataClient) DeleteExecution
func(c*MetadataClient)DeleteExecution(ctxcontext.Context,req*aiplatformpb.DeleteExecutionRequest,opts...gax.CallOption)(*DeleteExecutionOperation,error)DeleteExecution deletes an Execution.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteExecutionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteExecutionRequest.}op,err:=c.DeleteExecution(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*MetadataClient) DeleteExecutionOperation
func(c*MetadataClient)DeleteExecutionOperation(namestring)*DeleteExecutionOperationDeleteExecutionOperation returns a new DeleteExecutionOperation from a given name.The name must be that of a previously created DeleteExecutionOperation, possibly from a different process.
func (*MetadataClient) DeleteMetadataStore
func(c*MetadataClient)DeleteMetadataStore(ctxcontext.Context,req*aiplatformpb.DeleteMetadataStoreRequest,opts...gax.CallOption)(*DeleteMetadataStoreOperation,error)DeleteMetadataStore deletes a single MetadataStore and all its child resources (Artifacts,Executions, and Contexts).
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteMetadataStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteMetadataStoreRequest.}op,err:=c.DeleteMetadataStore(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*MetadataClient) DeleteMetadataStoreOperation
func(c*MetadataClient)DeleteMetadataStoreOperation(namestring)*DeleteMetadataStoreOperationDeleteMetadataStoreOperation returns a new DeleteMetadataStoreOperation from a given name.The name must be that of a previously created DeleteMetadataStoreOperation, possibly from a different process.
func (*MetadataClient) DeleteOperation
func(c*MetadataClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) GetArtifact
func(c*MetadataClient)GetArtifact(ctxcontext.Context,req*aiplatformpb.GetArtifactRequest,opts...gax.CallOption)(*aiplatformpb.Artifact,error)GetArtifact retrieves a specific Artifact.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetArtifactRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetArtifactRequest.}resp,err:=c.GetArtifact(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetContext
func(c*MetadataClient)GetContext(ctxcontext.Context,req*aiplatformpb.GetContextRequest,opts...gax.CallOption)(*aiplatformpb.Context,error)GetContext retrieves a specific Context.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetContextRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetContextRequest.}resp,err:=c.GetContext(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetExecution
func(c*MetadataClient)GetExecution(ctxcontext.Context,req*aiplatformpb.GetExecutionRequest,opts...gax.CallOption)(*aiplatformpb.Execution,error)GetExecution retrieves a specific Execution.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetExecutionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetExecutionRequest.}resp,err:=c.GetExecution(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetIamPolicy
func(c*MetadataClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetLocation
func(c*MetadataClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) GetMetadataSchema
func(c*MetadataClient)GetMetadataSchema(ctxcontext.Context,req*aiplatformpb.GetMetadataSchemaRequest,opts...gax.CallOption)(*aiplatformpb.MetadataSchema,error)GetMetadataSchema retrieves a specific MetadataSchema.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetMetadataSchemaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetMetadataSchemaRequest.}resp,err:=c.GetMetadataSchema(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetMetadataStore
func(c*MetadataClient)GetMetadataStore(ctxcontext.Context,req*aiplatformpb.GetMetadataStoreRequest,opts...gax.CallOption)(*aiplatformpb.MetadataStore,error)GetMetadataStore retrieves a specific MetadataStore.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetMetadataStoreRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetMetadataStoreRequest.}resp,err:=c.GetMetadataStore(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) GetOperation
func(c*MetadataClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) ListArtifacts
func(c*MetadataClient)ListArtifacts(ctxcontext.Context,req*aiplatformpb.ListArtifactsRequest,opts...gax.CallOption)*ArtifactIteratorListArtifacts lists Artifacts in the MetadataStore.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListArtifactsRequest.}it:=c.ListArtifacts(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.(*aiplatformpb.ListArtifactsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListArtifactsRequest.}forresp,err:=rangec.ListArtifacts(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MetadataClient) ListContexts
func(c*MetadataClient)ListContexts(ctxcontext.Context,req*aiplatformpb.ListContextsRequest,opts...gax.CallOption)*ContextIteratorListContexts lists Contexts on the MetadataStore.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListContextsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListContextsRequest.}it:=c.ListContexts(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.(*aiplatformpb.ListContextsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListContextsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListContextsRequest.}forresp,err:=rangec.ListContexts(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MetadataClient) ListExecutions
func(c*MetadataClient)ListExecutions(ctxcontext.Context,req*aiplatformpb.ListExecutionsRequest,opts...gax.CallOption)*ExecutionIteratorListExecutions lists Executions in the MetadataStore.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListExecutionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListExecutionsRequest.}it:=c.ListExecutions(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.(*aiplatformpb.ListExecutionsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListExecutionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListExecutionsRequest.}forresp,err:=rangec.ListExecutions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MetadataClient) ListLocations
func(c*MetadataClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) ListMetadataSchemas
func(c*MetadataClient)ListMetadataSchemas(ctxcontext.Context,req*aiplatformpb.ListMetadataSchemasRequest,opts...gax.CallOption)*MetadataSchemaIteratorListMetadataSchemas lists MetadataSchemas.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListMetadataSchemasRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListMetadataSchemasRequest.}it:=c.ListMetadataSchemas(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.(*aiplatformpb.ListMetadataSchemasResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListMetadataSchemasRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListMetadataSchemasRequest.}forresp,err:=rangec.ListMetadataSchemas(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MetadataClient) ListMetadataStores
func(c*MetadataClient)ListMetadataStores(ctxcontext.Context,req*aiplatformpb.ListMetadataStoresRequest,opts...gax.CallOption)*MetadataStoreIteratorListMetadataStores lists MetadataStores for a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListMetadataStoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListMetadataStoresRequest.}it:=c.ListMetadataStores(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.(*aiplatformpb.ListMetadataStoresResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListMetadataStoresRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListMetadataStoresRequest.}forresp,err:=rangec.ListMetadataStores(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MetadataClient) ListOperations
func(c*MetadataClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(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 (*MetadataClient) PurgeArtifacts
func(c*MetadataClient)PurgeArtifacts(ctxcontext.Context,req*aiplatformpb.PurgeArtifactsRequest,opts...gax.CallOption)(*PurgeArtifactsOperation,error)PurgeArtifacts purges Artifacts.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PurgeArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PurgeArtifactsRequest.}op,err:=c.PurgeArtifacts(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) PurgeArtifactsOperation
func(c*MetadataClient)PurgeArtifactsOperation(namestring)*PurgeArtifactsOperationPurgeArtifactsOperation returns a new PurgeArtifactsOperation from a given name.The name must be that of a previously created PurgeArtifactsOperation, possibly from a different process.
func (*MetadataClient) PurgeContexts
func(c*MetadataClient)PurgeContexts(ctxcontext.Context,req*aiplatformpb.PurgeContextsRequest,opts...gax.CallOption)(*PurgeContextsOperation,error)PurgeContexts purges Contexts.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PurgeContextsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PurgeContextsRequest.}op,err:=c.PurgeContexts(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) PurgeContextsOperation
func(c*MetadataClient)PurgeContextsOperation(namestring)*PurgeContextsOperationPurgeContextsOperation returns a new PurgeContextsOperation from a given name.The name must be that of a previously created PurgeContextsOperation, possibly from a different process.
func (*MetadataClient) PurgeExecutions
func(c*MetadataClient)PurgeExecutions(ctxcontext.Context,req*aiplatformpb.PurgeExecutionsRequest,opts...gax.CallOption)(*PurgeExecutionsOperation,error)PurgeExecutions purges Executions.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PurgeExecutionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PurgeExecutionsRequest.}op,err:=c.PurgeExecutions(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) PurgeExecutionsOperation
func(c*MetadataClient)PurgeExecutionsOperation(namestring)*PurgeExecutionsOperationPurgeExecutionsOperation returns a new PurgeExecutionsOperation from a given name.The name must be that of a previously created PurgeExecutionsOperation, possibly from a different process.
func (*MetadataClient) QueryArtifactLineageSubgraph
func(c*MetadataClient)QueryArtifactLineageSubgraph(ctxcontext.Context,req*aiplatformpb.QueryArtifactLineageSubgraphRequest,opts...gax.CallOption)(*aiplatformpb.LineageSubgraph,error)QueryArtifactLineageSubgraph retrieves lineage of an Artifact represented through Artifacts andExecutions connected by Event edges and returned as a LineageSubgraph.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryArtifactLineageSubgraphRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryArtifactLineageSubgraphRequest.}resp,err:=c.QueryArtifactLineageSubgraph(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) QueryContextLineageSubgraph
func(c*MetadataClient)QueryContextLineageSubgraph(ctxcontext.Context,req*aiplatformpb.QueryContextLineageSubgraphRequest,opts...gax.CallOption)(*aiplatformpb.LineageSubgraph,error)QueryContextLineageSubgraph retrieves Artifacts and Executions within the specified Context, connectedby Event edges and returned as a LineageSubgraph.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryContextLineageSubgraphRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryContextLineageSubgraphRequest.}resp,err:=c.QueryContextLineageSubgraph(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) QueryExecutionInputsAndOutputs
func(c*MetadataClient)QueryExecutionInputsAndOutputs(ctxcontext.Context,req*aiplatformpb.QueryExecutionInputsAndOutputsRequest,opts...gax.CallOption)(*aiplatformpb.LineageSubgraph,error)QueryExecutionInputsAndOutputs obtains the set of input and output Artifacts for this Execution, in theform of LineageSubgraph that also contains the Execution and connectingEvents.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryExecutionInputsAndOutputsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryExecutionInputsAndOutputsRequest.}resp,err:=c.QueryExecutionInputsAndOutputs(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) RemoveContextChildren
func(c*MetadataClient)RemoveContextChildren(ctxcontext.Context,req*aiplatformpb.RemoveContextChildrenRequest,opts...gax.CallOption)(*aiplatformpb.RemoveContextChildrenResponse,error)RemoveContextChildren remove a set of children contexts from a parent Context. If any of thechild Contexts were NOT added to the parent Context, they aresimply skipped.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RemoveContextChildrenRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RemoveContextChildrenRequest.}resp,err:=c.RemoveContextChildren(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) SetIamPolicy
func(c*MetadataClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) TestIamPermissions
func(c*MetadataClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) UpdateArtifact
func(c*MetadataClient)UpdateArtifact(ctxcontext.Context,req*aiplatformpb.UpdateArtifactRequest,opts...gax.CallOption)(*aiplatformpb.Artifact,error)UpdateArtifact updates a stored Artifact.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateArtifactRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateArtifactRequest.}resp,err:=c.UpdateArtifact(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) UpdateContext
func(c*MetadataClient)UpdateContext(ctxcontext.Context,req*aiplatformpb.UpdateContextRequest,opts...gax.CallOption)(*aiplatformpb.Context,error)UpdateContext updates a stored Context.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateContextRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateContextRequest.}resp,err:=c.UpdateContext(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) UpdateExecution
func(c*MetadataClient)UpdateExecution(ctxcontext.Context,req*aiplatformpb.UpdateExecutionRequest,opts...gax.CallOption)(*aiplatformpb.Execution,error)UpdateExecution updates a stored Execution.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateExecutionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateExecutionRequest.}resp,err:=c.UpdateExecution(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MetadataClient) WaitOperation
func(c*MetadataClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMetadataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}MetadataSchemaIterator
typeMetadataSchemaIteratorstruct{// 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[]*aiplatformpb.MetadataSchema,nextPageTokenstring,errerror)// contains filtered or unexported fields}MetadataSchemaIterator manages a stream of *aiplatformpb.MetadataSchema.
func (*MetadataSchemaIterator) All
func(it*MetadataSchemaIterator)All()iter.Seq2[*aiplatformpb.MetadataSchema,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*MetadataSchemaIterator) Next
func(it*MetadataSchemaIterator)Next()(*aiplatformpb.MetadataSchema,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*MetadataSchemaIterator) PageInfo
func(it*MetadataSchemaIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MetadataStoreIterator
typeMetadataStoreIteratorstruct{// 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[]*aiplatformpb.MetadataStore,nextPageTokenstring,errerror)// contains filtered or unexported fields}MetadataStoreIterator manages a stream of *aiplatformpb.MetadataStore.
func (*MetadataStoreIterator) All
func(it*MetadataStoreIterator)All()iter.Seq2[*aiplatformpb.MetadataStore,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*MetadataStoreIterator) Next
func(it*MetadataStoreIterator)Next()(*aiplatformpb.MetadataStore,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*MetadataStoreIterator) PageInfo
func(it*MetadataStoreIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MigratableResourceIterator
typeMigratableResourceIteratorstruct{// 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[]*aiplatformpb.MigratableResource,nextPageTokenstring,errerror)// contains filtered or unexported fields}MigratableResourceIterator manages a stream of *aiplatformpb.MigratableResource.
func (*MigratableResourceIterator) All
func(it*MigratableResourceIterator)All()iter.Seq2[*aiplatformpb.MigratableResource,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*MigratableResourceIterator) Next
func(it*MigratableResourceIterator)Next()(*aiplatformpb.MigratableResource,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*MigratableResourceIterator) PageInfo
func(it*MigratableResourceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MigrationCallOptions
typeMigrationCallOptionsstruct{SearchMigratableResources[]gax.CallOptionBatchMigrateResources[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}MigrationCallOptions contains the retry settings for each method of MigrationClient.
MigrationClient
typeMigrationClientstruct{// The call options for this service.CallOptions*MigrationCallOptions// 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}MigrationClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service that migrates resources from automl.googleapis.com (athttp://automl.googleapis.com),datalabeling.googleapis.com (athttp://datalabeling.googleapis.com) and ml.googleapis.com (athttp://ml.googleapis.com) to Vertex AI.
func NewMigrationClient
funcNewMigrationClient(ctxcontext.Context,opts...option.ClientOption)(*MigrationClient,error)NewMigrationClient creates a new migration service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service that migrates resources from automl.googleapis.com (athttp://automl.googleapis.com),datalabeling.googleapis.com (athttp://datalabeling.googleapis.com) and ml.googleapis.com (athttp://ml.googleapis.com) to Vertex AI.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*MigrationClient) BatchMigrateResources
func(c*MigrationClient)BatchMigrateResources(ctxcontext.Context,req*aiplatformpb.BatchMigrateResourcesRequest,opts...gax.CallOption)(*BatchMigrateResourcesOperation,error)BatchMigrateResources batch migrates resources from ml.googleapis.com (athttp://ml.googleapis.com), automl.googleapis.com (athttp://automl.googleapis.com),and datalabeling.googleapis.com (athttp://datalabeling.googleapis.com) to Vertex AI.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchMigrateResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchMigrateResourcesRequest.}op,err:=c.BatchMigrateResources(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MigrationClient) BatchMigrateResourcesOperation
func(c*MigrationClient)BatchMigrateResourcesOperation(namestring)*BatchMigrateResourcesOperationBatchMigrateResourcesOperation returns a new BatchMigrateResourcesOperation from a given name.The name must be that of a previously created BatchMigrateResourcesOperation, possibly from a different process.
func (*MigrationClient) CancelOperation
func(c*MigrationClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) Close
func(c*MigrationClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*MigrationClient) Connection (deprecated)
func(c*MigrationClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*MigrationClient) DeleteOperation
func(c*MigrationClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) GetIamPolicy
func(c*MigrationClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MigrationClient) GetLocation
func(c*MigrationClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) GetOperation
func(c*MigrationClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) ListLocations
func(c*MigrationClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) ListOperations
func(c*MigrationClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(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 (*MigrationClient) SearchMigratableResources
func(c*MigrationClient)SearchMigratableResources(ctxcontext.Context,req*aiplatformpb.SearchMigratableResourcesRequest,opts...gax.CallOption)*MigratableResourceIteratorSearchMigratableResources searches all of the resources in automl.googleapis.com (athttp://automl.googleapis.com),datalabeling.googleapis.com (athttp://datalabeling.googleapis.com) and ml.googleapis.com (athttp://ml.googleapis.com) that can be migrated toVertex AI’s given location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchMigratableResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchMigratableResourcesRequest.}it:=c.SearchMigratableResources(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.(*aiplatformpb.SearchMigratableResourcesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SearchMigratableResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SearchMigratableResourcesRequest.}forresp,err:=rangec.SearchMigratableResources(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*MigrationClient) SetIamPolicy
func(c*MigrationClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MigrationClient) TestIamPermissions
func(c*MigrationClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*MigrationClient) WaitOperation
func(c*MigrationClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewMigrationClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ModelCallOptions
typeModelCallOptionsstruct{UploadModel[]gax.CallOptionGetModel[]gax.CallOptionListModels[]gax.CallOptionListModelVersions[]gax.CallOptionListModelVersionCheckpoints[]gax.CallOptionUpdateModel[]gax.CallOptionUpdateExplanationDataset[]gax.CallOptionDeleteModel[]gax.CallOptionDeleteModelVersion[]gax.CallOptionMergeVersionAliases[]gax.CallOptionExportModel[]gax.CallOptionCopyModel[]gax.CallOptionImportModelEvaluation[]gax.CallOptionBatchImportModelEvaluationSlices[]gax.CallOptionBatchImportEvaluatedAnnotations[]gax.CallOptionGetModelEvaluation[]gax.CallOptionListModelEvaluations[]gax.CallOptionGetModelEvaluationSlice[]gax.CallOptionListModelEvaluationSlices[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}ModelCallOptions contains the retry settings for each method of ModelClient.
ModelClient
typeModelClientstruct{// The call options for this service.CallOptions*ModelCallOptions// 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}ModelClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s machine learning Models.
func NewModelClient
funcNewModelClient(ctxcontext.Context,opts...option.ClientOption)(*ModelClient,error)NewModelClient creates a new model service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s machine learning Models.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ModelClient) BatchImportEvaluatedAnnotations
func(c*ModelClient)BatchImportEvaluatedAnnotations(ctxcontext.Context,req*aiplatformpb.BatchImportEvaluatedAnnotationsRequest,opts...gax.CallOption)(*aiplatformpb.BatchImportEvaluatedAnnotationsResponse,error)BatchImportEvaluatedAnnotations imports a list of externally generated EvaluatedAnnotations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchImportEvaluatedAnnotationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchImportEvaluatedAnnotationsRequest.}resp,err:=c.BatchImportEvaluatedAnnotations(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) BatchImportModelEvaluationSlices
func(c*ModelClient)BatchImportModelEvaluationSlices(ctxcontext.Context,req*aiplatformpb.BatchImportModelEvaluationSlicesRequest,opts...gax.CallOption)(*aiplatformpb.BatchImportModelEvaluationSlicesResponse,error)BatchImportModelEvaluationSlices imports a list of externally generated ModelEvaluationSlice.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchImportModelEvaluationSlicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchImportModelEvaluationSlicesRequest.}resp,err:=c.BatchImportModelEvaluationSlices(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) CancelOperation
func(c*ModelClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) Close
func(c*ModelClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ModelClient) Connection (deprecated)
func(c*ModelClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*ModelClient) CopyModel
func(c*ModelClient)CopyModel(ctxcontext.Context,req*aiplatformpb.CopyModelRequest,opts...gax.CallOption)(*CopyModelOperation,error)CopyModel copies an already existing Vertex AI Model into the specified Location.The source Model must exist in the same Project.When copying custom Models, the users themselves are responsible forModel.metadata content to beregion-agnostic, as well as making sure that any resources (e.g. files) itdepends on remain accessible.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CopyModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CopyModelRequest.}op,err:=c.CopyModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) CopyModelOperation
func(c*ModelClient)CopyModelOperation(namestring)*CopyModelOperationCopyModelOperation returns a new CopyModelOperation from a given name.The name must be that of a previously created CopyModelOperation, possibly from a different process.
func (*ModelClient) DeleteModel
func(c*ModelClient)DeleteModel(ctxcontext.Context,req*aiplatformpb.DeleteModelRequest,opts...gax.CallOption)(*DeleteModelOperation,error)DeleteModel deletes a Model.
A model cannot be deleted if anyEndpoint resource has aDeployedModel based on themodel in itsdeployed_modelsfield.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteModelRequest.}op,err:=c.DeleteModel(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*ModelClient) DeleteModelOperation
func(c*ModelClient)DeleteModelOperation(namestring)*DeleteModelOperationDeleteModelOperation returns a new DeleteModelOperation from a given name.The name must be that of a previously created DeleteModelOperation, possibly from a different process.
func (*ModelClient) DeleteModelVersion
func(c*ModelClient)DeleteModelVersion(ctxcontext.Context,req*aiplatformpb.DeleteModelVersionRequest,opts...gax.CallOption)(*DeleteModelVersionOperation,error)DeleteModelVersion deletes a Model version.
Model version can only be deleted if there are noDeployedModels created from it.Deleting the only version in the Model is not allowed. UseDeleteModel fordeleting the Model instead.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteModelVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteModelVersionRequest.}op,err:=c.DeleteModelVersion(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*ModelClient) DeleteModelVersionOperation
func(c*ModelClient)DeleteModelVersionOperation(namestring)*DeleteModelVersionOperationDeleteModelVersionOperation returns a new DeleteModelVersionOperation from a given name.The name must be that of a previously created DeleteModelVersionOperation, possibly from a different process.
func (*ModelClient) DeleteOperation
func(c*ModelClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) ExportModel
func(c*ModelClient)ExportModel(ctxcontext.Context,req*aiplatformpb.ExportModelRequest,opts...gax.CallOption)(*ExportModelOperation,error)ExportModel exports a trained, exportable Model to a location specified by theuser. A Model is considered to be exportable if it has at least one[supported exportformat][google.cloud.aiplatform.v1.Model.supported_export_formats].
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExportModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExportModelRequest.}op,err:=c.ExportModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) ExportModelOperation
func(c*ModelClient)ExportModelOperation(namestring)*ExportModelOperationExportModelOperation returns a new ExportModelOperation from a given name.The name must be that of a previously created ExportModelOperation, possibly from a different process.
func (*ModelClient) GetIamPolicy
func(c*ModelClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) GetLocation
func(c*ModelClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) GetModel
func(c*ModelClient)GetModel(ctxcontext.Context,req*aiplatformpb.GetModelRequest,opts...gax.CallOption)(*aiplatformpb.Model,error)GetModel gets a Model.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetModelRequest.}resp,err:=c.GetModel(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) GetModelEvaluation
func(c*ModelClient)GetModelEvaluation(ctxcontext.Context,req*aiplatformpb.GetModelEvaluationRequest,opts...gax.CallOption)(*aiplatformpb.ModelEvaluation,error)GetModelEvaluation gets a ModelEvaluation.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetModelEvaluationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetModelEvaluationRequest.}resp,err:=c.GetModelEvaluation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) GetModelEvaluationSlice
func(c*ModelClient)GetModelEvaluationSlice(ctxcontext.Context,req*aiplatformpb.GetModelEvaluationSliceRequest,opts...gax.CallOption)(*aiplatformpb.ModelEvaluationSlice,error)GetModelEvaluationSlice gets a ModelEvaluationSlice.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetModelEvaluationSliceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetModelEvaluationSliceRequest.}resp,err:=c.GetModelEvaluationSlice(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) GetOperation
func(c*ModelClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) ImportModelEvaluation
func(c*ModelClient)ImportModelEvaluation(ctxcontext.Context,req*aiplatformpb.ImportModelEvaluationRequest,opts...gax.CallOption)(*aiplatformpb.ModelEvaluation,error)ImportModelEvaluation imports an externally generated ModelEvaluation.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ImportModelEvaluationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ImportModelEvaluationRequest.}resp,err:=c.ImportModelEvaluation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) ListLocations
func(c*ModelClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) ListModelEvaluationSlices
func(c*ModelClient)ListModelEvaluationSlices(ctxcontext.Context,req*aiplatformpb.ListModelEvaluationSlicesRequest,opts...gax.CallOption)*ModelEvaluationSliceIteratorListModelEvaluationSlices lists ModelEvaluationSlices in a ModelEvaluation.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelEvaluationSlicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelEvaluationSlicesRequest.}it:=c.ListModelEvaluationSlices(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.(*aiplatformpb.ListModelEvaluationSlicesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelEvaluationSlicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelEvaluationSlicesRequest.}forresp,err:=rangec.ListModelEvaluationSlices(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ModelClient) ListModelEvaluations
func(c*ModelClient)ListModelEvaluations(ctxcontext.Context,req*aiplatformpb.ListModelEvaluationsRequest,opts...gax.CallOption)*ModelEvaluationIteratorListModelEvaluations lists ModelEvaluations in a Model.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelEvaluationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelEvaluationsRequest.}it:=c.ListModelEvaluations(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.(*aiplatformpb.ListModelEvaluationsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelEvaluationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelEvaluationsRequest.}forresp,err:=rangec.ListModelEvaluations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ModelClient) ListModelVersionCheckpoints
func(c*ModelClient)ListModelVersionCheckpoints(ctxcontext.Context,req*aiplatformpb.ListModelVersionCheckpointsRequest,opts...gax.CallOption)*ModelVersionCheckpointIteratorListModelVersionCheckpoints lists checkpoints of the specified model version.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelVersionCheckpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelVersionCheckpointsRequest.}it:=c.ListModelVersionCheckpoints(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.(*aiplatformpb.ListModelVersionCheckpointsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelVersionCheckpointsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelVersionCheckpointsRequest.}forresp,err:=rangec.ListModelVersionCheckpoints(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ModelClient) ListModelVersions
func(c*ModelClient)ListModelVersions(ctxcontext.Context,req*aiplatformpb.ListModelVersionsRequest,opts...gax.CallOption)*ModelIteratorListModelVersions lists versions of the specified model.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelVersionsRequest.}it:=c.ListModelVersions(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.(*aiplatformpb.ListModelVersionsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelVersionsRequest.}forresp,err:=rangec.ListModelVersions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ModelClient) ListModels
func(c*ModelClient)ListModels(ctxcontext.Context,req*aiplatformpb.ListModelsRequest,opts...gax.CallOption)*ModelIteratorListModels lists Models in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelsRequest.}it:=c.ListModels(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.(*aiplatformpb.ListModelsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListModelsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListModelsRequest.}forresp,err:=rangec.ListModels(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ModelClient) ListOperations
func(c*ModelClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(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 (*ModelClient) MergeVersionAliases
func(c*ModelClient)MergeVersionAliases(ctxcontext.Context,req*aiplatformpb.MergeVersionAliasesRequest,opts...gax.CallOption)(*aiplatformpb.Model,error)MergeVersionAliases merges a set of aliases for a Model version.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.MergeVersionAliasesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#MergeVersionAliasesRequest.}resp,err:=c.MergeVersionAliases(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) SetIamPolicy
func(c*ModelClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) TestIamPermissions
func(c*ModelClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) UpdateExplanationDataset
func(c*ModelClient)UpdateExplanationDataset(ctxcontext.Context,req*aiplatformpb.UpdateExplanationDatasetRequest,opts...gax.CallOption)(*UpdateExplanationDatasetOperation,error)UpdateExplanationDataset incrementally update the dataset used for an examples model.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateExplanationDatasetRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateExplanationDatasetRequest.}op,err:=c.UpdateExplanationDataset(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) UpdateExplanationDatasetOperation
func(c*ModelClient)UpdateExplanationDatasetOperation(namestring)*UpdateExplanationDatasetOperationUpdateExplanationDatasetOperation returns a new UpdateExplanationDatasetOperation from a given name.The name must be that of a previously created UpdateExplanationDatasetOperation, possibly from a different process.
func (*ModelClient) UpdateModel
func(c*ModelClient)UpdateModel(ctxcontext.Context,req*aiplatformpb.UpdateModelRequest,opts...gax.CallOption)(*aiplatformpb.Model,error)UpdateModel updates a Model.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateModelRequest.}resp,err:=c.UpdateModel(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) UploadModel
func(c*ModelClient)UploadModel(ctxcontext.Context,req*aiplatformpb.UploadModelRequest,opts...gax.CallOption)(*UploadModelOperation,error)UploadModel uploads a Model artifact into Vertex AI.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UploadModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UploadModelRequest.}op,err:=c.UploadModel(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelClient) UploadModelOperation
func(c*ModelClient)UploadModelOperation(namestring)*UploadModelOperationUploadModelOperation returns a new UploadModelOperation from a given name.The name must be that of a previously created UploadModelOperation, possibly from a different process.
func (*ModelClient) WaitOperation
func(c*ModelClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ModelDeploymentMonitoringJobIterator
typeModelDeploymentMonitoringJobIteratorstruct{// 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[]*aiplatformpb.ModelDeploymentMonitoringJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelDeploymentMonitoringJobIterator manages a stream of *aiplatformpb.ModelDeploymentMonitoringJob.
func (*ModelDeploymentMonitoringJobIterator) All
func(it*ModelDeploymentMonitoringJobIterator)All()iter.Seq2[*aiplatformpb.ModelDeploymentMonitoringJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelDeploymentMonitoringJobIterator) Next
func(it*ModelDeploymentMonitoringJobIterator)Next()(*aiplatformpb.ModelDeploymentMonitoringJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelDeploymentMonitoringJobIterator) PageInfo
func(it*ModelDeploymentMonitoringJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ModelEvaluationIterator
typeModelEvaluationIteratorstruct{// 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[]*aiplatformpb.ModelEvaluation,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelEvaluationIterator manages a stream of *aiplatformpb.ModelEvaluation.
func (*ModelEvaluationIterator) All
func(it*ModelEvaluationIterator)All()iter.Seq2[*aiplatformpb.ModelEvaluation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelEvaluationIterator) Next
func(it*ModelEvaluationIterator)Next()(*aiplatformpb.ModelEvaluation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelEvaluationIterator) PageInfo
func(it*ModelEvaluationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ModelEvaluationSliceIterator
typeModelEvaluationSliceIteratorstruct{// 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[]*aiplatformpb.ModelEvaluationSlice,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelEvaluationSliceIterator manages a stream of *aiplatformpb.ModelEvaluationSlice.
func (*ModelEvaluationSliceIterator) All
func(it*ModelEvaluationSliceIterator)All()iter.Seq2[*aiplatformpb.ModelEvaluationSlice,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelEvaluationSliceIterator) Next
func(it*ModelEvaluationSliceIterator)Next()(*aiplatformpb.ModelEvaluationSlice,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelEvaluationSliceIterator) PageInfo
func(it*ModelEvaluationSliceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ModelGardenCallOptions
typeModelGardenCallOptionsstruct{GetPublisherModel[]gax.CallOptionDeploy[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}ModelGardenCallOptions contains the retry settings for each method of ModelGardenClient.
ModelGardenClient
typeModelGardenClientstruct{// The call options for this service.CallOptions*ModelGardenCallOptions// 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}ModelGardenClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The interface of Model Garden Service.
func NewModelGardenClient
funcNewModelGardenClient(ctxcontext.Context,opts...option.ClientOption)(*ModelGardenClient,error)NewModelGardenClient creates a new model garden service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The interface of Model Garden Service.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ModelGardenClient) CancelOperation
func(c*ModelGardenClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) Close
func(c*ModelGardenClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ModelGardenClient) Connection (deprecated)
func(c*ModelGardenClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*ModelGardenClient) DeleteOperation
func(c*ModelGardenClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) Deploy
func(c*ModelGardenClient)Deploy(ctxcontext.Context,req*aiplatformpb.DeployRequest,opts...gax.CallOption)(*DeployOperation,error)Deploy deploys a model to a new endpoint.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeployRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeployRequest.}op,err:=c.Deploy(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelGardenClient) DeployOperation
func(c*ModelGardenClient)DeployOperation(namestring)*DeployOperationDeployOperation returns a new DeployOperation from a given name.The name must be that of a previously created DeployOperation, possibly from a different process.
func (*ModelGardenClient) GetIamPolicy
func(c*ModelGardenClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelGardenClient) GetLocation
func(c*ModelGardenClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) GetOperation
func(c*ModelGardenClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) GetPublisherModel
func(c*ModelGardenClient)GetPublisherModel(ctxcontext.Context,req*aiplatformpb.GetPublisherModelRequest,opts...gax.CallOption)(*aiplatformpb.PublisherModel,error)GetPublisherModel gets a Model Garden publisher model.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetPublisherModelRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetPublisherModelRequest.}resp,err:=c.GetPublisherModel(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelGardenClient) ListLocations
func(c*ModelGardenClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) ListOperations
func(c*ModelGardenClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(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 (*ModelGardenClient) SetIamPolicy
func(c*ModelGardenClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelGardenClient) TestIamPermissions
func(c*ModelGardenClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ModelGardenClient) WaitOperation
func(c*ModelGardenClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewModelGardenClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ModelIterator
typeModelIteratorstruct{// 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[]*aiplatformpb.Model,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelIterator manages a stream of *aiplatformpb.Model.
func (*ModelIterator) All
func(it*ModelIterator)All()iter.Seq2[*aiplatformpb.Model,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelIterator) Next
func(it*ModelIterator)Next()(*aiplatformpb.Model,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelIterator) PageInfo
func(it*ModelIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ModelMonitoringStatsAnomaliesIterator
typeModelMonitoringStatsAnomaliesIteratorstruct{// 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[]*aiplatformpb.ModelMonitoringStatsAnomalies,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelMonitoringStatsAnomaliesIterator manages a stream of *aiplatformpb.ModelMonitoringStatsAnomalies.
func (*ModelMonitoringStatsAnomaliesIterator) All
func(it*ModelMonitoringStatsAnomaliesIterator)All()iter.Seq2[*aiplatformpb.ModelMonitoringStatsAnomalies,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelMonitoringStatsAnomaliesIterator) Next
func(it*ModelMonitoringStatsAnomaliesIterator)Next()(*aiplatformpb.ModelMonitoringStatsAnomalies,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelMonitoringStatsAnomaliesIterator) PageInfo
func(it*ModelMonitoringStatsAnomaliesIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ModelVersionCheckpointIterator
typeModelVersionCheckpointIteratorstruct{// 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[]*aiplatformpb.ModelVersionCheckpoint,nextPageTokenstring,errerror)// contains filtered or unexported fields}ModelVersionCheckpointIterator manages a stream of *aiplatformpb.ModelVersionCheckpoint.
func (*ModelVersionCheckpointIterator) All
func(it*ModelVersionCheckpointIterator)All()iter.Seq2[*aiplatformpb.ModelVersionCheckpoint,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ModelVersionCheckpointIterator) Next
func(it*ModelVersionCheckpointIterator)Next()(*aiplatformpb.ModelVersionCheckpoint,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ModelVersionCheckpointIterator) PageInfo
func(it*ModelVersionCheckpointIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MutateDeployedIndexOperation
typeMutateDeployedIndexOperationstruct{// contains filtered or unexported fields}MutateDeployedIndexOperation manages a long-running operation from MutateDeployedIndex.
func (*MutateDeployedIndexOperation) Done
func(op*MutateDeployedIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*MutateDeployedIndexOperation) Metadata
func(op*MutateDeployedIndexOperation)Metadata()(*aiplatformpb.MutateDeployedIndexOperationMetadata,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 (*MutateDeployedIndexOperation) Name
func(op*MutateDeployedIndexOperation)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 (*MutateDeployedIndexOperation) Poll
func(op*MutateDeployedIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MutateDeployedIndexResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*MutateDeployedIndexOperation) Wait
func(op*MutateDeployedIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MutateDeployedIndexResponse,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.
MutateDeployedModelOperation
typeMutateDeployedModelOperationstruct{// contains filtered or unexported fields}MutateDeployedModelOperation manages a long-running operation from MutateDeployedModel.
func (*MutateDeployedModelOperation) Done
func(op*MutateDeployedModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*MutateDeployedModelOperation) Metadata
func(op*MutateDeployedModelOperation)Metadata()(*aiplatformpb.MutateDeployedModelOperationMetadata,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 (*MutateDeployedModelOperation) Name
func(op*MutateDeployedModelOperation)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 (*MutateDeployedModelOperation) Poll
func(op*MutateDeployedModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MutateDeployedModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*MutateDeployedModelOperation) Wait
func(op*MutateDeployedModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.MutateDeployedModelResponse,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.
NasJobIterator
typeNasJobIteratorstruct{// 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[]*aiplatformpb.NasJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}NasJobIterator manages a stream of *aiplatformpb.NasJob.
func (*NasJobIterator) All
func(it*NasJobIterator)All()iter.Seq2[*aiplatformpb.NasJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*NasJobIterator) Next
func(it*NasJobIterator)Next()(*aiplatformpb.NasJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*NasJobIterator) PageInfo
func(it*NasJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
NasTrialDetailIterator
typeNasTrialDetailIteratorstruct{// 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[]*aiplatformpb.NasTrialDetail,nextPageTokenstring,errerror)// contains filtered or unexported fields}NasTrialDetailIterator manages a stream of *aiplatformpb.NasTrialDetail.
func (*NasTrialDetailIterator) All
func(it*NasTrialDetailIterator)All()iter.Seq2[*aiplatformpb.NasTrialDetail,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*NasTrialDetailIterator) Next
func(it*NasTrialDetailIterator)Next()(*aiplatformpb.NasTrialDetail,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*NasTrialDetailIterator) PageInfo
func(it*NasTrialDetailIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
NotebookCallOptions
typeNotebookCallOptionsstruct{CreateNotebookRuntimeTemplate[]gax.CallOptionGetNotebookRuntimeTemplate[]gax.CallOptionListNotebookRuntimeTemplates[]gax.CallOptionDeleteNotebookRuntimeTemplate[]gax.CallOptionUpdateNotebookRuntimeTemplate[]gax.CallOptionAssignNotebookRuntime[]gax.CallOptionGetNotebookRuntime[]gax.CallOptionListNotebookRuntimes[]gax.CallOptionDeleteNotebookRuntime[]gax.CallOptionUpgradeNotebookRuntime[]gax.CallOptionStartNotebookRuntime[]gax.CallOptionStopNotebookRuntime[]gax.CallOptionCreateNotebookExecutionJob[]gax.CallOptionGetNotebookExecutionJob[]gax.CallOptionListNotebookExecutionJobs[]gax.CallOptionDeleteNotebookExecutionJob[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}NotebookCallOptions contains the retry settings for each method of NotebookClient.
NotebookClient
typeNotebookClientstruct{// The call options for this service.CallOptions*NotebookCallOptions// 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}NotebookClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
func NewNotebookClient
funcNewNotebookClient(ctxcontext.Context,opts...option.ClientOption)(*NotebookClient,error)NewNotebookClient creates a new notebook service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*NotebookClient) AssignNotebookRuntime
func(c*NotebookClient)AssignNotebookRuntime(ctxcontext.Context,req*aiplatformpb.AssignNotebookRuntimeRequest,opts...gax.CallOption)(*AssignNotebookRuntimeOperation,error)AssignNotebookRuntime assigns a NotebookRuntime to a user for a particular Notebook file. Thismethod will either returns an existing assignment or generates a new one.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AssignNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AssignNotebookRuntimeRequest.}op,err:=c.AssignNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) AssignNotebookRuntimeOperation
func(c*NotebookClient)AssignNotebookRuntimeOperation(namestring)*AssignNotebookRuntimeOperationAssignNotebookRuntimeOperation returns a new AssignNotebookRuntimeOperation from a given name.The name must be that of a previously created AssignNotebookRuntimeOperation, possibly from a different process.
func (*NotebookClient) CancelOperation
func(c*NotebookClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) Close
func(c*NotebookClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*NotebookClient) Connection (deprecated)
func(c*NotebookClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*NotebookClient) CreateNotebookExecutionJob
func(c*NotebookClient)CreateNotebookExecutionJob(ctxcontext.Context,req*aiplatformpb.CreateNotebookExecutionJobRequest,opts...gax.CallOption)(*CreateNotebookExecutionJobOperation,error)CreateNotebookExecutionJob creates a NotebookExecutionJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateNotebookExecutionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateNotebookExecutionJobRequest.}op,err:=c.CreateNotebookExecutionJob(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) CreateNotebookExecutionJobOperation
func(c*NotebookClient)CreateNotebookExecutionJobOperation(namestring)*CreateNotebookExecutionJobOperationCreateNotebookExecutionJobOperation returns a new CreateNotebookExecutionJobOperation from a given name.The name must be that of a previously created CreateNotebookExecutionJobOperation, possibly from a different process.
func (*NotebookClient) CreateNotebookRuntimeTemplate
func(c*NotebookClient)CreateNotebookRuntimeTemplate(ctxcontext.Context,req*aiplatformpb.CreateNotebookRuntimeTemplateRequest,opts...gax.CallOption)(*CreateNotebookRuntimeTemplateOperation,error)CreateNotebookRuntimeTemplate creates a NotebookRuntimeTemplate.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateNotebookRuntimeTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateNotebookRuntimeTemplateRequest.}op,err:=c.CreateNotebookRuntimeTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) CreateNotebookRuntimeTemplateOperation
func(c*NotebookClient)CreateNotebookRuntimeTemplateOperation(namestring)*CreateNotebookRuntimeTemplateOperationCreateNotebookRuntimeTemplateOperation returns a new CreateNotebookRuntimeTemplateOperation from a given name.The name must be that of a previously created CreateNotebookRuntimeTemplateOperation, possibly from a different process.
func (*NotebookClient) DeleteNotebookExecutionJob
func(c*NotebookClient)DeleteNotebookExecutionJob(ctxcontext.Context,req*aiplatformpb.DeleteNotebookExecutionJobRequest,opts...gax.CallOption)(*DeleteNotebookExecutionJobOperation,error)DeleteNotebookExecutionJob deletes a NotebookExecutionJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteNotebookExecutionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteNotebookExecutionJobRequest.}op,err:=c.DeleteNotebookExecutionJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*NotebookClient) DeleteNotebookExecutionJobOperation
func(c*NotebookClient)DeleteNotebookExecutionJobOperation(namestring)*DeleteNotebookExecutionJobOperationDeleteNotebookExecutionJobOperation returns a new DeleteNotebookExecutionJobOperation from a given name.The name must be that of a previously created DeleteNotebookExecutionJobOperation, possibly from a different process.
func (*NotebookClient) DeleteNotebookRuntime
func(c*NotebookClient)DeleteNotebookRuntime(ctxcontext.Context,req*aiplatformpb.DeleteNotebookRuntimeRequest,opts...gax.CallOption)(*DeleteNotebookRuntimeOperation,error)DeleteNotebookRuntime deletes a NotebookRuntime.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteNotebookRuntimeRequest.}op,err:=c.DeleteNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*NotebookClient) DeleteNotebookRuntimeOperation
func(c*NotebookClient)DeleteNotebookRuntimeOperation(namestring)*DeleteNotebookRuntimeOperationDeleteNotebookRuntimeOperation returns a new DeleteNotebookRuntimeOperation from a given name.The name must be that of a previously created DeleteNotebookRuntimeOperation, possibly from a different process.
func (*NotebookClient) DeleteNotebookRuntimeTemplate
func(c*NotebookClient)DeleteNotebookRuntimeTemplate(ctxcontext.Context,req*aiplatformpb.DeleteNotebookRuntimeTemplateRequest,opts...gax.CallOption)(*DeleteNotebookRuntimeTemplateOperation,error)DeleteNotebookRuntimeTemplate deletes a NotebookRuntimeTemplate.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteNotebookRuntimeTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteNotebookRuntimeTemplateRequest.}op,err:=c.DeleteNotebookRuntimeTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*NotebookClient) DeleteNotebookRuntimeTemplateOperation
func(c*NotebookClient)DeleteNotebookRuntimeTemplateOperation(namestring)*DeleteNotebookRuntimeTemplateOperationDeleteNotebookRuntimeTemplateOperation returns a new DeleteNotebookRuntimeTemplateOperation from a given name.The name must be that of a previously created DeleteNotebookRuntimeTemplateOperation, possibly from a different process.
func (*NotebookClient) DeleteOperation
func(c*NotebookClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) GetIamPolicy
func(c*NotebookClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) GetLocation
func(c*NotebookClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) GetNotebookExecutionJob
func(c*NotebookClient)GetNotebookExecutionJob(ctxcontext.Context,req*aiplatformpb.GetNotebookExecutionJobRequest,opts...gax.CallOption)(*aiplatformpb.NotebookExecutionJob,error)GetNotebookExecutionJob gets a NotebookExecutionJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetNotebookExecutionJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetNotebookExecutionJobRequest.}resp,err:=c.GetNotebookExecutionJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) GetNotebookRuntime
func(c*NotebookClient)GetNotebookRuntime(ctxcontext.Context,req*aiplatformpb.GetNotebookRuntimeRequest,opts...gax.CallOption)(*aiplatformpb.NotebookRuntime,error)GetNotebookRuntime gets a NotebookRuntime.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetNotebookRuntimeRequest.}resp,err:=c.GetNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) GetNotebookRuntimeTemplate
func(c*NotebookClient)GetNotebookRuntimeTemplate(ctxcontext.Context,req*aiplatformpb.GetNotebookRuntimeTemplateRequest,opts...gax.CallOption)(*aiplatformpb.NotebookRuntimeTemplate,error)GetNotebookRuntimeTemplate gets a NotebookRuntimeTemplate.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetNotebookRuntimeTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetNotebookRuntimeTemplateRequest.}resp,err:=c.GetNotebookRuntimeTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) GetOperation
func(c*NotebookClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) ListLocations
func(c*NotebookClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) ListNotebookExecutionJobs
func(c*NotebookClient)ListNotebookExecutionJobs(ctxcontext.Context,req*aiplatformpb.ListNotebookExecutionJobsRequest,opts...gax.CallOption)*NotebookExecutionJobIteratorListNotebookExecutionJobs lists NotebookExecutionJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookExecutionJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookExecutionJobsRequest.}it:=c.ListNotebookExecutionJobs(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.(*aiplatformpb.ListNotebookExecutionJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookExecutionJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookExecutionJobsRequest.}forresp,err:=rangec.ListNotebookExecutionJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*NotebookClient) ListNotebookRuntimeTemplates
func(c*NotebookClient)ListNotebookRuntimeTemplates(ctxcontext.Context,req*aiplatformpb.ListNotebookRuntimeTemplatesRequest,opts...gax.CallOption)*NotebookRuntimeTemplateIteratorListNotebookRuntimeTemplates lists NotebookRuntimeTemplates in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookRuntimeTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookRuntimeTemplatesRequest.}it:=c.ListNotebookRuntimeTemplates(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.(*aiplatformpb.ListNotebookRuntimeTemplatesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookRuntimeTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookRuntimeTemplatesRequest.}forresp,err:=rangec.ListNotebookRuntimeTemplates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*NotebookClient) ListNotebookRuntimes
func(c*NotebookClient)ListNotebookRuntimes(ctxcontext.Context,req*aiplatformpb.ListNotebookRuntimesRequest,opts...gax.CallOption)*NotebookRuntimeIteratorListNotebookRuntimes lists NotebookRuntimes in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookRuntimesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookRuntimesRequest.}it:=c.ListNotebookRuntimes(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.(*aiplatformpb.ListNotebookRuntimesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListNotebookRuntimesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListNotebookRuntimesRequest.}forresp,err:=rangec.ListNotebookRuntimes(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*NotebookClient) ListOperations
func(c*NotebookClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(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 (*NotebookClient) SetIamPolicy
func(c*NotebookClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) StartNotebookRuntime
func(c*NotebookClient)StartNotebookRuntime(ctxcontext.Context,req*aiplatformpb.StartNotebookRuntimeRequest,opts...gax.CallOption)(*StartNotebookRuntimeOperation,error)StartNotebookRuntime starts a NotebookRuntime.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.StartNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#StartNotebookRuntimeRequest.}op,err:=c.StartNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) StartNotebookRuntimeOperation
func(c*NotebookClient)StartNotebookRuntimeOperation(namestring)*StartNotebookRuntimeOperationStartNotebookRuntimeOperation returns a new StartNotebookRuntimeOperation from a given name.The name must be that of a previously created StartNotebookRuntimeOperation, possibly from a different process.
func (*NotebookClient) StopNotebookRuntime
func(c*NotebookClient)StopNotebookRuntime(ctxcontext.Context,req*aiplatformpb.StopNotebookRuntimeRequest,opts...gax.CallOption)(*StopNotebookRuntimeOperation,error)StopNotebookRuntime stops a NotebookRuntime.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.StopNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#StopNotebookRuntimeRequest.}op,err:=c.StopNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) StopNotebookRuntimeOperation
func(c*NotebookClient)StopNotebookRuntimeOperation(namestring)*StopNotebookRuntimeOperationStopNotebookRuntimeOperation returns a new StopNotebookRuntimeOperation from a given name.The name must be that of a previously created StopNotebookRuntimeOperation, possibly from a different process.
func (*NotebookClient) TestIamPermissions
func(c*NotebookClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) UpdateNotebookRuntimeTemplate
func(c*NotebookClient)UpdateNotebookRuntimeTemplate(ctxcontext.Context,req*aiplatformpb.UpdateNotebookRuntimeTemplateRequest,opts...gax.CallOption)(*aiplatformpb.NotebookRuntimeTemplate,error)UpdateNotebookRuntimeTemplate updates a NotebookRuntimeTemplate.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateNotebookRuntimeTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateNotebookRuntimeTemplateRequest.}resp,err:=c.UpdateNotebookRuntimeTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) UpgradeNotebookRuntime
func(c*NotebookClient)UpgradeNotebookRuntime(ctxcontext.Context,req*aiplatformpb.UpgradeNotebookRuntimeRequest,opts...gax.CallOption)(*UpgradeNotebookRuntimeOperation,error)UpgradeNotebookRuntime upgrades a NotebookRuntime.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpgradeNotebookRuntimeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpgradeNotebookRuntimeRequest.}op,err:=c.UpgradeNotebookRuntime(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*NotebookClient) UpgradeNotebookRuntimeOperation
func(c*NotebookClient)UpgradeNotebookRuntimeOperation(namestring)*UpgradeNotebookRuntimeOperationUpgradeNotebookRuntimeOperation returns a new UpgradeNotebookRuntimeOperation from a given name.The name must be that of a previously created UpgradeNotebookRuntimeOperation, possibly from a different process.
func (*NotebookClient) WaitOperation
func(c*NotebookClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewNotebookClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}NotebookExecutionJobIterator
typeNotebookExecutionJobIteratorstruct{// 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[]*aiplatformpb.NotebookExecutionJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}NotebookExecutionJobIterator manages a stream of *aiplatformpb.NotebookExecutionJob.
func (*NotebookExecutionJobIterator) All
func(it*NotebookExecutionJobIterator)All()iter.Seq2[*aiplatformpb.NotebookExecutionJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*NotebookExecutionJobIterator) Next
func(it*NotebookExecutionJobIterator)Next()(*aiplatformpb.NotebookExecutionJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*NotebookExecutionJobIterator) PageInfo
func(it*NotebookExecutionJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
NotebookRuntimeIterator
typeNotebookRuntimeIteratorstruct{// 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[]*aiplatformpb.NotebookRuntime,nextPageTokenstring,errerror)// contains filtered or unexported fields}NotebookRuntimeIterator manages a stream of *aiplatformpb.NotebookRuntime.
func (*NotebookRuntimeIterator) All
func(it*NotebookRuntimeIterator)All()iter.Seq2[*aiplatformpb.NotebookRuntime,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*NotebookRuntimeIterator) Next
func(it*NotebookRuntimeIterator)Next()(*aiplatformpb.NotebookRuntime,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*NotebookRuntimeIterator) PageInfo
func(it*NotebookRuntimeIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
NotebookRuntimeTemplateIterator
typeNotebookRuntimeTemplateIteratorstruct{// 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[]*aiplatformpb.NotebookRuntimeTemplate,nextPageTokenstring,errerror)// contains filtered or unexported fields}NotebookRuntimeTemplateIterator manages a stream of *aiplatformpb.NotebookRuntimeTemplate.
func (*NotebookRuntimeTemplateIterator) All
func(it*NotebookRuntimeTemplateIterator)All()iter.Seq2[*aiplatformpb.NotebookRuntimeTemplate,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*NotebookRuntimeTemplateIterator) Next
func(it*NotebookRuntimeTemplateIterator)Next()(*aiplatformpb.NotebookRuntimeTemplate,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*NotebookRuntimeTemplateIterator) PageInfo
func(it*NotebookRuntimeTemplateIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
typeOperationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PersistentResourceCallOptions
typePersistentResourceCallOptionsstruct{CreatePersistentResource[]gax.CallOptionGetPersistentResource[]gax.CallOptionListPersistentResources[]gax.CallOptionDeletePersistentResource[]gax.CallOptionUpdatePersistentResource[]gax.CallOptionRebootPersistentResource[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}PersistentResourceCallOptions contains the retry settings for each method of PersistentResourceClient.
PersistentResourceClient
typePersistentResourceClientstruct{// The call options for this service.CallOptions*PersistentResourceCallOptions// 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}PersistentResourceClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s machine learning PersistentResource.
func NewPersistentResourceClient
funcNewPersistentResourceClient(ctxcontext.Context,opts...option.ClientOption)(*PersistentResourceClient,error)NewPersistentResourceClient creates a new persistent resource service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s machine learning PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*PersistentResourceClient) CancelOperation
func(c*PersistentResourceClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) Close
func(c*PersistentResourceClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*PersistentResourceClient) Connection (deprecated)
func(c*PersistentResourceClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*PersistentResourceClient) CreatePersistentResource
func(c*PersistentResourceClient)CreatePersistentResource(ctxcontext.Context,req*aiplatformpb.CreatePersistentResourceRequest,opts...gax.CallOption)(*CreatePersistentResourceOperation,error)CreatePersistentResource creates a PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreatePersistentResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreatePersistentResourceRequest.}op,err:=c.CreatePersistentResource(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) CreatePersistentResourceOperation
func(c*PersistentResourceClient)CreatePersistentResourceOperation(namestring)*CreatePersistentResourceOperationCreatePersistentResourceOperation returns a new CreatePersistentResourceOperation from a given name.The name must be that of a previously created CreatePersistentResourceOperation, possibly from a different process.
func (*PersistentResourceClient) DeleteOperation
func(c*PersistentResourceClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) DeletePersistentResource
func(c*PersistentResourceClient)DeletePersistentResource(ctxcontext.Context,req*aiplatformpb.DeletePersistentResourceRequest,opts...gax.CallOption)(*DeletePersistentResourceOperation,error)DeletePersistentResource deletes a PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeletePersistentResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeletePersistentResourceRequest.}op,err:=c.DeletePersistentResource(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*PersistentResourceClient) DeletePersistentResourceOperation
func(c*PersistentResourceClient)DeletePersistentResourceOperation(namestring)*DeletePersistentResourceOperationDeletePersistentResourceOperation returns a new DeletePersistentResourceOperation from a given name.The name must be that of a previously created DeletePersistentResourceOperation, possibly from a different process.
func (*PersistentResourceClient) GetIamPolicy
func(c*PersistentResourceClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) GetLocation
func(c*PersistentResourceClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) GetOperation
func(c*PersistentResourceClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) GetPersistentResource
func(c*PersistentResourceClient)GetPersistentResource(ctxcontext.Context,req*aiplatformpb.GetPersistentResourceRequest,opts...gax.CallOption)(*aiplatformpb.PersistentResource,error)GetPersistentResource gets a PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetPersistentResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetPersistentResourceRequest.}resp,err:=c.GetPersistentResource(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) ListLocations
func(c*PersistentResourceClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) ListOperations
func(c*PersistentResourceClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(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 (*PersistentResourceClient) ListPersistentResources
func(c*PersistentResourceClient)ListPersistentResources(ctxcontext.Context,req*aiplatformpb.ListPersistentResourcesRequest,opts...gax.CallOption)*PersistentResourceIteratorListPersistentResources lists PersistentResources in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListPersistentResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListPersistentResourcesRequest.}it:=c.ListPersistentResources(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.(*aiplatformpb.ListPersistentResourcesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListPersistentResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListPersistentResourcesRequest.}forresp,err:=rangec.ListPersistentResources(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*PersistentResourceClient) RebootPersistentResource
func(c*PersistentResourceClient)RebootPersistentResource(ctxcontext.Context,req*aiplatformpb.RebootPersistentResourceRequest,opts...gax.CallOption)(*RebootPersistentResourceOperation,error)RebootPersistentResource reboots a PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RebootPersistentResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RebootPersistentResourceRequest.}op,err:=c.RebootPersistentResource(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) RebootPersistentResourceOperation
func(c*PersistentResourceClient)RebootPersistentResourceOperation(namestring)*RebootPersistentResourceOperationRebootPersistentResourceOperation returns a new RebootPersistentResourceOperation from a given name.The name must be that of a previously created RebootPersistentResourceOperation, possibly from a different process.
func (*PersistentResourceClient) SetIamPolicy
func(c*PersistentResourceClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) TestIamPermissions
func(c*PersistentResourceClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) UpdatePersistentResource
func(c*PersistentResourceClient)UpdatePersistentResource(ctxcontext.Context,req*aiplatformpb.UpdatePersistentResourceRequest,opts...gax.CallOption)(*UpdatePersistentResourceOperation,error)UpdatePersistentResource updates a PersistentResource.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdatePersistentResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdatePersistentResourceRequest.}op,err:=c.UpdatePersistentResource(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PersistentResourceClient) UpdatePersistentResourceOperation
func(c*PersistentResourceClient)UpdatePersistentResourceOperation(namestring)*UpdatePersistentResourceOperationUpdatePersistentResourceOperation returns a new UpdatePersistentResourceOperation from a given name.The name must be that of a previously created UpdatePersistentResourceOperation, possibly from a different process.
func (*PersistentResourceClient) WaitOperation
func(c*PersistentResourceClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPersistentResourceClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}PersistentResourceIterator
typePersistentResourceIteratorstruct{// 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[]*aiplatformpb.PersistentResource,nextPageTokenstring,errerror)// contains filtered or unexported fields}PersistentResourceIterator manages a stream of *aiplatformpb.PersistentResource.
func (*PersistentResourceIterator) All
func(it*PersistentResourceIterator)All()iter.Seq2[*aiplatformpb.PersistentResource,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*PersistentResourceIterator) Next
func(it*PersistentResourceIterator)Next()(*aiplatformpb.PersistentResource,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*PersistentResourceIterator) PageInfo
func(it*PersistentResourceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PipelineCallOptions
typePipelineCallOptionsstruct{CreateTrainingPipeline[]gax.CallOptionGetTrainingPipeline[]gax.CallOptionListTrainingPipelines[]gax.CallOptionDeleteTrainingPipeline[]gax.CallOptionCancelTrainingPipeline[]gax.CallOptionCreatePipelineJob[]gax.CallOptionGetPipelineJob[]gax.CallOptionListPipelineJobs[]gax.CallOptionDeletePipelineJob[]gax.CallOptionBatchDeletePipelineJobs[]gax.CallOptionCancelPipelineJob[]gax.CallOptionBatchCancelPipelineJobs[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}PipelineCallOptions contains the retry settings for each method of PipelineClient.
PipelineClient
typePipelineClientstruct{// The call options for this service.CallOptions*PipelineCallOptions// 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}PipelineClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s pipelines. This includes bothTrainingPipeline resources (used for AutoML and custom training) andPipelineJob resources (used for Vertex AI Pipelines).
func NewPipelineClient
funcNewPipelineClient(ctxcontext.Context,opts...option.ClientOption)(*PipelineClient,error)NewPipelineClient creates a new pipeline service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s pipelines. This includes bothTrainingPipeline resources (used for AutoML and custom training) andPipelineJob resources (used for Vertex AI Pipelines).
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*PipelineClient) BatchCancelPipelineJobs
func(c*PipelineClient)BatchCancelPipelineJobs(ctxcontext.Context,req*aiplatformpb.BatchCancelPipelineJobsRequest,opts...gax.CallOption)(*BatchCancelPipelineJobsOperation,error)BatchCancelPipelineJobs batch cancel PipelineJobs.Firstly the server will check if all the jobs are in non-terminal states,and skip the jobs that are already terminated.If the operation failed, none of the pipeline jobs are cancelled.The server will poll the states of all the pipeline jobs periodicallyto check the cancellation status.This operation will return an LRO.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchCancelPipelineJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchCancelPipelineJobsRequest.}op,err:=c.BatchCancelPipelineJobs(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) BatchCancelPipelineJobsOperation
func(c*PipelineClient)BatchCancelPipelineJobsOperation(namestring)*BatchCancelPipelineJobsOperationBatchCancelPipelineJobsOperation returns a new BatchCancelPipelineJobsOperation from a given name.The name must be that of a previously created BatchCancelPipelineJobsOperation, possibly from a different process.
func (*PipelineClient) BatchDeletePipelineJobs
func(c*PipelineClient)BatchDeletePipelineJobs(ctxcontext.Context,req*aiplatformpb.BatchDeletePipelineJobsRequest,opts...gax.CallOption)(*BatchDeletePipelineJobsOperation,error)BatchDeletePipelineJobs batch deletes PipelineJobsThe Operation is atomic. If it fails, none of the PipelineJobs are deleted.If it succeeds, all of the PipelineJobs are deleted.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchDeletePipelineJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchDeletePipelineJobsRequest.}op,err:=c.BatchDeletePipelineJobs(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) BatchDeletePipelineJobsOperation
func(c*PipelineClient)BatchDeletePipelineJobsOperation(namestring)*BatchDeletePipelineJobsOperationBatchDeletePipelineJobsOperation returns a new BatchDeletePipelineJobsOperation from a given name.The name must be that of a previously created BatchDeletePipelineJobsOperation, possibly from a different process.
func (*PipelineClient) CancelOperation
func(c*PipelineClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) CancelPipelineJob
func(c*PipelineClient)CancelPipelineJob(ctxcontext.Context,req*aiplatformpb.CancelPipelineJobRequest,opts...gax.CallOption)errorCancelPipelineJob cancels a PipelineJob.Starts asynchronous cancellation on the PipelineJob. The servermakes a best effort to cancel the pipeline, but success is notguaranteed. Clients can usePipelineService.GetPipelineJobor other methods to check whether the cancellation succeeded or whether thepipeline completed despite cancellation. On successful cancellation,the PipelineJob is not deleted; instead it becomes a pipeline witha PipelineJob.error valuewith a google.rpc.Status.code of 1, correspondingto Code.CANCELLED, andPipelineJob.state is set toCANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelPipelineJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelPipelineJobRequest.}err=c.CancelPipelineJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*PipelineClient) CancelTrainingPipeline
func(c*PipelineClient)CancelTrainingPipeline(ctxcontext.Context,req*aiplatformpb.CancelTrainingPipelineRequest,opts...gax.CallOption)errorCancelTrainingPipeline cancels a TrainingPipeline.Starts asynchronous cancellation on the TrainingPipeline. The servermakes a best effort to cancel the pipeline, but success is notguaranteed. Clients can usePipelineService.GetTrainingPipelineor other methods to check whether the cancellation succeeded or whether thepipeline completed despite cancellation. On successful cancellation,the TrainingPipeline is not deleted; instead it becomes a pipeline withaTrainingPipeline.errorvalue with a google.rpc.Status.code of 1,corresponding to Code.CANCELLED, andTrainingPipeline.stateis set to CANCELLED.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CancelTrainingPipelineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelTrainingPipelineRequest.}err=c.CancelTrainingPipeline(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*PipelineClient) Close
func(c*PipelineClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*PipelineClient) Connection (deprecated)
func(c*PipelineClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*PipelineClient) CreatePipelineJob
func(c*PipelineClient)CreatePipelineJob(ctxcontext.Context,req*aiplatformpb.CreatePipelineJobRequest,opts...gax.CallOption)(*aiplatformpb.PipelineJob,error)CreatePipelineJob creates a PipelineJob. A PipelineJob will run immediately when created.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreatePipelineJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreatePipelineJobRequest.}resp,err:=c.CreatePipelineJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) CreateTrainingPipeline
func(c*PipelineClient)CreateTrainingPipeline(ctxcontext.Context,req*aiplatformpb.CreateTrainingPipelineRequest,opts...gax.CallOption)(*aiplatformpb.TrainingPipeline,error)CreateTrainingPipeline creates a TrainingPipeline. A created TrainingPipeline right away will beattempted to be run.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTrainingPipelineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTrainingPipelineRequest.}resp,err:=c.CreateTrainingPipeline(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) DeleteOperation
func(c*PipelineClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) DeletePipelineJob
func(c*PipelineClient)DeletePipelineJob(ctxcontext.Context,req*aiplatformpb.DeletePipelineJobRequest,opts...gax.CallOption)(*DeletePipelineJobOperation,error)DeletePipelineJob deletes a PipelineJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeletePipelineJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeletePipelineJobRequest.}op,err:=c.DeletePipelineJob(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*PipelineClient) DeletePipelineJobOperation
func(c*PipelineClient)DeletePipelineJobOperation(namestring)*DeletePipelineJobOperationDeletePipelineJobOperation returns a new DeletePipelineJobOperation from a given name.The name must be that of a previously created DeletePipelineJobOperation, possibly from a different process.
func (*PipelineClient) DeleteTrainingPipeline
func(c*PipelineClient)DeleteTrainingPipeline(ctxcontext.Context,req*aiplatformpb.DeleteTrainingPipelineRequest,opts...gax.CallOption)(*DeleteTrainingPipelineOperation,error)DeleteTrainingPipeline deletes a TrainingPipeline.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTrainingPipelineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTrainingPipelineRequest.}op,err:=c.DeleteTrainingPipeline(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*PipelineClient) DeleteTrainingPipelineOperation
func(c*PipelineClient)DeleteTrainingPipelineOperation(namestring)*DeleteTrainingPipelineOperationDeleteTrainingPipelineOperation returns a new DeleteTrainingPipelineOperation from a given name.The name must be that of a previously created DeleteTrainingPipelineOperation, possibly from a different process.
func (*PipelineClient) GetIamPolicy
func(c*PipelineClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) GetLocation
func(c*PipelineClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) GetOperation
func(c*PipelineClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) GetPipelineJob
func(c*PipelineClient)GetPipelineJob(ctxcontext.Context,req*aiplatformpb.GetPipelineJobRequest,opts...gax.CallOption)(*aiplatformpb.PipelineJob,error)GetPipelineJob gets a PipelineJob.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetPipelineJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetPipelineJobRequest.}resp,err:=c.GetPipelineJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) GetTrainingPipeline
func(c*PipelineClient)GetTrainingPipeline(ctxcontext.Context,req*aiplatformpb.GetTrainingPipelineRequest,opts...gax.CallOption)(*aiplatformpb.TrainingPipeline,error)GetTrainingPipeline gets a TrainingPipeline.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTrainingPipelineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTrainingPipelineRequest.}resp,err:=c.GetTrainingPipeline(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) ListLocations
func(c*PipelineClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) ListOperations
func(c*PipelineClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(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 (*PipelineClient) ListPipelineJobs
func(c*PipelineClient)ListPipelineJobs(ctxcontext.Context,req*aiplatformpb.ListPipelineJobsRequest,opts...gax.CallOption)*PipelineJobIteratorListPipelineJobs lists PipelineJobs in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListPipelineJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListPipelineJobsRequest.}it:=c.ListPipelineJobs(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.(*aiplatformpb.ListPipelineJobsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListPipelineJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListPipelineJobsRequest.}forresp,err:=rangec.ListPipelineJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*PipelineClient) ListTrainingPipelines
func(c*PipelineClient)ListTrainingPipelines(ctxcontext.Context,req*aiplatformpb.ListTrainingPipelinesRequest,opts...gax.CallOption)*TrainingPipelineIteratorListTrainingPipelines lists TrainingPipelines in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTrainingPipelinesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTrainingPipelinesRequest.}it:=c.ListTrainingPipelines(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.(*aiplatformpb.ListTrainingPipelinesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTrainingPipelinesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTrainingPipelinesRequest.}forresp,err:=rangec.ListTrainingPipelines(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*PipelineClient) SetIamPolicy
func(c*PipelineClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) TestIamPermissions
func(c*PipelineClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PipelineClient) WaitOperation
func(c*PipelineClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPipelineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}PipelineJobIterator
typePipelineJobIteratorstruct{// 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[]*aiplatformpb.PipelineJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}PipelineJobIterator manages a stream of *aiplatformpb.PipelineJob.
func (*PipelineJobIterator) All
func(it*PipelineJobIterator)All()iter.Seq2[*aiplatformpb.PipelineJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*PipelineJobIterator) Next
func(it*PipelineJobIterator)Next()(*aiplatformpb.PipelineJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*PipelineJobIterator) PageInfo
func(it*PipelineJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PredictionCallOptions
typePredictionCallOptionsstruct{Predict[]gax.CallOptionRawPredict[]gax.CallOptionStreamRawPredict[]gax.CallOptionDirectPredict[]gax.CallOptionDirectRawPredict[]gax.CallOptionStreamDirectPredict[]gax.CallOptionStreamDirectRawPredict[]gax.CallOptionStreamingPredict[]gax.CallOptionServerStreamingPredict[]gax.CallOptionStreamingRawPredict[]gax.CallOptionExplain[]gax.CallOptionGenerateContent[]gax.CallOptionStreamGenerateContent[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}PredictionCallOptions contains the retry settings for each method of PredictionClient.
PredictionClient
typePredictionClientstruct{// The call options for this service.CallOptions*PredictionCallOptions// contains filtered or unexported fields}PredictionClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for online predictions and explanations.
func NewPredictionClient
funcNewPredictionClient(ctxcontext.Context,opts...option.ClientOption)(*PredictionClient,error)NewPredictionClient creates a new prediction service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for online predictions and explanations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*PredictionClient) CancelOperation
func(c*PredictionClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) Close
func(c*PredictionClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*PredictionClient) Connection (deprecated)
func(c*PredictionClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*PredictionClient) DeleteOperation
func(c*PredictionClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) DirectPredict
func(c*PredictionClient)DirectPredict(ctxcontext.Context,req*aiplatformpb.DirectPredictRequest,opts...gax.CallOption)(*aiplatformpb.DirectPredictResponse,error)DirectPredict perform an unary online prediction request to a gRPC model server forVertex first-party products and frameworks.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DirectPredictRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DirectPredictRequest.}resp,err:=c.DirectPredict(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) DirectRawPredict
func(c*PredictionClient)DirectRawPredict(ctxcontext.Context,req*aiplatformpb.DirectRawPredictRequest,opts...gax.CallOption)(*aiplatformpb.DirectRawPredictResponse,error)DirectRawPredict perform an unary online prediction request to a gRPC model server forcustom containers.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DirectRawPredictRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DirectRawPredictRequest.}resp,err:=c.DirectRawPredict(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) Explain
func(c*PredictionClient)Explain(ctxcontext.Context,req*aiplatformpb.ExplainRequest,opts...gax.CallOption)(*aiplatformpb.ExplainResponse,error)Explain perform an online explanation.
Ifdeployed_model_idis specified, the corresponding DeployModel must haveexplanation_specpopulated. Ifdeployed_model_idis not specified, all DeployedModels must haveexplanation_specpopulated.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExplainRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExplainRequest.}resp,err:=c.Explain(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) GenerateContent
func(c*PredictionClient)GenerateContent(ctxcontext.Context,req*aiplatformpb.GenerateContentRequest,opts...gax.CallOption)(*aiplatformpb.GenerateContentResponse,error)GenerateContent generate content with multimodal inputs.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GenerateContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GenerateContentRequest.}resp,err:=c.GenerateContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) GetIamPolicy
func(c*PredictionClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) GetLocation
func(c*PredictionClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) GetOperation
func(c*PredictionClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) ListLocations
func(c*PredictionClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) ListOperations
func(c*PredictionClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(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 (*PredictionClient) Predict
func(c*PredictionClient)Predict(ctxcontext.Context,req*aiplatformpb.PredictRequest,opts...gax.CallOption)(*aiplatformpb.PredictResponse,error)Predict perform an online prediction.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PredictRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PredictRequest.}resp,err:=c.Predict(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) RawPredict
func(c*PredictionClient)RawPredict(ctxcontext.Context,req*aiplatformpb.RawPredictRequest,opts...gax.CallOption)(*httpbodypb.HttpBody,error)RawPredict perform an online prediction with an arbitrary HTTP payload.
The response includes the following HTTP headers:
X-Vertex-AI-Endpoint-Id: ID of theEndpoint that served thisprediction.X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’sDeployedModel that served thisprediction.Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RawPredictRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RawPredictRequest.}resp,err:=c.RawPredict(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) ServerStreamingPredict
func(c*PredictionClient)ServerStreamingPredict(ctxcontext.Context,req*aiplatformpb.StreamingPredictRequest,opts...gax.CallOption)(aiplatformpb.PredictionService_ServerStreamingPredictClient,error)ServerStreamingPredict perform a server-side streaming online prediction request for VertexLLM streaming.
func (*PredictionClient) SetIamPolicy
func(c*PredictionClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) StreamDirectPredict
func(c*PredictionClient)StreamDirectPredict(ctxcontext.Context,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamDirectPredictClient,error)StreamDirectPredict perform a streaming online prediction request to a gRPC model server forVertex first-party products and frameworks.
Example
packagemainimport("context""io"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.StreamDirectPredict(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*aiplatformpb.StreamDirectPredictRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*PredictionClient) StreamDirectRawPredict
func(c*PredictionClient)StreamDirectRawPredict(ctxcontext.Context,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamDirectRawPredictClient,error)StreamDirectRawPredict perform a streaming online prediction request to a gRPC model server forcustom containers.
Example
packagemainimport("context""io"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.StreamDirectRawPredict(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*aiplatformpb.StreamDirectRawPredictRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*PredictionClient) StreamGenerateContent
func(c*PredictionClient)StreamGenerateContent(ctxcontext.Context,req*aiplatformpb.GenerateContentRequest,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamGenerateContentClient,error)StreamGenerateContent generate content with multimodal inputs with streaming support.
func (*PredictionClient) StreamRawPredict
func(c*PredictionClient)StreamRawPredict(ctxcontext.Context,req*aiplatformpb.StreamRawPredictRequest,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamRawPredictClient,error)StreamRawPredict perform a streaming online prediction with an arbitrary HTTP payload.
func (*PredictionClient) StreamingPredict
func(c*PredictionClient)StreamingPredict(ctxcontext.Context,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamingPredictClient,error)StreamingPredict perform a streaming online prediction request for Vertex first-partyproducts and frameworks.
Example
packagemainimport("context""io"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.StreamingPredict(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*aiplatformpb.StreamingPredictRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*PredictionClient) StreamingRawPredict
func(c*PredictionClient)StreamingRawPredict(ctxcontext.Context,opts...gax.CallOption)(aiplatformpb.PredictionService_StreamingRawPredictClient,error)StreamingRawPredict perform a streaming online prediction request through gRPC.
Example
packagemainimport("context""io"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()stream,err:=c.StreamingRawPredict(ctx)iferr!=nil{// TODO: Handle error.}gofunc(){reqs:=[]*aiplatformpb.StreamingRawPredictRequest{// TODO: Create requests.}for_,req:=rangereqs{iferr:=stream.Send(req);err!=nil{// TODO: Handle error.}}stream.CloseSend()}()for{resp,err:=stream.Recv()iferr==io.EOF{break}iferr!=nil{// TODO: handle error.}// TODO: Use resp._=resp}}func (*PredictionClient) TestIamPermissions
func(c*PredictionClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*PredictionClient) WaitOperation
func(c*PredictionClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewPredictionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}PurgeArtifactsOperation
typePurgeArtifactsOperationstruct{// contains filtered or unexported fields}PurgeArtifactsOperation manages a long-running operation from PurgeArtifacts.
func (*PurgeArtifactsOperation) Done
func(op*PurgeArtifactsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*PurgeArtifactsOperation) Metadata
func(op*PurgeArtifactsOperation)Metadata()(*aiplatformpb.PurgeArtifactsMetadata,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 (*PurgeArtifactsOperation) Name
func(op*PurgeArtifactsOperation)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 (*PurgeArtifactsOperation) Poll
func(op*PurgeArtifactsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeArtifactsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*PurgeArtifactsOperation) Wait
func(op*PurgeArtifactsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeArtifactsResponse,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.
PurgeContextsOperation
typePurgeContextsOperationstruct{// contains filtered or unexported fields}PurgeContextsOperation manages a long-running operation from PurgeContexts.
func (*PurgeContextsOperation) Done
func(op*PurgeContextsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*PurgeContextsOperation) Metadata
func(op*PurgeContextsOperation)Metadata()(*aiplatformpb.PurgeContextsMetadata,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 (*PurgeContextsOperation) Name
func(op*PurgeContextsOperation)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 (*PurgeContextsOperation) Poll
func(op*PurgeContextsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeContextsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*PurgeContextsOperation) Wait
func(op*PurgeContextsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeContextsResponse,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.
PurgeExecutionsOperation
typePurgeExecutionsOperationstruct{// contains filtered or unexported fields}PurgeExecutionsOperation manages a long-running operation from PurgeExecutions.
func (*PurgeExecutionsOperation) Done
func(op*PurgeExecutionsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*PurgeExecutionsOperation) Metadata
func(op*PurgeExecutionsOperation)Metadata()(*aiplatformpb.PurgeExecutionsMetadata,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 (*PurgeExecutionsOperation) Name
func(op*PurgeExecutionsOperation)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 (*PurgeExecutionsOperation) Poll
func(op*PurgeExecutionsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeExecutionsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*PurgeExecutionsOperation) Wait
func(op*PurgeExecutionsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PurgeExecutionsResponse,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.
RagCorpusIterator
typeRagCorpusIteratorstruct{// 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[]*aiplatformpb.RagCorpus,nextPageTokenstring,errerror)// contains filtered or unexported fields}RagCorpusIterator manages a stream of *aiplatformpb.RagCorpus.
func (*RagCorpusIterator) All
func(it*RagCorpusIterator)All()iter.Seq2[*aiplatformpb.RagCorpus,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RagCorpusIterator) Next
func(it*RagCorpusIterator)Next()(*aiplatformpb.RagCorpus,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RagCorpusIterator) PageInfo
func(it*RagCorpusIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RagFileIterator
typeRagFileIteratorstruct{// 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[]*aiplatformpb.RagFile,nextPageTokenstring,errerror)// contains filtered or unexported fields}RagFileIterator manages a stream of *aiplatformpb.RagFile.
func (*RagFileIterator) All
func(it*RagFileIterator)All()iter.Seq2[*aiplatformpb.RagFile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RagFileIterator) Next
func(it*RagFileIterator)Next()(*aiplatformpb.RagFile,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RagFileIterator) PageInfo
func(it*RagFileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ReasoningEngineCallOptions
typeReasoningEngineCallOptionsstruct{CreateReasoningEngine[]gax.CallOptionGetReasoningEngine[]gax.CallOptionListReasoningEngines[]gax.CallOptionUpdateReasoningEngine[]gax.CallOptionDeleteReasoningEngine[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}ReasoningEngineCallOptions contains the retry settings for each method of ReasoningEngineClient.
ReasoningEngineClient
typeReasoningEngineClientstruct{// The call options for this service.CallOptions*ReasoningEngineCallOptions// 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}ReasoningEngineClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s Reasoning Engines.
func NewReasoningEngineClient
funcNewReasoningEngineClient(ctxcontext.Context,opts...option.ClientOption)(*ReasoningEngineClient,error)NewReasoningEngineClient creates a new reasoning engine service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s Reasoning Engines.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ReasoningEngineClient) CancelOperation
func(c*ReasoningEngineClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) Close
func(c*ReasoningEngineClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ReasoningEngineClient) Connection (deprecated)
func(c*ReasoningEngineClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*ReasoningEngineClient) CreateReasoningEngine
func(c*ReasoningEngineClient)CreateReasoningEngine(ctxcontext.Context,req*aiplatformpb.CreateReasoningEngineRequest,opts...gax.CallOption)(*CreateReasoningEngineOperation,error)CreateReasoningEngine creates a reasoning engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateReasoningEngineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateReasoningEngineRequest.}op,err:=c.CreateReasoningEngine(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) CreateReasoningEngineOperation
func(c*ReasoningEngineClient)CreateReasoningEngineOperation(namestring)*CreateReasoningEngineOperationCreateReasoningEngineOperation returns a new CreateReasoningEngineOperation from a given name.The name must be that of a previously created CreateReasoningEngineOperation, possibly from a different process.
func (*ReasoningEngineClient) DeleteOperation
func(c*ReasoningEngineClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) DeleteReasoningEngine
func(c*ReasoningEngineClient)DeleteReasoningEngine(ctxcontext.Context,req*aiplatformpb.DeleteReasoningEngineRequest,opts...gax.CallOption)(*DeleteReasoningEngineOperation,error)DeleteReasoningEngine deletes a reasoning engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteReasoningEngineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteReasoningEngineRequest.}op,err:=c.DeleteReasoningEngine(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*ReasoningEngineClient) DeleteReasoningEngineOperation
func(c*ReasoningEngineClient)DeleteReasoningEngineOperation(namestring)*DeleteReasoningEngineOperationDeleteReasoningEngineOperation returns a new DeleteReasoningEngineOperation from a given name.The name must be that of a previously created DeleteReasoningEngineOperation, possibly from a different process.
func (*ReasoningEngineClient) GetIamPolicy
func(c*ReasoningEngineClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) GetLocation
func(c*ReasoningEngineClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) GetOperation
func(c*ReasoningEngineClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) GetReasoningEngine
func(c*ReasoningEngineClient)GetReasoningEngine(ctxcontext.Context,req*aiplatformpb.GetReasoningEngineRequest,opts...gax.CallOption)(*aiplatformpb.ReasoningEngine,error)GetReasoningEngine gets a reasoning engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetReasoningEngineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetReasoningEngineRequest.}resp,err:=c.GetReasoningEngine(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) ListLocations
func(c*ReasoningEngineClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) ListOperations
func(c*ReasoningEngineClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(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 (*ReasoningEngineClient) ListReasoningEngines
func(c*ReasoningEngineClient)ListReasoningEngines(ctxcontext.Context,req*aiplatformpb.ListReasoningEnginesRequest,opts...gax.CallOption)*ReasoningEngineIteratorListReasoningEngines lists reasoning engines in a location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListReasoningEnginesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListReasoningEnginesRequest.}it:=c.ListReasoningEngines(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.(*aiplatformpb.ListReasoningEnginesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListReasoningEnginesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListReasoningEnginesRequest.}forresp,err:=rangec.ListReasoningEngines(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ReasoningEngineClient) SetIamPolicy
func(c*ReasoningEngineClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) TestIamPermissions
func(c*ReasoningEngineClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) UpdateReasoningEngine
func(c*ReasoningEngineClient)UpdateReasoningEngine(ctxcontext.Context,req*aiplatformpb.UpdateReasoningEngineRequest,opts...gax.CallOption)(*UpdateReasoningEngineOperation,error)UpdateReasoningEngine updates a reasoning engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateReasoningEngineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateReasoningEngineRequest.}op,err:=c.UpdateReasoningEngine(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineClient) UpdateReasoningEngineOperation
func(c*ReasoningEngineClient)UpdateReasoningEngineOperation(namestring)*UpdateReasoningEngineOperationUpdateReasoningEngineOperation returns a new UpdateReasoningEngineOperation from a given name.The name must be that of a previously created UpdateReasoningEngineOperation, possibly from a different process.
func (*ReasoningEngineClient) WaitOperation
func(c*ReasoningEngineClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ReasoningEngineExecutionCallOptions
typeReasoningEngineExecutionCallOptionsstruct{QueryReasoningEngine[]gax.CallOptionStreamQueryReasoningEngine[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}ReasoningEngineExecutionCallOptions contains the retry settings for each method of ReasoningEngineExecutionClient.
ReasoningEngineExecutionClient
typeReasoningEngineExecutionClientstruct{// The call options for this service.CallOptions*ReasoningEngineExecutionCallOptions// contains filtered or unexported fields}ReasoningEngineExecutionClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for executing queries on Reasoning Engine.
func NewReasoningEngineExecutionClient
funcNewReasoningEngineExecutionClient(ctxcontext.Context,opts...option.ClientOption)(*ReasoningEngineExecutionClient,error)NewReasoningEngineExecutionClient creates a new reasoning engine execution service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for executing queries on Reasoning Engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ReasoningEngineExecutionClient) CancelOperation
func(c*ReasoningEngineExecutionClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) Close
func(c*ReasoningEngineExecutionClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ReasoningEngineExecutionClient) Connection (deprecated)
func(c*ReasoningEngineExecutionClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*ReasoningEngineExecutionClient) DeleteOperation
func(c*ReasoningEngineExecutionClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) GetIamPolicy
func(c*ReasoningEngineExecutionClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineExecutionClient) GetLocation
func(c*ReasoningEngineExecutionClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) GetOperation
func(c*ReasoningEngineExecutionClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) ListLocations
func(c*ReasoningEngineExecutionClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) ListOperations
func(c*ReasoningEngineExecutionClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(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 (*ReasoningEngineExecutionClient) QueryReasoningEngine
func(c*ReasoningEngineExecutionClient)QueryReasoningEngine(ctxcontext.Context,req*aiplatformpb.QueryReasoningEngineRequest,opts...gax.CallOption)(*aiplatformpb.QueryReasoningEngineResponse,error)QueryReasoningEngine queries using a reasoning engine.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.QueryReasoningEngineRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#QueryReasoningEngineRequest.}resp,err:=c.QueryReasoningEngine(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineExecutionClient) SetIamPolicy
func(c*ReasoningEngineExecutionClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineExecutionClient) StreamQueryReasoningEngine
func(c*ReasoningEngineExecutionClient)StreamQueryReasoningEngine(ctxcontext.Context,req*aiplatformpb.StreamQueryReasoningEngineRequest,opts...gax.CallOption)(aiplatformpb.ReasoningEngineExecutionService_StreamQueryReasoningEngineClient,error)StreamQueryReasoningEngine streams queries using a reasoning engine.
func (*ReasoningEngineExecutionClient) TestIamPermissions
func(c*ReasoningEngineExecutionClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ReasoningEngineExecutionClient) WaitOperation
func(c*ReasoningEngineExecutionClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewReasoningEngineExecutionClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ReasoningEngineIterator
typeReasoningEngineIteratorstruct{// 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[]*aiplatformpb.ReasoningEngine,nextPageTokenstring,errerror)// contains filtered or unexported fields}ReasoningEngineIterator manages a stream of *aiplatformpb.ReasoningEngine.
func (*ReasoningEngineIterator) All
func(it*ReasoningEngineIterator)All()iter.Seq2[*aiplatformpb.ReasoningEngine,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ReasoningEngineIterator) Next
func(it*ReasoningEngineIterator)Next()(*aiplatformpb.ReasoningEngine,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ReasoningEngineIterator) PageInfo
func(it*ReasoningEngineIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RebaseTunedModelOperation
typeRebaseTunedModelOperationstruct{// contains filtered or unexported fields}RebaseTunedModelOperation manages a long-running operation from RebaseTunedModel.
func (*RebaseTunedModelOperation) Done
func(op*RebaseTunedModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RebaseTunedModelOperation) Metadata
func(op*RebaseTunedModelOperation)Metadata()(*aiplatformpb.RebaseTunedModelOperationMetadata,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 (*RebaseTunedModelOperation) Name
func(op*RebaseTunedModelOperation)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 (*RebaseTunedModelOperation) Poll
func(op*RebaseTunedModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.TuningJob,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RebaseTunedModelOperation) Wait
func(op*RebaseTunedModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.TuningJob,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.
RebootPersistentResourceOperation
typeRebootPersistentResourceOperationstruct{// contains filtered or unexported fields}RebootPersistentResourceOperation manages a long-running operation from RebootPersistentResource.
func (*RebootPersistentResourceOperation) Done
func(op*RebootPersistentResourceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RebootPersistentResourceOperation) Metadata
func(op*RebootPersistentResourceOperation)Metadata()(*aiplatformpb.RebootPersistentResourceOperationMetadata,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 (*RebootPersistentResourceOperation) Name
func(op*RebootPersistentResourceOperation)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 (*RebootPersistentResourceOperation) Poll
func(op*RebootPersistentResourceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RebootPersistentResourceOperation) Wait
func(op*RebootPersistentResourceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,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.
RestoreDatasetVersionOperation
typeRestoreDatasetVersionOperationstruct{// contains filtered or unexported fields}RestoreDatasetVersionOperation manages a long-running operation from RestoreDatasetVersion.
func (*RestoreDatasetVersionOperation) Done
func(op*RestoreDatasetVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RestoreDatasetVersionOperation) Metadata
func(op*RestoreDatasetVersionOperation)Metadata()(*aiplatformpb.RestoreDatasetVersionOperationMetadata,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 (*RestoreDatasetVersionOperation) Name
func(op*RestoreDatasetVersionOperation)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 (*RestoreDatasetVersionOperation) Poll
func(op*RestoreDatasetVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*RestoreDatasetVersionOperation) Wait
func(op*RestoreDatasetVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DatasetVersion,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.
SavedQueryIterator
typeSavedQueryIteratorstruct{// 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[]*aiplatformpb.SavedQuery,nextPageTokenstring,errerror)// contains filtered or unexported fields}SavedQueryIterator manages a stream of *aiplatformpb.SavedQuery.
func (*SavedQueryIterator) All
func(it*SavedQueryIterator)All()iter.Seq2[*aiplatformpb.SavedQuery,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SavedQueryIterator) Next
func(it*SavedQueryIterator)Next()(*aiplatformpb.SavedQuery,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SavedQueryIterator) PageInfo
func(it*SavedQueryIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ScheduleCallOptions
typeScheduleCallOptionsstruct{CreateSchedule[]gax.CallOptionDeleteSchedule[]gax.CallOptionGetSchedule[]gax.CallOptionListSchedules[]gax.CallOptionPauseSchedule[]gax.CallOptionResumeSchedule[]gax.CallOptionUpdateSchedule[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}ScheduleCallOptions contains the retry settings for each method of ScheduleClient.
ScheduleClient
typeScheduleClientstruct{// The call options for this service.CallOptions*ScheduleCallOptions// 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}ScheduleClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s Schedule resources toperiodically launch shceudled runs to make API calls.
func NewScheduleClient
funcNewScheduleClient(ctxcontext.Context,opts...option.ClientOption)(*ScheduleClient,error)NewScheduleClient creates a new schedule service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s Schedule resources toperiodically launch shceudled runs to make API calls.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ScheduleClient) CancelOperation
func(c*ScheduleClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) Close
func(c*ScheduleClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ScheduleClient) Connection (deprecated)
func(c*ScheduleClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*ScheduleClient) CreateSchedule
func(c*ScheduleClient)CreateSchedule(ctxcontext.Context,req*aiplatformpb.CreateScheduleRequest,opts...gax.CallOption)(*aiplatformpb.Schedule,error)CreateSchedule creates a Schedule.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateScheduleRequest.}resp,err:=c.CreateSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) DeleteOperation
func(c*ScheduleClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) DeleteSchedule
func(c*ScheduleClient)DeleteSchedule(ctxcontext.Context,req*aiplatformpb.DeleteScheduleRequest,opts...gax.CallOption)(*DeleteScheduleOperation,error)DeleteSchedule deletes a Schedule.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteScheduleRequest.}op,err:=c.DeleteSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*ScheduleClient) DeleteScheduleOperation
func(c*ScheduleClient)DeleteScheduleOperation(namestring)*DeleteScheduleOperationDeleteScheduleOperation returns a new DeleteScheduleOperation from a given name.The name must be that of a previously created DeleteScheduleOperation, possibly from a different process.
func (*ScheduleClient) GetIamPolicy
func(c*ScheduleClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) GetLocation
func(c*ScheduleClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) GetOperation
func(c*ScheduleClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) GetSchedule
func(c*ScheduleClient)GetSchedule(ctxcontext.Context,req*aiplatformpb.GetScheduleRequest,opts...gax.CallOption)(*aiplatformpb.Schedule,error)GetSchedule gets a Schedule.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetScheduleRequest.}resp,err:=c.GetSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) ListLocations
func(c*ScheduleClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) ListOperations
func(c*ScheduleClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(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 (*ScheduleClient) ListSchedules
func(c*ScheduleClient)ListSchedules(ctxcontext.Context,req*aiplatformpb.ListSchedulesRequest,opts...gax.CallOption)*ScheduleIteratorListSchedules lists Schedules in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSchedulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSchedulesRequest.}it:=c.ListSchedules(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.(*aiplatformpb.ListSchedulesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSchedulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSchedulesRequest.}forresp,err:=rangec.ListSchedules(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*ScheduleClient) PauseSchedule
func(c*ScheduleClient)PauseSchedule(ctxcontext.Context,req*aiplatformpb.PauseScheduleRequest,opts...gax.CallOption)errorPauseSchedule pauses a Schedule. Will markSchedule.state to ‘PAUSED’. Ifthe schedule is paused, no new runs will be created. Already created runswill NOT be paused or canceled.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.PauseScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#PauseScheduleRequest.}err=c.PauseSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*ScheduleClient) ResumeSchedule
func(c*ScheduleClient)ResumeSchedule(ctxcontext.Context,req*aiplatformpb.ResumeScheduleRequest,opts...gax.CallOption)errorResumeSchedule resumes a paused Schedule to start scheduling new runs. Will markSchedule.state to ‘ACTIVE’.Only paused Schedule can be resumed.
When the Schedule is resumed, new runs will be scheduled starting from thenext execution time after the current time based on the time_specificationin the Schedule. IfSchedule.catch_up is set uptrue, all missed runs will be scheduled for backfill first.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ResumeScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ResumeScheduleRequest.}err=c.ResumeSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*ScheduleClient) SetIamPolicy
func(c*ScheduleClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) TestIamPermissions
func(c*ScheduleClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) UpdateSchedule
func(c*ScheduleClient)UpdateSchedule(ctxcontext.Context,req*aiplatformpb.UpdateScheduleRequest,opts...gax.CallOption)(*aiplatformpb.Schedule,error)UpdateSchedule updates an active or paused Schedule.
When the Schedule is updated, new runs will be scheduled starting from theupdated next execution time after the update time based on thetime_specification in the updated Schedule. All unstarted runs before theupdate time will be skipped while already created runs will NOT be pausedor canceled.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateScheduleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateScheduleRequest.}resp,err:=c.UpdateSchedule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ScheduleClient) WaitOperation
func(c*ScheduleClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewScheduleClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ScheduleIterator
typeScheduleIteratorstruct{// 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[]*aiplatformpb.Schedule,nextPageTokenstring,errerror)// contains filtered or unexported fields}ScheduleIterator manages a stream of *aiplatformpb.Schedule.
func (*ScheduleIterator) All
func(it*ScheduleIterator)All()iter.Seq2[*aiplatformpb.Schedule,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ScheduleIterator) Next
func(it*ScheduleIterator)Next()(*aiplatformpb.Schedule,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ScheduleIterator) PageInfo
func(it*ScheduleIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SpecialistPoolCallOptions
typeSpecialistPoolCallOptionsstruct{CreateSpecialistPool[]gax.CallOptionGetSpecialistPool[]gax.CallOptionListSpecialistPools[]gax.CallOptionDeleteSpecialistPool[]gax.CallOptionUpdateSpecialistPool[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}SpecialistPoolCallOptions contains the retry settings for each method of SpecialistPoolClient.
SpecialistPoolClient
typeSpecialistPoolClientstruct{// The call options for this service.CallOptions*SpecialistPoolCallOptions// 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}SpecialistPoolClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Customer SpecialistPools.When customers start Data Labeling jobs, they can reuse/create SpecialistPools to bring their own Specialists to label the data.Customers can add/remove Managers for the Specialist Pool on Cloud console,then Managers will get email notifications to manage Specialists and tasks onCrowdCompute console.
func NewSpecialistPoolClient
funcNewSpecialistPoolClient(ctxcontext.Context,opts...option.ClientOption)(*SpecialistPoolClient,error)NewSpecialistPoolClient creates a new specialist pool service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Customer SpecialistPools.When customers start Data Labeling jobs, they can reuse/create SpecialistPools to bring their own Specialists to label the data.Customers can add/remove Managers for the Specialist Pool on Cloud console,then Managers will get email notifications to manage Specialists and tasks onCrowdCompute console.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*SpecialistPoolClient) CancelOperation
func(c*SpecialistPoolClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) Close
func(c*SpecialistPoolClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*SpecialistPoolClient) Connection (deprecated)
func(c*SpecialistPoolClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*SpecialistPoolClient) CreateSpecialistPool
func(c*SpecialistPoolClient)CreateSpecialistPool(ctxcontext.Context,req*aiplatformpb.CreateSpecialistPoolRequest,opts...gax.CallOption)(*CreateSpecialistPoolOperation,error)CreateSpecialistPool creates a SpecialistPool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateSpecialistPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateSpecialistPoolRequest.}op,err:=c.CreateSpecialistPool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) CreateSpecialistPoolOperation
func(c*SpecialistPoolClient)CreateSpecialistPoolOperation(namestring)*CreateSpecialistPoolOperationCreateSpecialistPoolOperation returns a new CreateSpecialistPoolOperation from a given name.The name must be that of a previously created CreateSpecialistPoolOperation, possibly from a different process.
func (*SpecialistPoolClient) DeleteOperation
func(c*SpecialistPoolClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) DeleteSpecialistPool
func(c*SpecialistPoolClient)DeleteSpecialistPool(ctxcontext.Context,req*aiplatformpb.DeleteSpecialistPoolRequest,opts...gax.CallOption)(*DeleteSpecialistPoolOperation,error)DeleteSpecialistPool deletes a SpecialistPool as well as all Specialists in the pool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteSpecialistPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteSpecialistPoolRequest.}op,err:=c.DeleteSpecialistPool(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*SpecialistPoolClient) DeleteSpecialistPoolOperation
func(c*SpecialistPoolClient)DeleteSpecialistPoolOperation(namestring)*DeleteSpecialistPoolOperationDeleteSpecialistPoolOperation returns a new DeleteSpecialistPoolOperation from a given name.The name must be that of a previously created DeleteSpecialistPoolOperation, possibly from a different process.
func (*SpecialistPoolClient) GetIamPolicy
func(c*SpecialistPoolClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) GetLocation
func(c*SpecialistPoolClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) GetOperation
func(c*SpecialistPoolClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) GetSpecialistPool
func(c*SpecialistPoolClient)GetSpecialistPool(ctxcontext.Context,req*aiplatformpb.GetSpecialistPoolRequest,opts...gax.CallOption)(*aiplatformpb.SpecialistPool,error)GetSpecialistPool gets a SpecialistPool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetSpecialistPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetSpecialistPoolRequest.}resp,err:=c.GetSpecialistPool(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) ListLocations
func(c*SpecialistPoolClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) ListOperations
func(c*SpecialistPoolClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(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 (*SpecialistPoolClient) ListSpecialistPools
func(c*SpecialistPoolClient)ListSpecialistPools(ctxcontext.Context,req*aiplatformpb.ListSpecialistPoolsRequest,opts...gax.CallOption)*SpecialistPoolIteratorListSpecialistPools lists SpecialistPools in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSpecialistPoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSpecialistPoolsRequest.}it:=c.ListSpecialistPools(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.(*aiplatformpb.ListSpecialistPoolsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListSpecialistPoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListSpecialistPoolsRequest.}forresp,err:=rangec.ListSpecialistPools(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*SpecialistPoolClient) SetIamPolicy
func(c*SpecialistPoolClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) TestIamPermissions
func(c*SpecialistPoolClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) UpdateSpecialistPool
func(c*SpecialistPoolClient)UpdateSpecialistPool(ctxcontext.Context,req*aiplatformpb.UpdateSpecialistPoolRequest,opts...gax.CallOption)(*UpdateSpecialistPoolOperation,error)UpdateSpecialistPool updates a SpecialistPool.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateSpecialistPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateSpecialistPoolRequest.}op,err:=c.UpdateSpecialistPool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*SpecialistPoolClient) UpdateSpecialistPoolOperation
func(c*SpecialistPoolClient)UpdateSpecialistPoolOperation(namestring)*UpdateSpecialistPoolOperationUpdateSpecialistPoolOperation returns a new UpdateSpecialistPoolOperation from a given name.The name must be that of a previously created UpdateSpecialistPoolOperation, possibly from a different process.
func (*SpecialistPoolClient) WaitOperation
func(c*SpecialistPoolClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewSpecialistPoolClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}SpecialistPoolIterator
typeSpecialistPoolIteratorstruct{// 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[]*aiplatformpb.SpecialistPool,nextPageTokenstring,errerror)// contains filtered or unexported fields}SpecialistPoolIterator manages a stream of *aiplatformpb.SpecialistPool.
func (*SpecialistPoolIterator) All
func(it*SpecialistPoolIterator)All()iter.Seq2[*aiplatformpb.SpecialistPool,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*SpecialistPoolIterator) Next
func(it*SpecialistPoolIterator)Next()(*aiplatformpb.SpecialistPool,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*SpecialistPoolIterator) PageInfo
func(it*SpecialistPoolIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StartNotebookRuntimeOperation
typeStartNotebookRuntimeOperationstruct{// contains filtered or unexported fields}StartNotebookRuntimeOperation manages a long-running operation from StartNotebookRuntime.
func (*StartNotebookRuntimeOperation) Done
func(op*StartNotebookRuntimeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*StartNotebookRuntimeOperation) Metadata
func(op*StartNotebookRuntimeOperation)Metadata()(*aiplatformpb.StartNotebookRuntimeOperationMetadata,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 (*StartNotebookRuntimeOperation) Name
func(op*StartNotebookRuntimeOperation)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 (*StartNotebookRuntimeOperation) Poll
func(op*StartNotebookRuntimeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.StartNotebookRuntimeResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StartNotebookRuntimeOperation) Wait
func(op*StartNotebookRuntimeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.StartNotebookRuntimeResponse,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.
StopNotebookRuntimeOperation
typeStopNotebookRuntimeOperationstruct{// contains filtered or unexported fields}StopNotebookRuntimeOperation manages a long-running operation from StopNotebookRuntime.
func (*StopNotebookRuntimeOperation) Done
func(op*StopNotebookRuntimeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*StopNotebookRuntimeOperation) Metadata
func(op*StopNotebookRuntimeOperation)Metadata()(*aiplatformpb.StopNotebookRuntimeOperationMetadata,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 (*StopNotebookRuntimeOperation) Name
func(op*StopNotebookRuntimeOperation)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 (*StopNotebookRuntimeOperation) Poll
func(op*StopNotebookRuntimeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.StopNotebookRuntimeResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*StopNotebookRuntimeOperation) Wait
func(op*StopNotebookRuntimeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.StopNotebookRuntimeResponse,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.
StudyIterator
typeStudyIteratorstruct{// 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[]*aiplatformpb.Study,nextPageTokenstring,errerror)// contains filtered or unexported fields}StudyIterator manages a stream of *aiplatformpb.Study.
func (*StudyIterator) All
func(it*StudyIterator)All()iter.Seq2[*aiplatformpb.Study,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*StudyIterator) Next
func(it*StudyIterator)Next()(*aiplatformpb.Study,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*StudyIterator) PageInfo
func(it*StudyIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SuggestTrialsOperation
typeSuggestTrialsOperationstruct{// contains filtered or unexported fields}SuggestTrialsOperation manages a long-running operation from SuggestTrials.
func (*SuggestTrialsOperation) Done
func(op*SuggestTrialsOperation)Done()boolDone reports whether the long-running operation has completed.
func (*SuggestTrialsOperation) Metadata
func(op*SuggestTrialsOperation)Metadata()(*aiplatformpb.SuggestTrialsMetadata,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 (*SuggestTrialsOperation) Name
func(op*SuggestTrialsOperation)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 (*SuggestTrialsOperation) Poll
func(op*SuggestTrialsOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SuggestTrialsResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*SuggestTrialsOperation) Wait
func(op*SuggestTrialsOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SuggestTrialsResponse,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.
TensorboardCallOptions
typeTensorboardCallOptionsstruct{CreateTensorboard[]gax.CallOptionGetTensorboard[]gax.CallOptionUpdateTensorboard[]gax.CallOptionListTensorboards[]gax.CallOptionDeleteTensorboard[]gax.CallOptionReadTensorboardUsage[]gax.CallOptionReadTensorboardSize[]gax.CallOptionCreateTensorboardExperiment[]gax.CallOptionGetTensorboardExperiment[]gax.CallOptionUpdateTensorboardExperiment[]gax.CallOptionListTensorboardExperiments[]gax.CallOptionDeleteTensorboardExperiment[]gax.CallOptionCreateTensorboardRun[]gax.CallOptionBatchCreateTensorboardRuns[]gax.CallOptionGetTensorboardRun[]gax.CallOptionUpdateTensorboardRun[]gax.CallOptionListTensorboardRuns[]gax.CallOptionDeleteTensorboardRun[]gax.CallOptionBatchCreateTensorboardTimeSeries[]gax.CallOptionCreateTensorboardTimeSeries[]gax.CallOptionGetTensorboardTimeSeries[]gax.CallOptionUpdateTensorboardTimeSeries[]gax.CallOptionListTensorboardTimeSeries[]gax.CallOptionDeleteTensorboardTimeSeries[]gax.CallOptionBatchReadTensorboardTimeSeriesData[]gax.CallOptionReadTensorboardTimeSeriesData[]gax.CallOptionReadTensorboardBlobData[]gax.CallOptionWriteTensorboardExperimentData[]gax.CallOptionWriteTensorboardRunData[]gax.CallOptionExportTensorboardTimeSeriesData[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}TensorboardCallOptions contains the retry settings for each method of TensorboardClient.
TensorboardClient
typeTensorboardClientstruct{// The call options for this service.CallOptions*TensorboardCallOptions// 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}TensorboardClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
TensorboardService
func NewTensorboardClient
funcNewTensorboardClient(ctxcontext.Context,opts...option.ClientOption)(*TensorboardClient,error)NewTensorboardClient creates a new tensorboard service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
TensorboardService
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*TensorboardClient) BatchCreateTensorboardRuns
func(c*TensorboardClient)BatchCreateTensorboardRuns(ctxcontext.Context,req*aiplatformpb.BatchCreateTensorboardRunsRequest,opts...gax.CallOption)(*aiplatformpb.BatchCreateTensorboardRunsResponse,error)BatchCreateTensorboardRuns batch create TensorboardRuns.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchCreateTensorboardRunsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchCreateTensorboardRunsRequest.}resp,err:=c.BatchCreateTensorboardRuns(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) BatchCreateTensorboardTimeSeries
func(c*TensorboardClient)BatchCreateTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.BatchCreateTensorboardTimeSeriesRequest,opts...gax.CallOption)(*aiplatformpb.BatchCreateTensorboardTimeSeriesResponse,error)BatchCreateTensorboardTimeSeries batch create TensorboardTimeSeries that belong to a TensorboardExperiment.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchCreateTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchCreateTensorboardTimeSeriesRequest.}resp,err:=c.BatchCreateTensorboardTimeSeries(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) BatchReadTensorboardTimeSeriesData
func(c*TensorboardClient)BatchReadTensorboardTimeSeriesData(ctxcontext.Context,req*aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest,opts...gax.CallOption)(*aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse,error)BatchReadTensorboardTimeSeriesData reads multiple TensorboardTimeSeries’ data. The data point number limit is1000 for scalars, 100 for tensors and blob references. If the number ofdata points stored is less than the limit, all data is returned.Otherwise, the number limit of data points is randomly selected fromthis time series and returned.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#BatchReadTensorboardTimeSeriesDataRequest.}resp,err:=c.BatchReadTensorboardTimeSeriesData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) CancelOperation
func(c*TensorboardClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) Close
func(c*TensorboardClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*TensorboardClient) Connection (deprecated)
func(c*TensorboardClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*TensorboardClient) CreateTensorboard
func(c*TensorboardClient)CreateTensorboard(ctxcontext.Context,req*aiplatformpb.CreateTensorboardRequest,opts...gax.CallOption)(*CreateTensorboardOperation,error)CreateTensorboard creates a Tensorboard.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTensorboardRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTensorboardRequest.}op,err:=c.CreateTensorboard(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) CreateTensorboardExperiment
func(c*TensorboardClient)CreateTensorboardExperiment(ctxcontext.Context,req*aiplatformpb.CreateTensorboardExperimentRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardExperiment,error)CreateTensorboardExperiment creates a TensorboardExperiment.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTensorboardExperimentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTensorboardExperimentRequest.}resp,err:=c.CreateTensorboardExperiment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) CreateTensorboardOperation
func(c*TensorboardClient)CreateTensorboardOperation(namestring)*CreateTensorboardOperationCreateTensorboardOperation returns a new CreateTensorboardOperation from a given name.The name must be that of a previously created CreateTensorboardOperation, possibly from a different process.
func (*TensorboardClient) CreateTensorboardRun
func(c*TensorboardClient)CreateTensorboardRun(ctxcontext.Context,req*aiplatformpb.CreateTensorboardRunRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardRun,error)CreateTensorboardRun creates a TensorboardRun.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTensorboardRunRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTensorboardRunRequest.}resp,err:=c.CreateTensorboardRun(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) CreateTensorboardTimeSeries
func(c*TensorboardClient)CreateTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.CreateTensorboardTimeSeriesRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardTimeSeries,error)CreateTensorboardTimeSeries creates a TensorboardTimeSeries.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTensorboardTimeSeriesRequest.}resp,err:=c.CreateTensorboardTimeSeries(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) DeleteOperation
func(c*TensorboardClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) DeleteTensorboard
func(c*TensorboardClient)DeleteTensorboard(ctxcontext.Context,req*aiplatformpb.DeleteTensorboardRequest,opts...gax.CallOption)(*DeleteTensorboardOperation,error)DeleteTensorboard deletes a Tensorboard.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTensorboardRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTensorboardRequest.}op,err:=c.DeleteTensorboard(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*TensorboardClient) DeleteTensorboardExperiment
func(c*TensorboardClient)DeleteTensorboardExperiment(ctxcontext.Context,req*aiplatformpb.DeleteTensorboardExperimentRequest,opts...gax.CallOption)(*DeleteTensorboardExperimentOperation,error)DeleteTensorboardExperiment deletes a TensorboardExperiment.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTensorboardExperimentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTensorboardExperimentRequest.}op,err:=c.DeleteTensorboardExperiment(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*TensorboardClient) DeleteTensorboardExperimentOperation
func(c*TensorboardClient)DeleteTensorboardExperimentOperation(namestring)*DeleteTensorboardExperimentOperationDeleteTensorboardExperimentOperation returns a new DeleteTensorboardExperimentOperation from a given name.The name must be that of a previously created DeleteTensorboardExperimentOperation, possibly from a different process.
func (*TensorboardClient) DeleteTensorboardOperation
func(c*TensorboardClient)DeleteTensorboardOperation(namestring)*DeleteTensorboardOperationDeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name.The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process.
func (*TensorboardClient) DeleteTensorboardRun
func(c*TensorboardClient)DeleteTensorboardRun(ctxcontext.Context,req*aiplatformpb.DeleteTensorboardRunRequest,opts...gax.CallOption)(*DeleteTensorboardRunOperation,error)DeleteTensorboardRun deletes a TensorboardRun.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTensorboardRunRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTensorboardRunRequest.}op,err:=c.DeleteTensorboardRun(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*TensorboardClient) DeleteTensorboardRunOperation
func(c*TensorboardClient)DeleteTensorboardRunOperation(namestring)*DeleteTensorboardRunOperationDeleteTensorboardRunOperation returns a new DeleteTensorboardRunOperation from a given name.The name must be that of a previously created DeleteTensorboardRunOperation, possibly from a different process.
func (*TensorboardClient) DeleteTensorboardTimeSeries
func(c*TensorboardClient)DeleteTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.DeleteTensorboardTimeSeriesRequest,opts...gax.CallOption)(*DeleteTensorboardTimeSeriesOperation,error)DeleteTensorboardTimeSeries deletes a TensorboardTimeSeries.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTensorboardTimeSeriesRequest.}op,err:=c.DeleteTensorboardTimeSeries(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*TensorboardClient) DeleteTensorboardTimeSeriesOperation
func(c*TensorboardClient)DeleteTensorboardTimeSeriesOperation(namestring)*DeleteTensorboardTimeSeriesOperationDeleteTensorboardTimeSeriesOperation returns a new DeleteTensorboardTimeSeriesOperation from a given name.The name must be that of a previously created DeleteTensorboardTimeSeriesOperation, possibly from a different process.
func (*TensorboardClient) ExportTensorboardTimeSeriesData
func(c*TensorboardClient)ExportTensorboardTimeSeriesData(ctxcontext.Context,req*aiplatformpb.ExportTensorboardTimeSeriesDataRequest,opts...gax.CallOption)*TimeSeriesDataPointIteratorExportTensorboardTimeSeriesData exports a TensorboardTimeSeries’ data. Data is returned in paginatedresponses.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExportTensorboardTimeSeriesDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExportTensorboardTimeSeriesDataRequest.}it:=c.ExportTensorboardTimeSeriesData(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.(*aiplatformpb.ExportTensorboardTimeSeriesDataResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ExportTensorboardTimeSeriesDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ExportTensorboardTimeSeriesDataRequest.}forresp,err:=rangec.ExportTensorboardTimeSeriesData(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*TensorboardClient) GetIamPolicy
func(c*TensorboardClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) GetLocation
func(c*TensorboardClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) GetOperation
func(c*TensorboardClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) GetTensorboard
func(c*TensorboardClient)GetTensorboard(ctxcontext.Context,req*aiplatformpb.GetTensorboardRequest,opts...gax.CallOption)(*aiplatformpb.Tensorboard,error)GetTensorboard gets a Tensorboard.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTensorboardRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTensorboardRequest.}resp,err:=c.GetTensorboard(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) GetTensorboardExperiment
func(c*TensorboardClient)GetTensorboardExperiment(ctxcontext.Context,req*aiplatformpb.GetTensorboardExperimentRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardExperiment,error)GetTensorboardExperiment gets a TensorboardExperiment.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTensorboardExperimentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTensorboardExperimentRequest.}resp,err:=c.GetTensorboardExperiment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) GetTensorboardRun
func(c*TensorboardClient)GetTensorboardRun(ctxcontext.Context,req*aiplatformpb.GetTensorboardRunRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardRun,error)GetTensorboardRun gets a TensorboardRun.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTensorboardRunRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTensorboardRunRequest.}resp,err:=c.GetTensorboardRun(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) GetTensorboardTimeSeries
func(c*TensorboardClient)GetTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.GetTensorboardTimeSeriesRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardTimeSeries,error)GetTensorboardTimeSeries gets a TensorboardTimeSeries.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTensorboardTimeSeriesRequest.}resp,err:=c.GetTensorboardTimeSeries(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) ListLocations
func(c*TensorboardClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) ListOperations
func(c*TensorboardClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(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 (*TensorboardClient) ListTensorboardExperiments
func(c*TensorboardClient)ListTensorboardExperiments(ctxcontext.Context,req*aiplatformpb.ListTensorboardExperimentsRequest,opts...gax.CallOption)*TensorboardExperimentIteratorListTensorboardExperiments lists TensorboardExperiments in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardExperimentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardExperimentsRequest.}it:=c.ListTensorboardExperiments(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.(*aiplatformpb.ListTensorboardExperimentsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardExperimentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardExperimentsRequest.}forresp,err:=rangec.ListTensorboardExperiments(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*TensorboardClient) ListTensorboardRuns
func(c*TensorboardClient)ListTensorboardRuns(ctxcontext.Context,req*aiplatformpb.ListTensorboardRunsRequest,opts...gax.CallOption)*TensorboardRunIteratorListTensorboardRuns lists TensorboardRuns in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardRunsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardRunsRequest.}it:=c.ListTensorboardRuns(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.(*aiplatformpb.ListTensorboardRunsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardRunsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardRunsRequest.}forresp,err:=rangec.ListTensorboardRuns(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*TensorboardClient) ListTensorboardTimeSeries
func(c*TensorboardClient)ListTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.ListTensorboardTimeSeriesRequest,opts...gax.CallOption)*TensorboardTimeSeriesIteratorListTensorboardTimeSeries lists TensorboardTimeSeries in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardTimeSeriesRequest.}it:=c.ListTensorboardTimeSeries(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.(*aiplatformpb.ListTensorboardTimeSeriesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardTimeSeriesRequest.}forresp,err:=rangec.ListTensorboardTimeSeries(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*TensorboardClient) ListTensorboards
func(c*TensorboardClient)ListTensorboards(ctxcontext.Context,req*aiplatformpb.ListTensorboardsRequest,opts...gax.CallOption)*TensorboardIteratorListTensorboards lists Tensorboards in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardsRequest.}it:=c.ListTensorboards(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.(*aiplatformpb.ListTensorboardsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTensorboardsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTensorboardsRequest.}forresp,err:=rangec.ListTensorboards(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*TensorboardClient) ReadTensorboardBlobData
func(c*TensorboardClient)ReadTensorboardBlobData(ctxcontext.Context,req*aiplatformpb.ReadTensorboardBlobDataRequest,opts...gax.CallOption)(aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient,error)ReadTensorboardBlobData gets bytes of TensorboardBlobs.This is to allow reading blob data stored in consumer project’s CloudStorage bucket without users having to obtain Cloud Storage accesspermission.
func (*TensorboardClient) ReadTensorboardSize
func(c*TensorboardClient)ReadTensorboardSize(ctxcontext.Context,req*aiplatformpb.ReadTensorboardSizeRequest,opts...gax.CallOption)(*aiplatformpb.ReadTensorboardSizeResponse,error)ReadTensorboardSize returns the storage size for a given TensorBoard instance.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ReadTensorboardSizeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ReadTensorboardSizeRequest.}resp,err:=c.ReadTensorboardSize(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) ReadTensorboardTimeSeriesData
func(c*TensorboardClient)ReadTensorboardTimeSeriesData(ctxcontext.Context,req*aiplatformpb.ReadTensorboardTimeSeriesDataRequest,opts...gax.CallOption)(*aiplatformpb.ReadTensorboardTimeSeriesDataResponse,error)ReadTensorboardTimeSeriesData reads a TensorboardTimeSeries’ data. By default, if the number of datapoints stored is less than 1000, all data is returned. Otherwise, 1000data points is randomly selected from this time series and returned.This value can be changed by changing max_data_points, which can’t begreater than 10k.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ReadTensorboardTimeSeriesDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ReadTensorboardTimeSeriesDataRequest.}resp,err:=c.ReadTensorboardTimeSeriesData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) ReadTensorboardUsage
func(c*TensorboardClient)ReadTensorboardUsage(ctxcontext.Context,req*aiplatformpb.ReadTensorboardUsageRequest,opts...gax.CallOption)(*aiplatformpb.ReadTensorboardUsageResponse,error)ReadTensorboardUsage returns a list of monthly active users for a given TensorBoard instance.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ReadTensorboardUsageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ReadTensorboardUsageRequest.}resp,err:=c.ReadTensorboardUsage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) SetIamPolicy
func(c*TensorboardClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) TestIamPermissions
func(c*TensorboardClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) UpdateTensorboard
func(c*TensorboardClient)UpdateTensorboard(ctxcontext.Context,req*aiplatformpb.UpdateTensorboardRequest,opts...gax.CallOption)(*UpdateTensorboardOperation,error)UpdateTensorboard updates a Tensorboard.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateTensorboardRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateTensorboardRequest.}op,err:=c.UpdateTensorboard(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) UpdateTensorboardExperiment
func(c*TensorboardClient)UpdateTensorboardExperiment(ctxcontext.Context,req*aiplatformpb.UpdateTensorboardExperimentRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardExperiment,error)UpdateTensorboardExperiment updates a TensorboardExperiment.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateTensorboardExperimentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateTensorboardExperimentRequest.}resp,err:=c.UpdateTensorboardExperiment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) UpdateTensorboardOperation
func(c*TensorboardClient)UpdateTensorboardOperation(namestring)*UpdateTensorboardOperationUpdateTensorboardOperation returns a new UpdateTensorboardOperation from a given name.The name must be that of a previously created UpdateTensorboardOperation, possibly from a different process.
func (*TensorboardClient) UpdateTensorboardRun
func(c*TensorboardClient)UpdateTensorboardRun(ctxcontext.Context,req*aiplatformpb.UpdateTensorboardRunRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardRun,error)UpdateTensorboardRun updates a TensorboardRun.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateTensorboardRunRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateTensorboardRunRequest.}resp,err:=c.UpdateTensorboardRun(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) UpdateTensorboardTimeSeries
func(c*TensorboardClient)UpdateTensorboardTimeSeries(ctxcontext.Context,req*aiplatformpb.UpdateTensorboardTimeSeriesRequest,opts...gax.CallOption)(*aiplatformpb.TensorboardTimeSeries,error)UpdateTensorboardTimeSeries updates a TensorboardTimeSeries.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateTensorboardTimeSeriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateTensorboardTimeSeriesRequest.}resp,err:=c.UpdateTensorboardTimeSeries(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) WaitOperation
func(c*TensorboardClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) WriteTensorboardExperimentData
func(c*TensorboardClient)WriteTensorboardExperimentData(ctxcontext.Context,req*aiplatformpb.WriteTensorboardExperimentDataRequest,opts...gax.CallOption)(*aiplatformpb.WriteTensorboardExperimentDataResponse,error)WriteTensorboardExperimentData write time series data points of multiple TensorboardTimeSeries in multipleTensorboardRun’s. If any data fail to be ingested, an error is returned.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.WriteTensorboardExperimentDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#WriteTensorboardExperimentDataRequest.}resp,err:=c.WriteTensorboardExperimentData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*TensorboardClient) WriteTensorboardRunData
func(c*TensorboardClient)WriteTensorboardRunData(ctxcontext.Context,req*aiplatformpb.WriteTensorboardRunDataRequest,opts...gax.CallOption)(*aiplatformpb.WriteTensorboardRunDataResponse,error)WriteTensorboardRunData write time series data points into multiple TensorboardTimeSeries undera TensorboardRun. If any data fail to be ingested, an error is returned.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewTensorboardClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.WriteTensorboardRunDataRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#WriteTensorboardRunDataRequest.}resp,err:=c.WriteTensorboardRunData(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}TensorboardExperimentIterator
typeTensorboardExperimentIteratorstruct{// 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[]*aiplatformpb.TensorboardExperiment,nextPageTokenstring,errerror)// contains filtered or unexported fields}TensorboardExperimentIterator manages a stream of *aiplatformpb.TensorboardExperiment.
func (*TensorboardExperimentIterator) All
func(it*TensorboardExperimentIterator)All()iter.Seq2[*aiplatformpb.TensorboardExperiment,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TensorboardExperimentIterator) Next
func(it*TensorboardExperimentIterator)Next()(*aiplatformpb.TensorboardExperiment,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TensorboardExperimentIterator) PageInfo
func(it*TensorboardExperimentIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TensorboardIterator
typeTensorboardIteratorstruct{// 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[]*aiplatformpb.Tensorboard,nextPageTokenstring,errerror)// contains filtered or unexported fields}TensorboardIterator manages a stream of *aiplatformpb.Tensorboard.
func (*TensorboardIterator) All
func(it*TensorboardIterator)All()iter.Seq2[*aiplatformpb.Tensorboard,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TensorboardIterator) Next
func(it*TensorboardIterator)Next()(*aiplatformpb.Tensorboard,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TensorboardIterator) PageInfo
func(it*TensorboardIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TensorboardRunIterator
typeTensorboardRunIteratorstruct{// 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[]*aiplatformpb.TensorboardRun,nextPageTokenstring,errerror)// contains filtered or unexported fields}TensorboardRunIterator manages a stream of *aiplatformpb.TensorboardRun.
func (*TensorboardRunIterator) All
func(it*TensorboardRunIterator)All()iter.Seq2[*aiplatformpb.TensorboardRun,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TensorboardRunIterator) Next
func(it*TensorboardRunIterator)Next()(*aiplatformpb.TensorboardRun,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TensorboardRunIterator) PageInfo
func(it*TensorboardRunIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TensorboardTimeSeriesIterator
typeTensorboardTimeSeriesIteratorstruct{// 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[]*aiplatformpb.TensorboardTimeSeries,nextPageTokenstring,errerror)// contains filtered or unexported fields}TensorboardTimeSeriesIterator manages a stream of *aiplatformpb.TensorboardTimeSeries.
func (*TensorboardTimeSeriesIterator) All
func(it*TensorboardTimeSeriesIterator)All()iter.Seq2[*aiplatformpb.TensorboardTimeSeries,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TensorboardTimeSeriesIterator) Next
func(it*TensorboardTimeSeriesIterator)Next()(*aiplatformpb.TensorboardTimeSeries,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TensorboardTimeSeriesIterator) PageInfo
func(it*TensorboardTimeSeriesIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TimeSeriesDataPointIterator
typeTimeSeriesDataPointIteratorstruct{// 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[]*aiplatformpb.TimeSeriesDataPoint,nextPageTokenstring,errerror)// contains filtered or unexported fields}TimeSeriesDataPointIterator manages a stream of *aiplatformpb.TimeSeriesDataPoint.
func (*TimeSeriesDataPointIterator) All
func(it*TimeSeriesDataPointIterator)All()iter.Seq2[*aiplatformpb.TimeSeriesDataPoint,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TimeSeriesDataPointIterator) Next
func(it*TimeSeriesDataPointIterator)Next()(*aiplatformpb.TimeSeriesDataPoint,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TimeSeriesDataPointIterator) PageInfo
func(it*TimeSeriesDataPointIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TrainingPipelineIterator
typeTrainingPipelineIteratorstruct{// 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[]*aiplatformpb.TrainingPipeline,nextPageTokenstring,errerror)// contains filtered or unexported fields}TrainingPipelineIterator manages a stream of *aiplatformpb.TrainingPipeline.
func (*TrainingPipelineIterator) All
func(it*TrainingPipelineIterator)All()iter.Seq2[*aiplatformpb.TrainingPipeline,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TrainingPipelineIterator) Next
func(it*TrainingPipelineIterator)Next()(*aiplatformpb.TrainingPipeline,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TrainingPipelineIterator) PageInfo
func(it*TrainingPipelineIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TrialIterator
typeTrialIteratorstruct{// 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[]*aiplatformpb.Trial,nextPageTokenstring,errerror)// contains filtered or unexported fields}TrialIterator manages a stream of *aiplatformpb.Trial.
func (*TrialIterator) All
func(it*TrialIterator)All()iter.Seq2[*aiplatformpb.Trial,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TrialIterator) Next
func(it*TrialIterator)Next()(*aiplatformpb.Trial,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TrialIterator) PageInfo
func(it*TrialIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TuningJobIterator
typeTuningJobIteratorstruct{// 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[]*aiplatformpb.TuningJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}TuningJobIterator manages a stream of *aiplatformpb.TuningJob.
func (*TuningJobIterator) All
func(it*TuningJobIterator)All()iter.Seq2[*aiplatformpb.TuningJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TuningJobIterator) Next
func(it*TuningJobIterator)Next()(*aiplatformpb.TuningJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TuningJobIterator) PageInfo
func(it*TuningJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UndeployIndexOperation
typeUndeployIndexOperationstruct{// contains filtered or unexported fields}UndeployIndexOperation manages a long-running operation from UndeployIndex.
func (*UndeployIndexOperation) Done
func(op*UndeployIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UndeployIndexOperation) Metadata
func(op*UndeployIndexOperation)Metadata()(*aiplatformpb.UndeployIndexOperationMetadata,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 (*UndeployIndexOperation) Name
func(op*UndeployIndexOperation)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 (*UndeployIndexOperation) Poll
func(op*UndeployIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UndeployIndexResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployIndexOperation) Wait
func(op*UndeployIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UndeployIndexResponse,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.
UndeployModelOperation
typeUndeployModelOperationstruct{// contains filtered or unexported fields}UndeployModelOperation manages a long-running operation from UndeployModel.
func (*UndeployModelOperation) Done
func(op*UndeployModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UndeployModelOperation) Metadata
func(op*UndeployModelOperation)Metadata()(*aiplatformpb.UndeployModelOperationMetadata,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 (*UndeployModelOperation) Name
func(op*UndeployModelOperation)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 (*UndeployModelOperation) Poll
func(op*UndeployModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UndeployModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployModelOperation) Wait
func(op*UndeployModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UndeployModelResponse,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.
UpdateDeploymentResourcePoolOperation
typeUpdateDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}UpdateDeploymentResourcePoolOperation manages a long-running operation from UpdateDeploymentResourcePool.
func (*UpdateDeploymentResourcePoolOperation) Done
func(op*UpdateDeploymentResourcePoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateDeploymentResourcePoolOperation) Metadata
func(op*UpdateDeploymentResourcePoolOperation)Metadata()(*aiplatformpb.UpdateDeploymentResourcePoolOperationMetadata,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 (*UpdateDeploymentResourcePoolOperation) Name
func(op*UpdateDeploymentResourcePoolOperation)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 (*UpdateDeploymentResourcePoolOperation) Poll
func(op*UpdateDeploymentResourcePoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeploymentResourcePool,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateDeploymentResourcePoolOperation) Wait
func(op*UpdateDeploymentResourcePoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.DeploymentResourcePool,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.
UpdateEndpointLongRunningOperation
typeUpdateEndpointLongRunningOperationstruct{// contains filtered or unexported fields}UpdateEndpointLongRunningOperation manages a long-running operation from UpdateEndpointLongRunning.
func (*UpdateEndpointLongRunningOperation) Done
func(op*UpdateEndpointLongRunningOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateEndpointLongRunningOperation) Metadata
func(op*UpdateEndpointLongRunningOperation)Metadata()(*aiplatformpb.UpdateEndpointOperationMetadata,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 (*UpdateEndpointLongRunningOperation) Name
func(op*UpdateEndpointLongRunningOperation)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 (*UpdateEndpointLongRunningOperation) Poll
func(op*UpdateEndpointLongRunningOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Endpoint,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateEndpointLongRunningOperation) Wait
func(op*UpdateEndpointLongRunningOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Endpoint,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.
UpdateExplanationDatasetOperation
typeUpdateExplanationDatasetOperationstruct{// contains filtered or unexported fields}UpdateExplanationDatasetOperation manages a long-running operation from UpdateExplanationDataset.
func (*UpdateExplanationDatasetOperation) Done
func(op*UpdateExplanationDatasetOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateExplanationDatasetOperation) Metadata
func(op*UpdateExplanationDatasetOperation)Metadata()(*aiplatformpb.UpdateExplanationDatasetOperationMetadata,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 (*UpdateExplanationDatasetOperation) Name
func(op*UpdateExplanationDatasetOperation)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 (*UpdateExplanationDatasetOperation) Poll
func(op*UpdateExplanationDatasetOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UpdateExplanationDatasetResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateExplanationDatasetOperation) Wait
func(op*UpdateExplanationDatasetOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UpdateExplanationDatasetResponse,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.
UpdateFeatureGroupOperation
typeUpdateFeatureGroupOperationstruct{// contains filtered or unexported fields}UpdateFeatureGroupOperation manages a long-running operation from UpdateFeatureGroup.
func (*UpdateFeatureGroupOperation) Done
func(op*UpdateFeatureGroupOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateFeatureGroupOperation) Metadata
func(op*UpdateFeatureGroupOperation)Metadata()(*aiplatformpb.UpdateFeatureGroupOperationMetadata,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 (*UpdateFeatureGroupOperation) Name
func(op*UpdateFeatureGroupOperation)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 (*UpdateFeatureGroupOperation) Poll
func(op*UpdateFeatureGroupOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureGroup,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateFeatureGroupOperation) Wait
func(op*UpdateFeatureGroupOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureGroup,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.
UpdateFeatureOnlineStoreOperation
typeUpdateFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}UpdateFeatureOnlineStoreOperation manages a long-running operation from UpdateFeatureOnlineStore.
func (*UpdateFeatureOnlineStoreOperation) Done
func(op*UpdateFeatureOnlineStoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateFeatureOnlineStoreOperation) Metadata
func(op*UpdateFeatureOnlineStoreOperation)Metadata()(*aiplatformpb.UpdateFeatureOnlineStoreOperationMetadata,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 (*UpdateFeatureOnlineStoreOperation) Name
func(op*UpdateFeatureOnlineStoreOperation)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 (*UpdateFeatureOnlineStoreOperation) Poll
func(op*UpdateFeatureOnlineStoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureOnlineStore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateFeatureOnlineStoreOperation) Wait
func(op*UpdateFeatureOnlineStoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureOnlineStore,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.
UpdateFeatureOperation
typeUpdateFeatureOperationstruct{// contains filtered or unexported fields}UpdateFeatureOperation manages a long-running operation from UpdateFeature.
func (*UpdateFeatureOperation) Done
func(op*UpdateFeatureOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateFeatureOperation) Metadata
func(op*UpdateFeatureOperation)Metadata()(*aiplatformpb.UpdateFeatureOperationMetadata,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 (*UpdateFeatureOperation) Name
func(op*UpdateFeatureOperation)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 (*UpdateFeatureOperation) Poll
func(op*UpdateFeatureOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Feature,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateFeatureOperation) Wait
func(op*UpdateFeatureOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Feature,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.
UpdateFeatureViewOperation
typeUpdateFeatureViewOperationstruct{// contains filtered or unexported fields}UpdateFeatureViewOperation manages a long-running operation from UpdateFeatureView.
func (*UpdateFeatureViewOperation) Done
func(op*UpdateFeatureViewOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateFeatureViewOperation) Metadata
func(op*UpdateFeatureViewOperation)Metadata()(*aiplatformpb.UpdateFeatureViewOperationMetadata,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 (*UpdateFeatureViewOperation) Name
func(op*UpdateFeatureViewOperation)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 (*UpdateFeatureViewOperation) Poll
func(op*UpdateFeatureViewOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureView,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateFeatureViewOperation) Wait
func(op*UpdateFeatureViewOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.FeatureView,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.
UpdateFeaturestoreOperation
typeUpdateFeaturestoreOperationstruct{// contains filtered or unexported fields}UpdateFeaturestoreOperation manages a long-running operation from UpdateFeaturestore.
func (*UpdateFeaturestoreOperation) Done
func(op*UpdateFeaturestoreOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateFeaturestoreOperation) Metadata
func(op*UpdateFeaturestoreOperation)Metadata()(*aiplatformpb.UpdateFeaturestoreOperationMetadata,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 (*UpdateFeaturestoreOperation) Name
func(op*UpdateFeaturestoreOperation)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 (*UpdateFeaturestoreOperation) Poll
func(op*UpdateFeaturestoreOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Featurestore,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateFeaturestoreOperation) Wait
func(op*UpdateFeaturestoreOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Featurestore,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.
UpdateIndexOperation
typeUpdateIndexOperationstruct{// contains filtered or unexported fields}UpdateIndexOperation manages a long-running operation from UpdateIndex.
func (*UpdateIndexOperation) Done
func(op*UpdateIndexOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateIndexOperation) Metadata
func(op*UpdateIndexOperation)Metadata()(*aiplatformpb.UpdateIndexOperationMetadata,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 (*UpdateIndexOperation) Name
func(op*UpdateIndexOperation)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 (*UpdateIndexOperation) Poll
func(op*UpdateIndexOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Index,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateIndexOperation) Wait
func(op*UpdateIndexOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Index,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.
UpdateModelDeploymentMonitoringJobOperation
typeUpdateModelDeploymentMonitoringJobOperationstruct{// contains filtered or unexported fields}UpdateModelDeploymentMonitoringJobOperation manages a long-running operation from UpdateModelDeploymentMonitoringJob.
func (*UpdateModelDeploymentMonitoringJobOperation) Done
func(op*UpdateModelDeploymentMonitoringJobOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateModelDeploymentMonitoringJobOperation) Metadata
func(op*UpdateModelDeploymentMonitoringJobOperation)Metadata()(*aiplatformpb.UpdateModelDeploymentMonitoringJobOperationMetadata,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 (*UpdateModelDeploymentMonitoringJobOperation) Name
func(op*UpdateModelDeploymentMonitoringJobOperation)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 (*UpdateModelDeploymentMonitoringJobOperation) Poll
func(op*UpdateModelDeploymentMonitoringJobOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ModelDeploymentMonitoringJob,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateModelDeploymentMonitoringJobOperation) Wait
func(op*UpdateModelDeploymentMonitoringJobOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ModelDeploymentMonitoringJob,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.
UpdatePersistentResourceOperation
typeUpdatePersistentResourceOperationstruct{// contains filtered or unexported fields}UpdatePersistentResourceOperation manages a long-running operation from UpdatePersistentResource.
func (*UpdatePersistentResourceOperation) Done
func(op*UpdatePersistentResourceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdatePersistentResourceOperation) Metadata
func(op*UpdatePersistentResourceOperation)Metadata()(*aiplatformpb.UpdatePersistentResourceOperationMetadata,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 (*UpdatePersistentResourceOperation) Name
func(op*UpdatePersistentResourceOperation)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 (*UpdatePersistentResourceOperation) Poll
func(op*UpdatePersistentResourceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdatePersistentResourceOperation) Wait
func(op*UpdatePersistentResourceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.PersistentResource,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.
UpdateRagCorpusOperation
typeUpdateRagCorpusOperationstruct{// contains filtered or unexported fields}UpdateRagCorpusOperation manages a long-running operation from UpdateRagCorpus.
func (*UpdateRagCorpusOperation) Done
func(op*UpdateRagCorpusOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateRagCorpusOperation) Metadata
func(op*UpdateRagCorpusOperation)Metadata()(*aiplatformpb.UpdateRagCorpusOperationMetadata,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 (*UpdateRagCorpusOperation) Name
func(op*UpdateRagCorpusOperation)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 (*UpdateRagCorpusOperation) Poll
func(op*UpdateRagCorpusOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagCorpus,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRagCorpusOperation) Wait
func(op*UpdateRagCorpusOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagCorpus,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.
UpdateRagEngineConfigOperation
typeUpdateRagEngineConfigOperationstruct{// contains filtered or unexported fields}UpdateRagEngineConfigOperation manages a long-running operation from UpdateRagEngineConfig.
func (*UpdateRagEngineConfigOperation) Done
func(op*UpdateRagEngineConfigOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateRagEngineConfigOperation) Metadata
func(op*UpdateRagEngineConfigOperation)Metadata()(*aiplatformpb.UpdateRagEngineConfigOperationMetadata,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 (*UpdateRagEngineConfigOperation) Name
func(op*UpdateRagEngineConfigOperation)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 (*UpdateRagEngineConfigOperation) Poll
func(op*UpdateRagEngineConfigOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagEngineConfig,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateRagEngineConfigOperation) Wait
func(op*UpdateRagEngineConfigOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.RagEngineConfig,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.
UpdateReasoningEngineOperation
typeUpdateReasoningEngineOperationstruct{// contains filtered or unexported fields}UpdateReasoningEngineOperation manages a long-running operation from UpdateReasoningEngine.
func (*UpdateReasoningEngineOperation) Done
func(op*UpdateReasoningEngineOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateReasoningEngineOperation) Metadata
func(op*UpdateReasoningEngineOperation)Metadata()(*aiplatformpb.UpdateReasoningEngineOperationMetadata,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 (*UpdateReasoningEngineOperation) Name
func(op*UpdateReasoningEngineOperation)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 (*UpdateReasoningEngineOperation) Poll
func(op*UpdateReasoningEngineOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ReasoningEngine,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateReasoningEngineOperation) Wait
func(op*UpdateReasoningEngineOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.ReasoningEngine,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.
UpdateSpecialistPoolOperation
typeUpdateSpecialistPoolOperationstruct{// contains filtered or unexported fields}UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool.
func (*UpdateSpecialistPoolOperation) Done
func(op*UpdateSpecialistPoolOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateSpecialistPoolOperation) Metadata
func(op*UpdateSpecialistPoolOperation)Metadata()(*aiplatformpb.UpdateSpecialistPoolOperationMetadata,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 (*UpdateSpecialistPoolOperation) Name
func(op*UpdateSpecialistPoolOperation)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 (*UpdateSpecialistPoolOperation) Poll
func(op*UpdateSpecialistPoolOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SpecialistPool,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateSpecialistPoolOperation) Wait
func(op*UpdateSpecialistPoolOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.SpecialistPool,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.
UpdateTensorboardOperation
typeUpdateTensorboardOperationstruct{// contains filtered or unexported fields}UpdateTensorboardOperation manages a long-running operation from UpdateTensorboard.
func (*UpdateTensorboardOperation) Done
func(op*UpdateTensorboardOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateTensorboardOperation) Metadata
func(op*UpdateTensorboardOperation)Metadata()(*aiplatformpb.UpdateTensorboardOperationMetadata,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 (*UpdateTensorboardOperation) Name
func(op*UpdateTensorboardOperation)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 (*UpdateTensorboardOperation) Poll
func(op*UpdateTensorboardOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Tensorboard,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateTensorboardOperation) Wait
func(op*UpdateTensorboardOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.Tensorboard,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.
UpgradeNotebookRuntimeOperation
typeUpgradeNotebookRuntimeOperationstruct{// contains filtered or unexported fields}UpgradeNotebookRuntimeOperation manages a long-running operation from UpgradeNotebookRuntime.
func (*UpgradeNotebookRuntimeOperation) Done
func(op*UpgradeNotebookRuntimeOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpgradeNotebookRuntimeOperation) Metadata
func(op*UpgradeNotebookRuntimeOperation)Metadata()(*aiplatformpb.UpgradeNotebookRuntimeOperationMetadata,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 (*UpgradeNotebookRuntimeOperation) Name
func(op*UpgradeNotebookRuntimeOperation)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 (*UpgradeNotebookRuntimeOperation) Poll
func(op*UpgradeNotebookRuntimeOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UpgradeNotebookRuntimeResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpgradeNotebookRuntimeOperation) Wait
func(op*UpgradeNotebookRuntimeOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UpgradeNotebookRuntimeResponse,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.
UploadModelOperation
typeUploadModelOperationstruct{// contains filtered or unexported fields}UploadModelOperation manages a long-running operation from UploadModel.
func (*UploadModelOperation) Done
func(op*UploadModelOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UploadModelOperation) Metadata
func(op*UploadModelOperation)Metadata()(*aiplatformpb.UploadModelOperationMetadata,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 (*UploadModelOperation) Name
func(op*UploadModelOperation)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 (*UploadModelOperation) Poll
func(op*UploadModelOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UploadModelResponse,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UploadModelOperation) Wait
func(op*UploadModelOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*aiplatformpb.UploadModelResponse,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.
VertexRagCallOptions
typeVertexRagCallOptionsstruct{RetrieveContexts[]gax.CallOptionAugmentPrompt[]gax.CallOptionCorroborateContent[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}VertexRagCallOptions contains the retry settings for each method of VertexRagClient.
VertexRagClient
typeVertexRagClientstruct{// The call options for this service.CallOptions*VertexRagCallOptions// contains filtered or unexported fields}VertexRagClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for retrieving relevant contexts.
func NewVertexRagClient
funcNewVertexRagClient(ctxcontext.Context,opts...option.ClientOption)(*VertexRagClient,error)NewVertexRagClient creates a new vertex rag service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for retrieving relevant contexts.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*VertexRagClient) AugmentPrompt
func(c*VertexRagClient)AugmentPrompt(ctxcontext.Context,req*aiplatformpb.AugmentPromptRequest,opts...gax.CallOption)(*aiplatformpb.AugmentPromptResponse,error)AugmentPrompt given an input prompt, it returns augmented prompt from vertex rag storeto guide LLM towards generating grounded responses.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AugmentPromptRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AugmentPromptRequest.}resp,err:=c.AugmentPrompt(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) CancelOperation
func(c*VertexRagClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) Close
func(c*VertexRagClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*VertexRagClient) Connection (deprecated)
func(c*VertexRagClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*VertexRagClient) CorroborateContent
func(c*VertexRagClient)CorroborateContent(ctxcontext.Context,req*aiplatformpb.CorroborateContentRequest,opts...gax.CallOption)(*aiplatformpb.CorroborateContentResponse,error)CorroborateContent given an input text, it returns a score that evaluates the factuality ofthe text. It also extracts and returns claims from the text and providessupporting facts.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CorroborateContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CorroborateContentRequest.}resp,err:=c.CorroborateContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) DeleteOperation
func(c*VertexRagClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) GetIamPolicy
func(c*VertexRagClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) GetLocation
func(c*VertexRagClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) GetOperation
func(c*VertexRagClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) ListLocations
func(c*VertexRagClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) ListOperations
func(c*VertexRagClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(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 (*VertexRagClient) RetrieveContexts
func(c*VertexRagClient)RetrieveContexts(ctxcontext.Context,req*aiplatformpb.RetrieveContextsRequest,opts...gax.CallOption)(*aiplatformpb.RetrieveContextsResponse,error)RetrieveContexts retrieves relevant contexts for a query.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.RetrieveContextsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#RetrieveContextsRequest.}resp,err:=c.RetrieveContexts(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) SetIamPolicy
func(c*VertexRagClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) TestIamPermissions
func(c*VertexRagClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagClient) WaitOperation
func(c*VertexRagClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}VertexRagDataCallOptions
typeVertexRagDataCallOptionsstruct{CreateRagCorpus[]gax.CallOptionUpdateRagCorpus[]gax.CallOptionGetRagCorpus[]gax.CallOptionListRagCorpora[]gax.CallOptionDeleteRagCorpus[]gax.CallOptionUploadRagFile[]gax.CallOptionImportRagFiles[]gax.CallOptionGetRagFile[]gax.CallOptionListRagFiles[]gax.CallOptionDeleteRagFile[]gax.CallOptionUpdateRagEngineConfig[]gax.CallOptionGetRagEngineConfig[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}VertexRagDataCallOptions contains the retry settings for each method of VertexRagDataClient.
VertexRagDataClient
typeVertexRagDataClientstruct{// The call options for this service.CallOptions*VertexRagDataCallOptions// 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}VertexRagDataClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing user data for RAG.
func NewVertexRagDataClient
funcNewVertexRagDataClient(ctxcontext.Context,opts...option.ClientOption)(*VertexRagDataClient,error)NewVertexRagDataClient creates a new vertex rag data service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing user data for RAG.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*VertexRagDataClient) CancelOperation
func(c*VertexRagDataClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) Close
func(c*VertexRagDataClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*VertexRagDataClient) Connection (deprecated)
func(c*VertexRagDataClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*VertexRagDataClient) CreateRagCorpus
func(c*VertexRagDataClient)CreateRagCorpus(ctxcontext.Context,req*aiplatformpb.CreateRagCorpusRequest,opts...gax.CallOption)(*CreateRagCorpusOperation,error)CreateRagCorpus creates a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateRagCorpusRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateRagCorpusRequest.}op,err:=c.CreateRagCorpus(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) CreateRagCorpusOperation
func(c*VertexRagDataClient)CreateRagCorpusOperation(namestring)*CreateRagCorpusOperationCreateRagCorpusOperation returns a new CreateRagCorpusOperation from a given name.The name must be that of a previously created CreateRagCorpusOperation, possibly from a different process.
func (*VertexRagDataClient) DeleteOperation
func(c*VertexRagDataClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) DeleteRagCorpus
func(c*VertexRagDataClient)DeleteRagCorpus(ctxcontext.Context,req*aiplatformpb.DeleteRagCorpusRequest,opts...gax.CallOption)(*DeleteRagCorpusOperation,error)DeleteRagCorpus deletes a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteRagCorpusRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteRagCorpusRequest.}op,err:=c.DeleteRagCorpus(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*VertexRagDataClient) DeleteRagCorpusOperation
func(c*VertexRagDataClient)DeleteRagCorpusOperation(namestring)*DeleteRagCorpusOperationDeleteRagCorpusOperation returns a new DeleteRagCorpusOperation from a given name.The name must be that of a previously created DeleteRagCorpusOperation, possibly from a different process.
func (*VertexRagDataClient) DeleteRagFile
func(c*VertexRagDataClient)DeleteRagFile(ctxcontext.Context,req*aiplatformpb.DeleteRagFileRequest,opts...gax.CallOption)(*DeleteRagFileOperation,error)DeleteRagFile deletes a RagFile.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteRagFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteRagFileRequest.}op,err:=c.DeleteRagFile(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*VertexRagDataClient) DeleteRagFileOperation
func(c*VertexRagDataClient)DeleteRagFileOperation(namestring)*DeleteRagFileOperationDeleteRagFileOperation returns a new DeleteRagFileOperation from a given name.The name must be that of a previously created DeleteRagFileOperation, possibly from a different process.
func (*VertexRagDataClient) GetIamPolicy
func(c*VertexRagDataClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) GetLocation
func(c*VertexRagDataClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) GetOperation
func(c*VertexRagDataClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) GetRagCorpus
func(c*VertexRagDataClient)GetRagCorpus(ctxcontext.Context,req*aiplatformpb.GetRagCorpusRequest,opts...gax.CallOption)(*aiplatformpb.RagCorpus,error)GetRagCorpus gets a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetRagCorpusRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetRagCorpusRequest.}resp,err:=c.GetRagCorpus(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) GetRagEngineConfig
func(c*VertexRagDataClient)GetRagEngineConfig(ctxcontext.Context,req*aiplatformpb.GetRagEngineConfigRequest,opts...gax.CallOption)(*aiplatformpb.RagEngineConfig,error)GetRagEngineConfig gets a RagEngineConfig.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetRagEngineConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetRagEngineConfigRequest.}resp,err:=c.GetRagEngineConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) GetRagFile
func(c*VertexRagDataClient)GetRagFile(ctxcontext.Context,req*aiplatformpb.GetRagFileRequest,opts...gax.CallOption)(*aiplatformpb.RagFile,error)GetRagFile gets a RagFile.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetRagFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetRagFileRequest.}resp,err:=c.GetRagFile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) ImportRagFiles
func(c*VertexRagDataClient)ImportRagFiles(ctxcontext.Context,req*aiplatformpb.ImportRagFilesRequest,opts...gax.CallOption)(*ImportRagFilesOperation,error)ImportRagFiles import files from Google Cloud Storage or Google Drive into a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ImportRagFilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ImportRagFilesRequest.}op,err:=c.ImportRagFiles(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) ImportRagFilesOperation
func(c*VertexRagDataClient)ImportRagFilesOperation(namestring)*ImportRagFilesOperationImportRagFilesOperation returns a new ImportRagFilesOperation from a given name.The name must be that of a previously created ImportRagFilesOperation, possibly from a different process.
func (*VertexRagDataClient) ListLocations
func(c*VertexRagDataClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) ListOperations
func(c*VertexRagDataClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(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 (*VertexRagDataClient) ListRagCorpora
func(c*VertexRagDataClient)ListRagCorpora(ctxcontext.Context,req*aiplatformpb.ListRagCorporaRequest,opts...gax.CallOption)*RagCorpusIteratorListRagCorpora lists RagCorpora in a Location.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListRagCorporaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListRagCorporaRequest.}it:=c.ListRagCorpora(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.(*aiplatformpb.ListRagCorporaResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListRagCorporaRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListRagCorporaRequest.}forresp,err:=rangec.ListRagCorpora(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*VertexRagDataClient) ListRagFiles
func(c*VertexRagDataClient)ListRagFiles(ctxcontext.Context,req*aiplatformpb.ListRagFilesRequest,opts...gax.CallOption)*RagFileIteratorListRagFiles lists RagFiles in a RagCorpus.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListRagFilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListRagFilesRequest.}it:=c.ListRagFiles(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.(*aiplatformpb.ListRagFilesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListRagFilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListRagFilesRequest.}forresp,err:=rangec.ListRagFiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*VertexRagDataClient) SetIamPolicy
func(c*VertexRagDataClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) TestIamPermissions
func(c*VertexRagDataClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) UpdateRagCorpus
func(c*VertexRagDataClient)UpdateRagCorpus(ctxcontext.Context,req*aiplatformpb.UpdateRagCorpusRequest,opts...gax.CallOption)(*UpdateRagCorpusOperation,error)UpdateRagCorpus updates a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateRagCorpusRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateRagCorpusRequest.}op,err:=c.UpdateRagCorpus(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) UpdateRagCorpusOperation
func(c*VertexRagDataClient)UpdateRagCorpusOperation(namestring)*UpdateRagCorpusOperationUpdateRagCorpusOperation returns a new UpdateRagCorpusOperation from a given name.The name must be that of a previously created UpdateRagCorpusOperation, possibly from a different process.
func (*VertexRagDataClient) UpdateRagEngineConfig
func(c*VertexRagDataClient)UpdateRagEngineConfig(ctxcontext.Context,req*aiplatformpb.UpdateRagEngineConfigRequest,opts...gax.CallOption)(*UpdateRagEngineConfigOperation,error)UpdateRagEngineConfig updates a RagEngineConfig.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UpdateRagEngineConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UpdateRagEngineConfigRequest.}op,err:=c.UpdateRagEngineConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) UpdateRagEngineConfigOperation
func(c*VertexRagDataClient)UpdateRagEngineConfigOperation(namestring)*UpdateRagEngineConfigOperationUpdateRagEngineConfigOperation returns a new UpdateRagEngineConfigOperation from a given name.The name must be that of a previously created UpdateRagEngineConfigOperation, possibly from a different process.
func (*VertexRagDataClient) UploadRagFile
func(c*VertexRagDataClient)UploadRagFile(ctxcontext.Context,req*aiplatformpb.UploadRagFileRequest,opts...gax.CallOption)(*aiplatformpb.UploadRagFileResponse,error)UploadRagFile upload a file into a RagCorpus.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.UploadRagFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#UploadRagFileRequest.}resp,err:=c.UploadRagFile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VertexRagDataClient) WaitOperation
func(c*VertexRagDataClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVertexRagDataClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}VizierCallOptions
typeVizierCallOptionsstruct{CreateStudy[]gax.CallOptionGetStudy[]gax.CallOptionListStudies[]gax.CallOptionDeleteStudy[]gax.CallOptionLookupStudy[]gax.CallOptionSuggestTrials[]gax.CallOptionCreateTrial[]gax.CallOptionGetTrial[]gax.CallOptionListTrials[]gax.CallOptionAddTrialMeasurement[]gax.CallOptionCompleteTrial[]gax.CallOptionDeleteTrial[]gax.CallOptionCheckTrialEarlyStoppingState[]gax.CallOptionStopTrial[]gax.CallOptionListOptimalTrials[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOptionWaitOperation[]gax.CallOption}VizierCallOptions contains the retry settings for each method of VizierClient.
VizierClient
typeVizierClientstruct{// The call options for this service.CallOptions*VizierCallOptions// 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}VizierClient is a client for interacting with Vertex AI API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Vertex AI Vizier API.
Vertex AI Vizier is a service to solve blackbox optimization problems,such as tuning machine learning hyperparameters and searching over deeplearning architectures.
func NewVizierClient
funcNewVizierClient(ctxcontext.Context,opts...option.ClientOption)(*VizierClient,error)NewVizierClient creates a new vizier service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Vertex AI Vizier API.
Vertex AI Vizier is a service to solve blackbox optimization problems,such as tuning machine learning hyperparameters and searching over deeplearning architectures.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*VizierClient) AddTrialMeasurement
func(c*VizierClient)AddTrialMeasurement(ctxcontext.Context,req*aiplatformpb.AddTrialMeasurementRequest,opts...gax.CallOption)(*aiplatformpb.Trial,error)AddTrialMeasurement adds a measurement of the objective metrics to a Trial. This measurementis assumed to have been taken before the Trial is complete.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.AddTrialMeasurementRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#AddTrialMeasurementRequest.}resp,err:=c.AddTrialMeasurement(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) CancelOperation
func(c*VizierClient)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) CheckTrialEarlyStoppingState
func(c*VizierClient)CheckTrialEarlyStoppingState(ctxcontext.Context,req*aiplatformpb.CheckTrialEarlyStoppingStateRequest,opts...gax.CallOption)(*CheckTrialEarlyStoppingStateOperation,error)CheckTrialEarlyStoppingState checks whether a Trial should stop or not. Returns along-running operation. When the operation is successful,it will contain aCheckTrialEarlyStoppingStateResponse.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CheckTrialEarlyStoppingStateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CheckTrialEarlyStoppingStateRequest.}op,err:=c.CheckTrialEarlyStoppingState(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) CheckTrialEarlyStoppingStateOperation
func(c*VizierClient)CheckTrialEarlyStoppingStateOperation(namestring)*CheckTrialEarlyStoppingStateOperationCheckTrialEarlyStoppingStateOperation returns a new CheckTrialEarlyStoppingStateOperation from a given name.The name must be that of a previously created CheckTrialEarlyStoppingStateOperation, possibly from a different process.
func (*VizierClient) Close
func(c*VizierClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*VizierClient) CompleteTrial
func(c*VizierClient)CompleteTrial(ctxcontext.Context,req*aiplatformpb.CompleteTrialRequest,opts...gax.CallOption)(*aiplatformpb.Trial,error)CompleteTrial marks a Trial as complete.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CompleteTrialRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CompleteTrialRequest.}resp,err:=c.CompleteTrial(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) Connection (deprecated)
func(c*VizierClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*VizierClient) CreateStudy
func(c*VizierClient)CreateStudy(ctxcontext.Context,req*aiplatformpb.CreateStudyRequest,opts...gax.CallOption)(*aiplatformpb.Study,error)CreateStudy creates a Study. A resource name will be generated after creation of theStudy.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateStudyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateStudyRequest.}resp,err:=c.CreateStudy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) CreateTrial
func(c*VizierClient)CreateTrial(ctxcontext.Context,req*aiplatformpb.CreateTrialRequest,opts...gax.CallOption)(*aiplatformpb.Trial,error)CreateTrial adds a user provided Trial to a Study.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.CreateTrialRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTrialRequest.}resp,err:=c.CreateTrial(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) DeleteOperation
func(c*VizierClient)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) DeleteStudy
func(c*VizierClient)DeleteStudy(ctxcontext.Context,req*aiplatformpb.DeleteStudyRequest,opts...gax.CallOption)errorDeleteStudy deletes a Study.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteStudyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteStudyRequest.}err=c.DeleteStudy(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*VizierClient) DeleteTrial
func(c*VizierClient)DeleteTrial(ctxcontext.Context,req*aiplatformpb.DeleteTrialRequest,opts...gax.CallOption)errorDeleteTrial deletes a Trial.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.DeleteTrialRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#DeleteTrialRequest.}err=c.DeleteTrial(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*VizierClient) GetIamPolicy
func(c*VizierClient)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) GetLocation
func(c*VizierClient)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) GetOperation
func(c*VizierClient)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) GetStudy
func(c*VizierClient)GetStudy(ctxcontext.Context,req*aiplatformpb.GetStudyRequest,opts...gax.CallOption)(*aiplatformpb.Study,error)GetStudy gets a Study by name.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetStudyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetStudyRequest.}resp,err:=c.GetStudy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) GetTrial
func(c*VizierClient)GetTrial(ctxcontext.Context,req*aiplatformpb.GetTrialRequest,opts...gax.CallOption)(*aiplatformpb.Trial,error)GetTrial gets a Trial.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.GetTrialRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTrialRequest.}resp,err:=c.GetTrial(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) ListLocations
func(c*VizierClient)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) ListOperations
func(c*VizierClient)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(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 (*VizierClient) ListOptimalTrials
func(c*VizierClient)ListOptimalTrials(ctxcontext.Context,req*aiplatformpb.ListOptimalTrialsRequest,opts...gax.CallOption)(*aiplatformpb.ListOptimalTrialsResponse,error)ListOptimalTrials lists the pareto-optimal Trials for multi-objective Study or theoptimal Trials for single-objective Study. The definition ofpareto-optimal can be checked in wiki page.https://en.wikipedia.org/wiki/Pareto_efficiency (athttps://en.wikipedia.org/wiki/Pareto_efficiency)
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListOptimalTrialsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListOptimalTrialsRequest.}resp,err:=c.ListOptimalTrials(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) ListStudies
func(c*VizierClient)ListStudies(ctxcontext.Context,req*aiplatformpb.ListStudiesRequest,opts...gax.CallOption)*StudyIteratorListStudies lists all the studies in a region for an associated project.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListStudiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListStudiesRequest.}it:=c.ListStudies(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.(*aiplatformpb.ListStudiesResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListStudiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListStudiesRequest.}forresp,err:=rangec.ListStudies(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*VizierClient) ListTrials
func(c*VizierClient)ListTrials(ctxcontext.Context,req*aiplatformpb.ListTrialsRequest,opts...gax.CallOption)*TrialIteratorListTrials lists the Trials associated with a Study.
Examples
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb""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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTrialsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTrialsRequest.}it:=c.ListTrials(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.(*aiplatformpb.ListTrialsResponse)}}all
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.ListTrialsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTrialsRequest.}forresp,err:=rangec.ListTrials(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*VizierClient) LookupStudy
func(c*VizierClient)LookupStudy(ctxcontext.Context,req*aiplatformpb.LookupStudyRequest,opts...gax.CallOption)(*aiplatformpb.Study,error)LookupStudy looks a study up using the user-defined display_name field instead of thefully qualified resource name.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.LookupStudyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#LookupStudyRequest.}resp,err:=c.LookupStudy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) SetIamPolicy
func(c*VizierClient)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) StopTrial
func(c*VizierClient)StopTrial(ctxcontext.Context,req*aiplatformpb.StopTrialRequest,opts...gax.CallOption)(*aiplatformpb.Trial,error)StopTrial stops a Trial.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.StopTrialRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#StopTrialRequest.}resp,err:=c.StopTrial(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) SuggestTrials
func(c*VizierClient)SuggestTrials(ctxcontext.Context,req*aiplatformpb.SuggestTrialsRequest,opts...gax.CallOption)(*SuggestTrialsOperation,error)SuggestTrials adds one or more Trials to a Study, with parameter valuessuggested by Vertex AI Vizier. Returns a long-runningoperation associated with the generation of Trial suggestions.When this long-running operation succeeds, it will containaSuggestTrialsResponse.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"aiplatformpb"cloud.google.com/go/aiplatform/apiv1/aiplatformpb")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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&aiplatformpb.SuggestTrialsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#SuggestTrialsRequest.}op,err:=c.SuggestTrials(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) SuggestTrialsOperation
func(c*VizierClient)SuggestTrialsOperation(namestring)*SuggestTrialsOperationSuggestTrialsOperation returns a new SuggestTrialsOperation from a given name.The name must be that of a previously created SuggestTrialsOperation, possibly from a different process.
func (*VizierClient) TestIamPermissions
func(c*VizierClient)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VizierClient) WaitOperation
func(c*VizierClient)WaitOperation(ctxcontext.Context,req*longrunningpb.WaitOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)WaitOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"aiplatform"cloud.google.com/go/aiplatform/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:=aiplatform.NewVizierClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.WaitOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest.}resp,err:=c.WaitOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}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.