Vertex AI API v1 - Package cloud.google.com/go/aiplatform/apiv1 (v1.108.0)

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

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:

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

DefaultAuthScopes 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

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

PageInfo 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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*AssignNotebookRuntimeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*AssignNotebookRuntimeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*AssignNotebookRuntimeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*AssignNotebookRuntimeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

BatchCancelPipelineJobsOperation

typeBatchCancelPipelineJobsOperationstruct{// contains filtered or unexported fields}

BatchCancelPipelineJobsOperation manages a long-running operation from BatchCancelPipelineJobs.

func (*BatchCancelPipelineJobsOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchCancelPipelineJobsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchCancelPipelineJobsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchCancelPipelineJobsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchCancelPipelineJobsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

BatchCreateFeaturesOperation

typeBatchCreateFeaturesOperationstruct{// contains filtered or unexported fields}

BatchCreateFeaturesOperation manages a long-running operation from BatchCreateFeatures.

func (*BatchCreateFeaturesOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchCreateFeaturesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchCreateFeaturesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchCreateFeaturesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchCreateFeaturesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

BatchDeletePipelineJobsOperation

typeBatchDeletePipelineJobsOperationstruct{// contains filtered or unexported fields}

BatchDeletePipelineJobsOperation manages a long-running operation from BatchDeletePipelineJobs.

func (*BatchDeletePipelineJobsOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchDeletePipelineJobsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchDeletePipelineJobsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchDeletePipelineJobsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchDeletePipelineJobsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

BatchMigrateResourcesOperation

typeBatchMigrateResourcesOperationstruct{// contains filtered or unexported fields}

BatchMigrateResourcesOperation manages a long-running operation from BatchMigrateResources.

func (*BatchMigrateResourcesOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchMigrateResourcesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchMigrateResourcesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchMigrateResourcesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchMigrateResourcesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*BatchReadFeatureValuesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchReadFeatureValuesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchReadFeatureValuesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchReadFeatureValuesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*CheckTrialEarlyStoppingStateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CheckTrialEarlyStoppingStateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CheckTrialEarlyStoppingStateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CheckTrialEarlyStoppingStateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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()bool

Done reports whether the long-running operation has completed.

func (*CopyModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CopyModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CopyModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CopyModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateDatasetOperation

typeCreateDatasetOperationstruct{// contains filtered or unexported fields}

CreateDatasetOperation manages a long-running operation from CreateDataset.

func (*CreateDatasetOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateDatasetOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateDatasetOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateDatasetOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateDatasetOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateDatasetVersionOperation

typeCreateDatasetVersionOperationstruct{// contains filtered or unexported fields}

CreateDatasetVersionOperation manages a long-running operation from CreateDatasetVersion.

func (*CreateDatasetVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateDatasetVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateDatasetVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateDatasetVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateDatasetVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateDeploymentResourcePoolOperation

typeCreateDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}

CreateDeploymentResourcePoolOperation manages a long-running operation from CreateDeploymentResourcePool.

func (*CreateDeploymentResourcePoolOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateDeploymentResourcePoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateDeploymentResourcePoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateDeploymentResourcePoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateDeploymentResourcePoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateEndpointOperation

typeCreateEndpointOperationstruct{// contains filtered or unexported fields}

CreateEndpointOperation manages a long-running operation from CreateEndpoint.

func (*CreateEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateEndpointOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateEndpointOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateEndpointOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateEndpointOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateEntityTypeOperation

typeCreateEntityTypeOperationstruct{// contains filtered or unexported fields}

CreateEntityTypeOperation manages a long-running operation from CreateEntityType.

func (*CreateEntityTypeOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateEntityTypeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateEntityTypeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateEntityTypeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateEntityTypeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateFeatureGroupOperation

typeCreateFeatureGroupOperationstruct{// contains filtered or unexported fields}

CreateFeatureGroupOperation manages a long-running operation from CreateFeatureGroup.

func (*CreateFeatureGroupOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateFeatureGroupOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateFeatureGroupOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateFeatureGroupOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateFeatureGroupOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateFeatureOnlineStoreOperation

typeCreateFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}

CreateFeatureOnlineStoreOperation manages a long-running operation from CreateFeatureOnlineStore.

func (*CreateFeatureOnlineStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateFeatureOnlineStoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateFeatureOnlineStoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateFeatureOnlineStoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateFeatureOnlineStoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateFeatureOperation

typeCreateFeatureOperationstruct{// contains filtered or unexported fields}

CreateFeatureOperation manages a long-running operation from CreateFeature.

func (*CreateFeatureOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateFeatureOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateFeatureOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateFeatureOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateFeatureOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateFeatureViewOperation

typeCreateFeatureViewOperationstruct{// contains filtered or unexported fields}

CreateFeatureViewOperation manages a long-running operation from CreateFeatureView.

func (*CreateFeatureViewOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateFeatureViewOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateFeatureViewOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateFeatureViewOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateFeatureViewOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateFeaturestoreOperation

typeCreateFeaturestoreOperationstruct{// contains filtered or unexported fields}

CreateFeaturestoreOperation manages a long-running operation from CreateFeaturestore.

func (*CreateFeaturestoreOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateFeaturestoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateFeaturestoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateFeaturestoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateFeaturestoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateIndexEndpointOperation

typeCreateIndexEndpointOperationstruct{// contains filtered or unexported fields}

CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.

func (*CreateIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateIndexEndpointOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateIndexEndpointOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateIndexEndpointOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateIndexEndpointOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateIndexOperation

typeCreateIndexOperationstruct{// contains filtered or unexported fields}

CreateIndexOperation manages a long-running operation from CreateIndex.

func (*CreateIndexOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateMetadataStoreOperation

typeCreateMetadataStoreOperationstruct{// contains filtered or unexported fields}

CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore.

func (*CreateMetadataStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateMetadataStoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateMetadataStoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateMetadataStoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateMetadataStoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateNotebookExecutionJobOperation

typeCreateNotebookExecutionJobOperationstruct{// contains filtered or unexported fields}

CreateNotebookExecutionJobOperation manages a long-running operation from CreateNotebookExecutionJob.

func (*CreateNotebookExecutionJobOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateNotebookExecutionJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateNotebookExecutionJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateNotebookExecutionJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateNotebookExecutionJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateNotebookRuntimeTemplateOperation

typeCreateNotebookRuntimeTemplateOperationstruct{// contains filtered or unexported fields}

CreateNotebookRuntimeTemplateOperation manages a long-running operation from CreateNotebookRuntimeTemplate.

func (*CreateNotebookRuntimeTemplateOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateNotebookRuntimeTemplateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateNotebookRuntimeTemplateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateNotebookRuntimeTemplateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateNotebookRuntimeTemplateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreatePersistentResourceOperation

typeCreatePersistentResourceOperationstruct{// contains filtered or unexported fields}

CreatePersistentResourceOperation manages a long-running operation from CreatePersistentResource.

func (*CreatePersistentResourceOperation) Done

Done reports whether the long-running operation has completed.

func (*CreatePersistentResourceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreatePersistentResourceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreatePersistentResourceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreatePersistentResourceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateRagCorpusOperation

typeCreateRagCorpusOperationstruct{// contains filtered or unexported fields}

CreateRagCorpusOperation manages a long-running operation from CreateRagCorpus.

func (*CreateRagCorpusOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateRagCorpusOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateRagCorpusOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateRagCorpusOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateRagCorpusOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateReasoningEngineOperation

typeCreateReasoningEngineOperationstruct{// contains filtered or unexported fields}

CreateReasoningEngineOperation manages a long-running operation from CreateReasoningEngine.

func (*CreateReasoningEngineOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateReasoningEngineOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateReasoningEngineOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateReasoningEngineOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateReasoningEngineOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateSpecialistPoolOperation

typeCreateSpecialistPoolOperationstruct{// contains filtered or unexported fields}

CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool.

func (*CreateSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateSpecialistPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateSpecialistPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateSpecialistPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateSpecialistPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateTensorboardOperation

typeCreateTensorboardOperationstruct{// contains filtered or unexported fields}

CreateTensorboardOperation manages a long-running operation from CreateTensorboard.

func (*CreateTensorboardOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateTensorboardOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateTensorboardOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateTensorboardOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateTensorboardOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*DataFoundryClient) DeleteOperation

DeleteOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*DatasetClient) CreateDataset

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

CreateDatasetOperation 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

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

CreateDatasetVersionOperation 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

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

DeleteDatasetOperation 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

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

DeleteDatasetVersionOperation 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

DeleteOperation 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

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

DeleteSavedQueryOperation 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

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

ExportDataOperation 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

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

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

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

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

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

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

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

ImportDataOperation 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

ListAnnotations 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

ListDataItems 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

ListDatasetVersions 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

ListDatasets 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

ListLocations 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

ListOperations 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

ListSavedQueries 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

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

RestoreDatasetVersionOperation 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

SearchDataItems 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

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

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

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

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

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

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

PageInfo 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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*DeleteArtifactOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteArtifactOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteArtifactOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteArtifactOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteBatchPredictionJobOperation

typeDeleteBatchPredictionJobOperationstruct{// contains filtered or unexported fields}

DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob.

func (*DeleteBatchPredictionJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteBatchPredictionJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteBatchPredictionJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteBatchPredictionJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteBatchPredictionJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteContextOperation

typeDeleteContextOperationstruct{// contains filtered or unexported fields}

DeleteContextOperation manages a long-running operation from DeleteContext.

func (*DeleteContextOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteContextOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteContextOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteContextOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteContextOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteCustomJobOperation

typeDeleteCustomJobOperationstruct{// contains filtered or unexported fields}

DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob.

func (*DeleteCustomJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteCustomJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteCustomJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteCustomJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteCustomJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteDataLabelingJobOperation

typeDeleteDataLabelingJobOperationstruct{// contains filtered or unexported fields}

DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob.

func (*DeleteDataLabelingJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDataLabelingJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDataLabelingJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDataLabelingJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDataLabelingJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteDatasetOperation

typeDeleteDatasetOperationstruct{// contains filtered or unexported fields}

DeleteDatasetOperation manages a long-running operation from DeleteDataset.

func (*DeleteDatasetOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDatasetOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDatasetOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDatasetOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDatasetOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteDatasetVersionOperation

typeDeleteDatasetVersionOperationstruct{// contains filtered or unexported fields}

DeleteDatasetVersionOperation manages a long-running operation from DeleteDatasetVersion.

func (*DeleteDatasetVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDatasetVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDatasetVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDatasetVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDatasetVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteDeploymentResourcePoolOperation

typeDeleteDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}

DeleteDeploymentResourcePoolOperation manages a long-running operation from DeleteDeploymentResourcePool.

func (*DeleteDeploymentResourcePoolOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDeploymentResourcePoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDeploymentResourcePoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDeploymentResourcePoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDeploymentResourcePoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteEndpointOperation

typeDeleteEndpointOperationstruct{// contains filtered or unexported fields}

DeleteEndpointOperation manages a long-running operation from DeleteEndpoint.

func (*DeleteEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteEndpointOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteEndpointOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteEndpointOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteEndpointOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteEntityTypeOperation

typeDeleteEntityTypeOperationstruct{// contains filtered or unexported fields}

DeleteEntityTypeOperation manages a long-running operation from DeleteEntityType.

func (*DeleteEntityTypeOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteEntityTypeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteEntityTypeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteEntityTypeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteEntityTypeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteExecutionOperation

typeDeleteExecutionOperationstruct{// contains filtered or unexported fields}

DeleteExecutionOperation manages a long-running operation from DeleteExecution.

func (*DeleteExecutionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteExecutionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteExecutionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteExecutionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteExecutionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeatureGroupOperation

typeDeleteFeatureGroupOperationstruct{// contains filtered or unexported fields}

DeleteFeatureGroupOperation manages a long-running operation from DeleteFeatureGroup.

func (*DeleteFeatureGroupOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeatureGroupOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeatureGroupOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeatureGroupOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeatureGroupOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeatureOnlineStoreOperation

typeDeleteFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}

DeleteFeatureOnlineStoreOperation manages a long-running operation from DeleteFeatureOnlineStore.

func (*DeleteFeatureOnlineStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeatureOnlineStoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeatureOnlineStoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeatureOnlineStoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeatureOnlineStoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeatureOperation

typeDeleteFeatureOperationstruct{// contains filtered or unexported fields}

DeleteFeatureOperation manages a long-running operation from DeleteFeature.

func (*DeleteFeatureOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeatureOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeatureOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeatureOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeatureOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeatureValuesOperation

typeDeleteFeatureValuesOperationstruct{// contains filtered or unexported fields}

DeleteFeatureValuesOperation manages a long-running operation from DeleteFeatureValues.

func (*DeleteFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeatureValuesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeatureValuesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeatureValuesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeatureValuesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeatureViewOperation

typeDeleteFeatureViewOperationstruct{// contains filtered or unexported fields}

DeleteFeatureViewOperation manages a long-running operation from DeleteFeatureView.

func (*DeleteFeatureViewOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeatureViewOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeatureViewOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeatureViewOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeatureViewOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFeaturestoreOperation

typeDeleteFeaturestoreOperationstruct{// contains filtered or unexported fields}

DeleteFeaturestoreOperation manages a long-running operation from DeleteFeaturestore.

func (*DeleteFeaturestoreOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFeaturestoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFeaturestoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFeaturestoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFeaturestoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteHyperparameterTuningJobOperation

typeDeleteHyperparameterTuningJobOperationstruct{// contains filtered or unexported fields}

DeleteHyperparameterTuningJobOperation manages a long-running operation from DeleteHyperparameterTuningJob.

func (*DeleteHyperparameterTuningJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteHyperparameterTuningJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteHyperparameterTuningJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteHyperparameterTuningJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteHyperparameterTuningJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteIndexEndpointOperation

typeDeleteIndexEndpointOperationstruct{// contains filtered or unexported fields}

DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.

func (*DeleteIndexEndpointOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteIndexEndpointOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteIndexEndpointOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteIndexEndpointOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteIndexEndpointOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteIndexOperation

typeDeleteIndexOperationstruct{// contains filtered or unexported fields}

DeleteIndexOperation manages a long-running operation from DeleteIndex.

func (*DeleteIndexOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteMetadataStoreOperation

typeDeleteMetadataStoreOperationstruct{// contains filtered or unexported fields}

DeleteMetadataStoreOperation manages a long-running operation from DeleteMetadataStore.

func (*DeleteMetadataStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteMetadataStoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteMetadataStoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteMetadataStoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteMetadataStoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteModelDeploymentMonitoringJobOperation

typeDeleteModelDeploymentMonitoringJobOperationstruct{// contains filtered or unexported fields}

DeleteModelDeploymentMonitoringJobOperation manages a long-running operation from DeleteModelDeploymentMonitoringJob.

func (*DeleteModelDeploymentMonitoringJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteModelDeploymentMonitoringJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteModelDeploymentMonitoringJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteModelDeploymentMonitoringJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteModelDeploymentMonitoringJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteModelOperation

typeDeleteModelOperationstruct{// contains filtered or unexported fields}

DeleteModelOperation manages a long-running operation from DeleteModel.

func (*DeleteModelOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteModelVersionOperation

typeDeleteModelVersionOperationstruct{// contains filtered or unexported fields}

DeleteModelVersionOperation manages a long-running operation from DeleteModelVersion.

func (*DeleteModelVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteModelVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteModelVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteModelVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteModelVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteNasJobOperation

typeDeleteNasJobOperationstruct{// contains filtered or unexported fields}

DeleteNasJobOperation manages a long-running operation from DeleteNasJob.

func (*DeleteNasJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteNasJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteNasJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteNasJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteNasJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteNotebookExecutionJobOperation

typeDeleteNotebookExecutionJobOperationstruct{// contains filtered or unexported fields}

DeleteNotebookExecutionJobOperation manages a long-running operation from DeleteNotebookExecutionJob.

func (*DeleteNotebookExecutionJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteNotebookExecutionJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteNotebookExecutionJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteNotebookExecutionJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteNotebookExecutionJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteNotebookRuntimeOperation

typeDeleteNotebookRuntimeOperationstruct{// contains filtered or unexported fields}

DeleteNotebookRuntimeOperation manages a long-running operation from DeleteNotebookRuntime.

func (*DeleteNotebookRuntimeOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteNotebookRuntimeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteNotebookRuntimeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteNotebookRuntimeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteNotebookRuntimeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteNotebookRuntimeTemplateOperation

typeDeleteNotebookRuntimeTemplateOperationstruct{// contains filtered or unexported fields}

DeleteNotebookRuntimeTemplateOperation manages a long-running operation from DeleteNotebookRuntimeTemplate.

func (*DeleteNotebookRuntimeTemplateOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteNotebookRuntimeTemplateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteNotebookRuntimeTemplateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteNotebookRuntimeTemplateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteNotebookRuntimeTemplateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeletePersistentResourceOperation

typeDeletePersistentResourceOperationstruct{// contains filtered or unexported fields}

DeletePersistentResourceOperation manages a long-running operation from DeletePersistentResource.

func (*DeletePersistentResourceOperation) Done

Done reports whether the long-running operation has completed.

func (*DeletePersistentResourceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeletePersistentResourceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeletePersistentResourceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeletePersistentResourceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeletePipelineJobOperation

typeDeletePipelineJobOperationstruct{// contains filtered or unexported fields}

DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob.

func (*DeletePipelineJobOperation) Done

Done reports whether the long-running operation has completed.

func (*DeletePipelineJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeletePipelineJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeletePipelineJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeletePipelineJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteRagCorpusOperation

typeDeleteRagCorpusOperationstruct{// contains filtered or unexported fields}

DeleteRagCorpusOperation manages a long-running operation from DeleteRagCorpus.

func (*DeleteRagCorpusOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteRagCorpusOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteRagCorpusOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteRagCorpusOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteRagCorpusOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteRagFileOperation

typeDeleteRagFileOperationstruct{// contains filtered or unexported fields}

DeleteRagFileOperation manages a long-running operation from DeleteRagFile.

func (*DeleteRagFileOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteRagFileOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteRagFileOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteRagFileOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteRagFileOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteReasoningEngineOperation

typeDeleteReasoningEngineOperationstruct{// contains filtered or unexported fields}

DeleteReasoningEngineOperation manages a long-running operation from DeleteReasoningEngine.

func (*DeleteReasoningEngineOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteReasoningEngineOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteReasoningEngineOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteReasoningEngineOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteReasoningEngineOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteSavedQueryOperation

typeDeleteSavedQueryOperationstruct{// contains filtered or unexported fields}

DeleteSavedQueryOperation manages a long-running operation from DeleteSavedQuery.

func (*DeleteSavedQueryOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteSavedQueryOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteSavedQueryOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteSavedQueryOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteSavedQueryOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteScheduleOperation

typeDeleteScheduleOperationstruct{// contains filtered or unexported fields}

DeleteScheduleOperation manages a long-running operation from DeleteSchedule.

func (*DeleteScheduleOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteScheduleOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteScheduleOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteScheduleOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteScheduleOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteSpecialistPoolOperation

typeDeleteSpecialistPoolOperationstruct{// contains filtered or unexported fields}

DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool.

func (*DeleteSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteSpecialistPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteSpecialistPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteSpecialistPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteSpecialistPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteTensorboardExperimentOperation

typeDeleteTensorboardExperimentOperationstruct{// contains filtered or unexported fields}

DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment.

func (*DeleteTensorboardExperimentOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardExperimentOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteTensorboardExperimentOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteTensorboardExperimentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteTensorboardExperimentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteTensorboardOperation

typeDeleteTensorboardOperationstruct{// contains filtered or unexported fields}

DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard.

func (*DeleteTensorboardOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteTensorboardOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteTensorboardOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteTensorboardOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteTensorboardRunOperation

typeDeleteTensorboardRunOperationstruct{// contains filtered or unexported fields}

DeleteTensorboardRunOperation manages a long-running operation from DeleteTensorboardRun.

func (*DeleteTensorboardRunOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardRunOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteTensorboardRunOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteTensorboardRunOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteTensorboardRunOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteTensorboardTimeSeriesOperation

typeDeleteTensorboardTimeSeriesOperationstruct{// contains filtered or unexported fields}

DeleteTensorboardTimeSeriesOperation manages a long-running operation from DeleteTensorboardTimeSeries.

func (*DeleteTensorboardTimeSeriesOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTensorboardTimeSeriesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteTensorboardTimeSeriesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteTensorboardTimeSeriesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteTensorboardTimeSeriesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteTrainingPipelineOperation

typeDeleteTrainingPipelineOperationstruct{// contains filtered or unexported fields}

DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline.

func (*DeleteTrainingPipelineOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteTrainingPipelineOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteTrainingPipelineOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteTrainingPipelineOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteTrainingPipelineOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeployIndexOperation

typeDeployIndexOperationstruct{// contains filtered or unexported fields}

DeployIndexOperation manages a long-running operation from DeployIndex.

func (*DeployIndexOperation) Done

Done reports whether the long-running operation has completed.

func (*DeployIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeployIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeployIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeployIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeployModelOperation

typeDeployModelOperationstruct{// contains filtered or unexported fields}

DeployModelOperation manages a long-running operation from DeployModel.

func (*DeployModelOperation) Done

Done reports whether the long-running operation has completed.

func (*DeployModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeployModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeployModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeployModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeployOperation

typeDeployOperationstruct{// contains filtered or unexported fields}

DeployOperation manages a long-running operation from Deploy.

func (*DeployOperation) Done

func(op*DeployOperation)Done()bool

Done reports whether the long-running operation has completed.

func (*DeployOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeployOperation) Name

func(op*DeployOperation)Name()string

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeployOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeployOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*DeploymentResourcePoolClient) CreateDeploymentResourcePool

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

CreateDeploymentResourcePoolOperation 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

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

DeleteDeploymentResourcePoolOperation 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

DeleteOperation 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

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

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

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

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

ListDeploymentResourcePools 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

ListLocations 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

ListOperations 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

QueryDeployedModels 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

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

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

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

UpdateDeploymentResourcePoolOperation 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

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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*EndpointClient) CreateEndpoint

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

CreateEndpointOperation 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

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

DeleteEndpointOperation 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

DeleteOperation 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

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

DeployModelOperation 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

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

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

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

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

ListEndpoints 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

ListLocations 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

ListOperations 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

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

MutateDeployedModelOperation 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

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

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

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

UndeployModelOperation 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

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

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

UpdateEndpointLongRunningOperation 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

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

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

PageInfo 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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*EvaluationClient) DeleteOperation

DeleteOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*ExportDataOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ExportDataOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportDataOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportDataOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ExportFeatureValuesOperation

typeExportFeatureValuesOperationstruct{// contains filtered or unexported fields}

ExportFeatureValuesOperation manages a long-running operation from ExportFeatureValues.

func (*ExportFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*ExportFeatureValuesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ExportFeatureValuesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportFeatureValuesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportFeatureValuesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ExportModelOperation

typeExportModelOperationstruct{// contains filtered or unexported fields}

ExportModelOperation manages a long-running operation from ExportModel.

func (*ExportModelOperation) Done

Done reports whether the long-running operation has completed.

func (*ExportModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ExportModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ExportModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ExportModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

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

PageInfo 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*FeatureOnlineStoreAdminClient) CreateFeatureOnlineStore

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

CreateFeatureOnlineStoreOperation 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

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

CreateFeatureViewOperation 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

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

DeleteFeatureOnlineStoreOperation 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

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

DeleteFeatureViewOperation 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

DeleteOperation 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

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

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

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

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

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

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

ListFeatureOnlineStores 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

ListFeatureViewSyncs 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

ListFeatureViews 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

ListLocations 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

ListOperations 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

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

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

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

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

UpdateFeatureOnlineStoreOperation 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

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

UpdateFeatureViewOperation 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

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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*FeatureOnlineStoreClient) DeleteOperation

DeleteOperation 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

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

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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

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

PageInfo 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

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

BatchCreateFeaturesOperation 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*FeatureRegistryClient) CreateFeature

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

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

CreateFeatureGroupOperation 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)*CreateFeatureOperation

CreateFeatureOperation 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

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

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

DeleteFeatureGroupOperation 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)*DeleteFeatureOperation

DeleteFeatureOperation 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

DeleteOperation 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

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

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

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

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

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

ListFeatureGroups 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

ListFeatures 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

ListLocations 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

ListOperations 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

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

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

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

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

UpdateFeatureGroupOperation 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)*UpdateFeatureOperation

UpdateFeatureOperation 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

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

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

PageInfo 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

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

PageInfo 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

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

BatchCreateFeaturesOperation 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

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

BatchReadFeatureValuesOperation 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*FeaturestoreClient) CreateEntityType

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

CreateEntityTypeOperation 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

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

CreateFeatureOperation 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

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

CreateFeaturestoreOperation 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

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

DeleteEntityTypeOperation 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

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

DeleteFeatureOperation 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

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

DeleteFeatureValuesOperation 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

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

DeleteFeaturestoreOperation 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

DeleteOperation 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

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

ExportFeatureValuesOperation 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

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

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

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

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

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

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

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

ImportFeatureValuesOperation 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

ListEntityTypes 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

ListFeatures 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

ListFeaturestores 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

ListLocations 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

ListOperations 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

SearchFeatures 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

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

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

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

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

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

UpdateFeaturestoreOperation 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

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

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

PageInfo 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*FeaturestoreOnlineServingClient) DeleteOperation

DeleteOperation 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

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

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

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

ListLocations 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

ListOperations 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

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

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

StreamingReadFeatureValues reads Feature values for multiple entities. Depending on their size, datafor different entities may be brokenup across multiple responses.

func (*FeaturestoreOnlineServingClient) TestIamPermissions

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

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

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*GenAiCacheClient) CreateCachedContent

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

DeleteCachedContent 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

DeleteOperation 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

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

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

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

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

ListCachedContents 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

ListLocations 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

ListOperations 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

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

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

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

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

CancelOperation 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

CancelTuningJob 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()error

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

Connection returns a connection to the API service.

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

func (*GenAiTuningClient) CreateTuningJob

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

DeleteOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

ListTuningJobs 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

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

RebaseTunedModelOperation 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

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

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

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*ImportDataOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ImportDataOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportDataOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportDataOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ImportFeatureValuesOperation

typeImportFeatureValuesOperationstruct{// contains filtered or unexported fields}

ImportFeatureValuesOperation manages a long-running operation from ImportFeatureValues.

func (*ImportFeatureValuesOperation) Done

Done reports whether the long-running operation has completed.

func (*ImportFeatureValuesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ImportFeatureValuesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportFeatureValuesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportFeatureValuesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ImportRagFilesOperation

typeImportRagFilesOperationstruct{// contains filtered or unexported fields}

ImportRagFilesOperation manages a long-running operation from ImportRagFiles.

func (*ImportRagFilesOperation) Done

Done reports whether the long-running operation has completed.

func (*ImportRagFilesOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ImportRagFilesOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportRagFilesOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportRagFilesOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*IndexClient) CreateIndex

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

CreateIndexOperation 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

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

DeleteIndexOperation 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

DeleteOperation 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

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

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

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

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

ListIndexes 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

ListLocations 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

ListOperations 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

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

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

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

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

UpdateIndexOperation 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

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

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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*IndexEndpointClient) CreateIndexEndpoint

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

CreateIndexEndpointOperation 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

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

DeleteIndexEndpointOperation 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

DeleteOperation 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

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

DeployIndexOperation 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

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

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

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

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

ListIndexEndpoints 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

ListLocations 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

ListOperations 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

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

MutateDeployedIndexOperation 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

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

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

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

UndeployIndexOperation 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

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

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

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

PageInfo 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

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

PageInfo 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

funcNewJobClient(ctxcontext.Context,opts...option.ClientOption)(*JobClient,error)

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

CancelBatchPredictionJob 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

CancelCustomJob 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

CancelDataLabelingJob 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

CancelHyperparameterTuningJob 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

CancelNasJob 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

CancelOperation 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

func(c*JobClient)Close()error

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

Connection returns a connection to the API service.

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

func (*JobClient) CreateBatchPredictionJob

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

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

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

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

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

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

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

DeleteBatchPredictionJobOperation 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

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

DeleteCustomJobOperation 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

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

DeleteDataLabelingJobOperation 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

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

DeleteHyperparameterTuningJobOperation 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

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

DeleteModelDeploymentMonitoringJobOperation 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

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

DeleteNasJobOperation 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

DeleteOperation 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

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

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

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

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

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

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

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

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

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

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

ListBatchPredictionJobs 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

ListCustomJobs 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

ListDataLabelingJobs 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

ListHyperparameterTuningJobs 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

ListLocations 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

ListModelDeploymentMonitoringJobs 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

ListNasJobs 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

ListNasTrialDetails 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

ListOperations 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)error

PauseModelDeploymentMonitoringJob 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)error

ResumeModelDeploymentMonitoringJob 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

SearchModelDeploymentMonitoringStatsAnomalies 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

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

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

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

UpdateModelDeploymentMonitoringJobOperation 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

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

CancelOperation 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()error

Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.

func (*LlmUtilityClient) ComputeTokens

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

Connection returns a connection to the API service.

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

func (*LlmUtilityClient) CountTokens

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

DeleteOperation 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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*LocationIterator) PageInfo

func(it*LocationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*MatchClient) DeleteOperation

DeleteOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

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

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

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*MetadataClient) CreateArtifact

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

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

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

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

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

CreateMetadataStoreOperation 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

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

DeleteArtifactOperation 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

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

DeleteContextOperation 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

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

DeleteExecutionOperation 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

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

DeleteMetadataStoreOperation 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

DeleteOperation 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

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

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

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

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

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

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

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

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

ListArtifacts 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

ListContexts 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

ListExecutions 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

ListLocations 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

ListMetadataSchemas 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

ListMetadataStores 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

ListOperations 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

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

PurgeArtifactsOperation 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

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

PurgeContextsOperation 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

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

PurgeExecutionsOperation 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

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

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

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

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

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

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

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

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

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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

BatchMigrateResourcesOperation 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*MigrationClient) DeleteOperation

DeleteOperation 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

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

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

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

ListLocations 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

ListOperations 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

SearchMigratableResources 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

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

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

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

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

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*ModelClient) CopyModel

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

CopyModelOperation 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

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

DeleteModelOperation 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

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

DeleteModelVersionOperation 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

DeleteOperation 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

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

ExportModelOperation 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

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

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

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

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

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

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

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

ListLocations 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

ListModelEvaluationSlices 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

ListModelEvaluations 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

ListModelVersionCheckpoints 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

ListModelVersions 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

ListModels 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

ListOperations 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

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

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

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

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

UpdateExplanationDatasetOperation 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

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

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

UploadModelOperation 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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*ModelGardenClient) DeleteOperation

DeleteOperation 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

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

DeployOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*MutateDeployedIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*MutateDeployedIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*MutateDeployedIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*MutateDeployedIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

MutateDeployedModelOperation

typeMutateDeployedModelOperationstruct{// contains filtered or unexported fields}

MutateDeployedModelOperation manages a long-running operation from MutateDeployedModel.

func (*MutateDeployedModelOperation) Done

Done reports whether the long-running operation has completed.

func (*MutateDeployedModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*MutateDeployedModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*MutateDeployedModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*MutateDeployedModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

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

PageInfo 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

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

AssignNotebookRuntimeOperation 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*NotebookClient) CreateNotebookExecutionJob

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

CreateNotebookExecutionJobOperation 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

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

CreateNotebookRuntimeTemplateOperation 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

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

DeleteNotebookExecutionJobOperation 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

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

DeleteNotebookRuntimeOperation 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

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

DeleteNotebookRuntimeTemplateOperation 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

DeleteOperation 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

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

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

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

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

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

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

ListLocations 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

ListNotebookExecutionJobs 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

ListNotebookRuntimeTemplates 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

ListNotebookRuntimes 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

ListOperations 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

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

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

StartNotebookRuntimeOperation 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

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

StopNotebookRuntimeOperation 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

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

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

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

UpgradeNotebookRuntimeOperation 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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

OperationIterator

typeOperationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All

func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*OperationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*OperationIterator) PageInfo

func(it*OperationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*PersistentResourceClient) CreatePersistentResource

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

CreatePersistentResourceOperation 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

DeleteOperation 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

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

DeletePersistentResourceOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

ListPersistentResources 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

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

RebootPersistentResourceOperation 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

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

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

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

UpdatePersistentResourceOperation 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

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

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

PageInfo 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

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

BatchCancelPipelineJobsOperation 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

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

BatchDeletePipelineJobsOperation 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

CancelOperation 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

CancelPipelineJob 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

CancelTrainingPipeline 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()error

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

Connection returns a connection to the API service.

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

func (*PipelineClient) CreatePipelineJob

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

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

DeleteOperation 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

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

DeletePipelineJobOperation 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

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

DeleteTrainingPipelineOperation 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

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

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

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

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

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

ListLocations 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

ListOperations 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

ListPipelineJobs 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

ListTrainingPipelines 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

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

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

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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*PredictionClient) DeleteOperation

DeleteOperation 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

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

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

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

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

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

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

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

ListLocations 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

ListOperations 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

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

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

ServerStreamingPredict perform a server-side streaming online prediction request for VertexLLM streaming.

func (*PredictionClient) SetIamPolicy

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

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

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

StreamGenerateContent generate content with multimodal inputs with streaming support.

func (*PredictionClient) StreamRawPredict

StreamRawPredict perform a streaming online prediction with an arbitrary HTTP payload.

func (*PredictionClient) StreamingPredict

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

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

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

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

Done reports whether the long-running operation has completed.

func (*PurgeArtifactsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*PurgeArtifactsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*PurgeArtifactsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*PurgeArtifactsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

PurgeContextsOperation

typePurgeContextsOperationstruct{// contains filtered or unexported fields}

PurgeContextsOperation manages a long-running operation from PurgeContexts.

func (*PurgeContextsOperation) Done

Done reports whether the long-running operation has completed.

func (*PurgeContextsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*PurgeContextsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*PurgeContextsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*PurgeContextsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

PurgeExecutionsOperation

typePurgeExecutionsOperationstruct{// contains filtered or unexported fields}

PurgeExecutionsOperation manages a long-running operation from PurgeExecutions.

func (*PurgeExecutionsOperation) Done

Done reports whether the long-running operation has completed.

func (*PurgeExecutionsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*PurgeExecutionsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*PurgeExecutionsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*PurgeExecutionsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

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

PageInfo 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*ReasoningEngineClient) CreateReasoningEngine

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

CreateReasoningEngineOperation 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

DeleteOperation 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

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

DeleteReasoningEngineOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

ListReasoningEngines 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

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

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

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

UpdateReasoningEngineOperation 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

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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*ReasoningEngineExecutionClient) DeleteOperation

DeleteOperation 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

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

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

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

ListLocations 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

ListOperations 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

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

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

StreamQueryReasoningEngine streams queries using a reasoning engine.

func (*ReasoningEngineExecutionClient) TestIamPermissions

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

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*RebaseTunedModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*RebaseTunedModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*RebaseTunedModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RebaseTunedModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

RebootPersistentResourceOperation

typeRebootPersistentResourceOperationstruct{// contains filtered or unexported fields}

RebootPersistentResourceOperation manages a long-running operation from RebootPersistentResource.

func (*RebootPersistentResourceOperation) Done

Done reports whether the long-running operation has completed.

func (*RebootPersistentResourceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*RebootPersistentResourceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*RebootPersistentResourceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RebootPersistentResourceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

RestoreDatasetVersionOperation

typeRestoreDatasetVersionOperationstruct{// contains filtered or unexported fields}

RestoreDatasetVersionOperation manages a long-running operation from RestoreDatasetVersion.

func (*RestoreDatasetVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*RestoreDatasetVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*RestoreDatasetVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*RestoreDatasetVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RestoreDatasetVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*ScheduleClient) CreateSchedule

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

DeleteOperation 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

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

DeleteScheduleOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

ListSchedules 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

PauseSchedule 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

ResumeSchedule 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

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

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

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

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

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

PageInfo 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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*SpecialistPoolClient) CreateSpecialistPool

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

CreateSpecialistPoolOperation 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

DeleteOperation 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

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

DeleteSpecialistPoolOperation 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

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

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

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

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

ListLocations 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

ListOperations 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

ListSpecialistPools 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

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

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

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

UpdateSpecialistPoolOperation 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

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*StartNotebookRuntimeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*StartNotebookRuntimeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*StartNotebookRuntimeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*StartNotebookRuntimeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

StopNotebookRuntimeOperation

typeStopNotebookRuntimeOperationstruct{// contains filtered or unexported fields}

StopNotebookRuntimeOperation manages a long-running operation from StopNotebookRuntime.

func (*StopNotebookRuntimeOperation) Done

Done reports whether the long-running operation has completed.

func (*StopNotebookRuntimeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*StopNotebookRuntimeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*StopNotebookRuntimeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*StopNotebookRuntimeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*SuggestTrialsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*SuggestTrialsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*SuggestTrialsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*SuggestTrialsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

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

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*TensorboardClient) CreateTensorboard

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

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

CreateTensorboardOperation 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

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

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

DeleteOperation 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

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

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

DeleteTensorboardExperimentOperation 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)*DeleteTensorboardOperation

DeleteTensorboardOperation 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

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

DeleteTensorboardRunOperation 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

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

DeleteTensorboardTimeSeriesOperation 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

ExportTensorboardTimeSeriesData 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

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

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

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

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

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

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

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

ListLocations 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

ListOperations 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

ListTensorboardExperiments 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

ListTensorboardRuns 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

ListTensorboardTimeSeries 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

ListTensorboards 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

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

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

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

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

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

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

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

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

UpdateTensorboardOperation 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

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

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

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

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

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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

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

PageInfo 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

Done reports whether the long-running operation has completed.

func (*UndeployIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UndeployIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UndeployIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UndeployIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UndeployModelOperation

typeUndeployModelOperationstruct{// contains filtered or unexported fields}

UndeployModelOperation manages a long-running operation from UndeployModel.

func (*UndeployModelOperation) Done

Done reports whether the long-running operation has completed.

func (*UndeployModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UndeployModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UndeployModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UndeployModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateDeploymentResourcePoolOperation

typeUpdateDeploymentResourcePoolOperationstruct{// contains filtered or unexported fields}

UpdateDeploymentResourcePoolOperation manages a long-running operation from UpdateDeploymentResourcePool.

func (*UpdateDeploymentResourcePoolOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateDeploymentResourcePoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateDeploymentResourcePoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateDeploymentResourcePoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateDeploymentResourcePoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateEndpointLongRunningOperation

typeUpdateEndpointLongRunningOperationstruct{// contains filtered or unexported fields}

UpdateEndpointLongRunningOperation manages a long-running operation from UpdateEndpointLongRunning.

func (*UpdateEndpointLongRunningOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateEndpointLongRunningOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateEndpointLongRunningOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateEndpointLongRunningOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateEndpointLongRunningOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateExplanationDatasetOperation

typeUpdateExplanationDatasetOperationstruct{// contains filtered or unexported fields}

UpdateExplanationDatasetOperation manages a long-running operation from UpdateExplanationDataset.

func (*UpdateExplanationDatasetOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateExplanationDatasetOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateExplanationDatasetOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateExplanationDatasetOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateExplanationDatasetOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateFeatureGroupOperation

typeUpdateFeatureGroupOperationstruct{// contains filtered or unexported fields}

UpdateFeatureGroupOperation manages a long-running operation from UpdateFeatureGroup.

func (*UpdateFeatureGroupOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateFeatureGroupOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateFeatureGroupOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateFeatureGroupOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateFeatureGroupOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateFeatureOnlineStoreOperation

typeUpdateFeatureOnlineStoreOperationstruct{// contains filtered or unexported fields}

UpdateFeatureOnlineStoreOperation manages a long-running operation from UpdateFeatureOnlineStore.

func (*UpdateFeatureOnlineStoreOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateFeatureOnlineStoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateFeatureOnlineStoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateFeatureOnlineStoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateFeatureOnlineStoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateFeatureOperation

typeUpdateFeatureOperationstruct{// contains filtered or unexported fields}

UpdateFeatureOperation manages a long-running operation from UpdateFeature.

func (*UpdateFeatureOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateFeatureOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateFeatureOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateFeatureOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateFeatureOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateFeatureViewOperation

typeUpdateFeatureViewOperationstruct{// contains filtered or unexported fields}

UpdateFeatureViewOperation manages a long-running operation from UpdateFeatureView.

func (*UpdateFeatureViewOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateFeatureViewOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateFeatureViewOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateFeatureViewOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateFeatureViewOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateFeaturestoreOperation

typeUpdateFeaturestoreOperationstruct{// contains filtered or unexported fields}

UpdateFeaturestoreOperation manages a long-running operation from UpdateFeaturestore.

func (*UpdateFeaturestoreOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateFeaturestoreOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateFeaturestoreOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateFeaturestoreOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateFeaturestoreOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateIndexOperation

typeUpdateIndexOperationstruct{// contains filtered or unexported fields}

UpdateIndexOperation manages a long-running operation from UpdateIndex.

func (*UpdateIndexOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateIndexOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateIndexOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateIndexOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateIndexOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateModelDeploymentMonitoringJobOperation

typeUpdateModelDeploymentMonitoringJobOperationstruct{// contains filtered or unexported fields}

UpdateModelDeploymentMonitoringJobOperation manages a long-running operation from UpdateModelDeploymentMonitoringJob.

func (*UpdateModelDeploymentMonitoringJobOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateModelDeploymentMonitoringJobOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateModelDeploymentMonitoringJobOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateModelDeploymentMonitoringJobOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateModelDeploymentMonitoringJobOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdatePersistentResourceOperation

typeUpdatePersistentResourceOperationstruct{// contains filtered or unexported fields}

UpdatePersistentResourceOperation manages a long-running operation from UpdatePersistentResource.

func (*UpdatePersistentResourceOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdatePersistentResourceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdatePersistentResourceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdatePersistentResourceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdatePersistentResourceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateRagCorpusOperation

typeUpdateRagCorpusOperationstruct{// contains filtered or unexported fields}

UpdateRagCorpusOperation manages a long-running operation from UpdateRagCorpus.

func (*UpdateRagCorpusOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateRagCorpusOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateRagCorpusOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateRagCorpusOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateRagCorpusOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateRagEngineConfigOperation

typeUpdateRagEngineConfigOperationstruct{// contains filtered or unexported fields}

UpdateRagEngineConfigOperation manages a long-running operation from UpdateRagEngineConfig.

func (*UpdateRagEngineConfigOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateRagEngineConfigOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateRagEngineConfigOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateRagEngineConfigOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateRagEngineConfigOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateReasoningEngineOperation

typeUpdateReasoningEngineOperationstruct{// contains filtered or unexported fields}

UpdateReasoningEngineOperation manages a long-running operation from UpdateReasoningEngine.

func (*UpdateReasoningEngineOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateReasoningEngineOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateReasoningEngineOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateReasoningEngineOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateReasoningEngineOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateSpecialistPoolOperation

typeUpdateSpecialistPoolOperationstruct{// contains filtered or unexported fields}

UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool.

func (*UpdateSpecialistPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateSpecialistPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateSpecialistPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateSpecialistPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateSpecialistPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateTensorboardOperation

typeUpdateTensorboardOperationstruct{// contains filtered or unexported fields}

UpdateTensorboardOperation manages a long-running operation from UpdateTensorboard.

func (*UpdateTensorboardOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateTensorboardOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateTensorboardOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateTensorboardOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateTensorboardOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpgradeNotebookRuntimeOperation

typeUpgradeNotebookRuntimeOperationstruct{// contains filtered or unexported fields}

UpgradeNotebookRuntimeOperation manages a long-running operation from UpgradeNotebookRuntime.

func (*UpgradeNotebookRuntimeOperation) Done

Done reports whether the long-running operation has completed.

func (*UpgradeNotebookRuntimeOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpgradeNotebookRuntimeOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpgradeNotebookRuntimeOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpgradeNotebookRuntimeOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UploadModelOperation

typeUploadModelOperationstruct{// contains filtered or unexported fields}

UploadModelOperation manages a long-running operation from UploadModel.

func (*UploadModelOperation) Done

Done reports whether the long-running operation has completed.

func (*UploadModelOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UploadModelOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UploadModelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UploadModelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

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

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

CancelOperation 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()error

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

Connection returns a connection to the API service.

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

func (*VertexRagClient) CorroborateContent

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

DeleteOperation 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

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

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

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

ListLocations 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

ListOperations 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

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

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

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

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

CancelOperation 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

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

Connection returns a connection to the API service.

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

func (*VertexRagDataClient) CreateRagCorpus

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

CreateRagCorpusOperation 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

DeleteOperation 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

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

DeleteRagCorpusOperation 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

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

DeleteRagFileOperation 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

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

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

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

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

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

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

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

ImportRagFilesOperation 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

ListLocations 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

ListOperations 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

ListRagCorpora 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

ListRagFiles 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

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

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

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

UpdateRagCorpusOperation 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

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

UpdateRagEngineConfigOperation 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

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

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

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

CancelOperation 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

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

CheckTrialEarlyStoppingStateOperation 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()error

Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.

func (*VizierClient) CompleteTrial

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

Connection returns a connection to the API service.

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

func (*VizierClient) CreateStudy

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

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

DeleteOperation 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

DeleteStudy 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

DeleteTrial 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

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

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

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

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

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

ListLocations 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

ListOperations 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

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

ListStudies 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

ListTrials 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

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

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

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

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

SuggestTrialsOperation 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

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

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.