package datacatalog
import "cloud.google.com/go/datacatalog/apiv1"
Package datacatalog is an auto-generated package for the Google Cloud Data Catalog API.
A fully managed and highly scalable data discovery and metadata management service.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/datacatalog/apiv1@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req := &datacatalogpb.CreateEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateEntryRequest.
}
resp, err := c.CreateEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type CallOptions
- type Client
- func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
- func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConn
- func (c *Client) CreateEntry(ctx context.Context, req *datacatalogpb.CreateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
- func (c *Client) CreateEntryGroup(ctx context.Context, req *datacatalogpb.CreateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
- func (c *Client) CreateTag(ctx context.Context, req *datacatalogpb.CreateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error)
- func (c *Client) CreateTagTemplate(ctx context.Context, req *datacatalogpb.CreateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
- func (c *Client) CreateTagTemplateField(ctx context.Context, req *datacatalogpb.CreateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
- func (c *Client) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteEntryRequest, opts ...gax.CallOption) error
- func (c *Client) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.DeleteEntryGroupRequest, opts ...gax.CallOption) error
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
- func (c *Client) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTagRequest, opts ...gax.CallOption) error
- func (c *Client) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.DeleteTagTemplateRequest, opts ...gax.CallOption) error
- func (c *Client) DeleteTagTemplateField(ctx context.Context, req *datacatalogpb.DeleteTagTemplateFieldRequest, opts ...gax.CallOption) error
- func (c *Client) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
- func (c *Client) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
- func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
- func (c *Client) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
- func (c *Client) ImportEntries(ctx context.Context, req *datacatalogpb.ImportEntriesRequest, opts ...gax.CallOption) (*ImportEntriesOperation, error)
- func (c *Client) ImportEntriesOperation(name string) *ImportEntriesOperation
- func (c *Client) ListEntries(ctx context.Context, req *datacatalogpb.ListEntriesRequest, opts ...gax.CallOption) *EntryIterator
- func (c *Client) ListEntryGroups(ctx context.Context, req *datacatalogpb.ListEntryGroupsRequest, opts ...gax.CallOption) *EntryGroupIterator
- func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
- func (c *Client) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator
- func (c *Client) LookupEntry(ctx context.Context, req *datacatalogpb.LookupEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
- func (c *Client) ModifyEntryContacts(ctx context.Context, req *datacatalogpb.ModifyEntryContactsRequest, opts ...gax.CallOption) (*datacatalogpb.Contacts, error)
- func (c *Client) ModifyEntryOverview(ctx context.Context, req *datacatalogpb.ModifyEntryOverviewRequest, opts ...gax.CallOption) (*datacatalogpb.EntryOverview, error)
- func (c *Client) ReconcileTags(ctx context.Context, req *datacatalogpb.ReconcileTagsRequest, opts ...gax.CallOption) (*ReconcileTagsOperation, error)
- func (c *Client) ReconcileTagsOperation(name string) *ReconcileTagsOperation
- func (c *Client) RenameTagTemplateField(ctx context.Context, req *datacatalogpb.RenameTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
- func (c *Client) RenameTagTemplateFieldEnumValue(ctx context.Context, req *datacatalogpb.RenameTagTemplateFieldEnumValueRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
- func (c *Client) RetrieveConfig(ctx context.Context, req *datacatalogpb.RetrieveConfigRequest, opts ...gax.CallOption) (*datacatalogpb.OrganizationConfig, error)
- func (c *Client) RetrieveEffectiveConfig(ctx context.Context, req *datacatalogpb.RetrieveEffectiveConfigRequest, opts ...gax.CallOption) (*datacatalogpb.MigrationConfig, error)
- func (c *Client) SearchCatalog(ctx context.Context, req *datacatalogpb.SearchCatalogRequest, opts ...gax.CallOption) *SearchCatalogResultIterator
- func (c *Client) SetConfig(ctx context.Context, req *datacatalogpb.SetConfigRequest, opts ...gax.CallOption) (*datacatalogpb.MigrationConfig, error)
- func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *Client) StarEntry(ctx context.Context, req *datacatalogpb.StarEntryRequest, opts ...gax.CallOption) (*datacatalogpb.StarEntryResponse, error)
- func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
- func (c *Client) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarEntryRequest, opts ...gax.CallOption) (*datacatalogpb.UnstarEntryResponse, error)
- func (c *Client) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
- func (c *Client) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.UpdateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
- func (c *Client) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error)
- func (c *Client) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.UpdateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
- func (c *Client) UpdateTagTemplateField(ctx context.Context, req *datacatalogpb.UpdateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
- type EntryGroupIterator
- func (it *EntryGroupIterator) All() iter.Seq2[*datacatalogpb.EntryGroup, error]
- func (it *EntryGroupIterator) Next() (*datacatalogpb.EntryGroup, error)
- func (it *EntryGroupIterator) PageInfo() *iterator.PageInfo
- type EntryIterator
- func (it *EntryIterator) All() iter.Seq2[*datacatalogpb.Entry, error]
- func (it *EntryIterator) Next() (*datacatalogpb.Entry, error)
- func (it *EntryIterator) PageInfo() *iterator.PageInfo
- type IamPolicyCallOptions
- type IamPolicyClient
- func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
- func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
- func (c *IamPolicyClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
- func (c *IamPolicyClient) Close() error
- func (c *IamPolicyClient) Connection() *grpc.ClientConn
- func (c *IamPolicyClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
- func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *IamPolicyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
- func (c *IamPolicyClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
- func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
- type ImportEntriesOperation
- func (op *ImportEntriesOperation) Done() bool
- func (op *ImportEntriesOperation) Metadata() (*datacatalogpb.ImportEntriesMetadata, error)
- func (op *ImportEntriesOperation) Name() string
- func (op *ImportEntriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ImportEntriesResponse, error)
- func (op *ImportEntriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ImportEntriesResponse, error)
- type OperationIterator
- func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
- func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
- func (it *OperationIterator) PageInfo() *iterator.PageInfo
- type PolicyTagIterator
- func (it *PolicyTagIterator) All() iter.Seq2[*datacatalogpb.PolicyTag, error]
- func (it *PolicyTagIterator) Next() (*datacatalogpb.PolicyTag, error)
- func (it *PolicyTagIterator) PageInfo() *iterator.PageInfo
- type PolicyTagManagerCallOptions
- type PolicyTagManagerClient
- func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerClient, error)
- func NewPolicyTagManagerRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerClient, error)
- func (c *PolicyTagManagerClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerClient) Close() error
- func (c *PolicyTagManagerClient) Connection() *grpc.ClientConn
- func (c *PolicyTagManagerClient) CreatePolicyTag(ctx context.Context, req *datacatalogpb.CreatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
- func (c *PolicyTagManagerClient) CreateTaxonomy(ctx context.Context, req *datacatalogpb.CreateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
- func (c *PolicyTagManagerClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerClient) DeletePolicyTag(ctx context.Context, req *datacatalogpb.DeletePolicyTagRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerClient) DeleteTaxonomy(ctx context.Context, req *datacatalogpb.DeleteTaxonomyRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *PolicyTagManagerClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
- func (c *PolicyTagManagerClient) GetPolicyTag(ctx context.Context, req *datacatalogpb.GetPolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
- func (c *PolicyTagManagerClient) GetTaxonomy(ctx context.Context, req *datacatalogpb.GetTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
- func (c *PolicyTagManagerClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
- func (c *PolicyTagManagerClient) ListPolicyTags(ctx context.Context, req *datacatalogpb.ListPolicyTagsRequest, opts ...gax.CallOption) *PolicyTagIterator
- func (c *PolicyTagManagerClient) ListTaxonomies(ctx context.Context, req *datacatalogpb.ListTaxonomiesRequest, opts ...gax.CallOption) *TaxonomyIterator
- func (c *PolicyTagManagerClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *PolicyTagManagerClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
- func (c *PolicyTagManagerClient) UpdatePolicyTag(ctx context.Context, req *datacatalogpb.UpdatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
- func (c *PolicyTagManagerClient) UpdateTaxonomy(ctx context.Context, req *datacatalogpb.UpdateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
- type PolicyTagManagerSerializationCallOptions
- type PolicyTagManagerSerializationClient
- func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerSerializationClient, error)
- func NewPolicyTagManagerSerializationRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerSerializationClient, error)
- func (c *PolicyTagManagerSerializationClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerSerializationClient) Close() error
- func (c *PolicyTagManagerSerializationClient) Connection() *grpc.ClientConn
- func (c *PolicyTagManagerSerializationClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
- func (c *PolicyTagManagerSerializationClient) ExportTaxonomies(ctx context.Context, req *datacatalogpb.ExportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ExportTaxonomiesResponse, error)
- func (c *PolicyTagManagerSerializationClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
- func (c *PolicyTagManagerSerializationClient) ImportTaxonomies(ctx context.Context, req *datacatalogpb.ImportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ImportTaxonomiesResponse, error)
- func (c *PolicyTagManagerSerializationClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
- func (c *PolicyTagManagerSerializationClient) ReplaceTaxonomy(ctx context.Context, req *datacatalogpb.ReplaceTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
- type ReconcileTagsOperation
- func (op *ReconcileTagsOperation) Done() bool
- func (op *ReconcileTagsOperation) Metadata() (*datacatalogpb.ReconcileTagsMetadata, error)
- func (op *ReconcileTagsOperation) Name() string
- func (op *ReconcileTagsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ReconcileTagsResponse, error)
- func (op *ReconcileTagsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ReconcileTagsResponse, error)
- type SearchCatalogResultIterator
- func (it *SearchCatalogResultIterator) All() iter.Seq2[*datacatalogpb.SearchCatalogResult, error]
- func (it *SearchCatalogResultIterator) Next() (*datacatalogpb.SearchCatalogResult, error)
- func (it *SearchCatalogResultIterator) PageInfo() *iterator.PageInfo
- type TagIterator
- func (it *TagIterator) All() iter.Seq2[*datacatalogpb.Tag, error]
- func (it *TagIterator) Next() (*datacatalogpb.Tag, error)
- func (it *TagIterator) PageInfo() *iterator.PageInfo
- type TaxonomyIterator
Examples ¶
- Client.CancelOperation
- Client.CreateEntry
- Client.CreateEntryGroup
- Client.CreateTag
- Client.CreateTagTemplate
- Client.CreateTagTemplateField
- Client.DeleteEntry
- Client.DeleteEntryGroup
- Client.DeleteOperation
- Client.DeleteTag
- Client.DeleteTagTemplate
- Client.DeleteTagTemplateField
- Client.GetEntry
- Client.GetEntryGroup
- Client.GetIamPolicy
- Client.GetOperation
- Client.GetTagTemplate
- Client.ImportEntries
- Client.ListEntries
- Client.ListEntries (All)
- Client.ListEntryGroups
- Client.ListEntryGroups (All)
- Client.ListOperations
- Client.ListOperations (All)
- Client.ListTags
- Client.ListTags (All)
- Client.LookupEntry
- Client.ModifyEntryContacts
- Client.ModifyEntryOverview
- Client.ReconcileTags
- Client.RenameTagTemplateField
- Client.RenameTagTemplateFieldEnumValue
- Client.RetrieveConfig
- Client.RetrieveEffectiveConfig
- Client.SearchCatalog
- Client.SearchCatalog (All)
- Client.SetConfig
- Client.SetIamPolicy
- Client.StarEntry
- Client.TestIamPermissions
- Client.UnstarEntry
- Client.UpdateEntry
- Client.UpdateEntryGroup
- Client.UpdateTag
- Client.UpdateTagTemplate
- Client.UpdateTagTemplateField
- NewClient
- NewPolicyTagManagerClient
- NewPolicyTagManagerRESTClient
- NewPolicyTagManagerSerializationClient
- NewPolicyTagManagerSerializationRESTClient
- NewRESTClient
- PolicyTagManagerClient.CancelOperation
- PolicyTagManagerClient.CreatePolicyTag
- PolicyTagManagerClient.CreateTaxonomy
- PolicyTagManagerClient.DeleteOperation
- PolicyTagManagerClient.DeletePolicyTag
- PolicyTagManagerClient.DeleteTaxonomy
- PolicyTagManagerClient.GetIamPolicy
- PolicyTagManagerClient.GetOperation
- PolicyTagManagerClient.GetPolicyTag
- PolicyTagManagerClient.GetTaxonomy
- PolicyTagManagerClient.ListOperations
- PolicyTagManagerClient.ListOperations (All)
- PolicyTagManagerClient.ListPolicyTags
- PolicyTagManagerClient.ListPolicyTags (All)
- PolicyTagManagerClient.ListTaxonomies
- PolicyTagManagerClient.ListTaxonomies (All)
- PolicyTagManagerClient.SetIamPolicy
- PolicyTagManagerClient.TestIamPermissions
- PolicyTagManagerClient.UpdatePolicyTag
- PolicyTagManagerClient.UpdateTaxonomy
- PolicyTagManagerSerializationClient.CancelOperation
- PolicyTagManagerSerializationClient.DeleteOperation
- PolicyTagManagerSerializationClient.ExportTaxonomies
- PolicyTagManagerSerializationClient.GetOperation
- PolicyTagManagerSerializationClient.ImportTaxonomies
- PolicyTagManagerSerializationClient.ListOperations
- PolicyTagManagerSerializationClient.ListOperations (All)
- PolicyTagManagerSerializationClient.ReplaceTaxonomy
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CallOptions ¶
type CallOptions struct {
SearchCatalog []gax.CallOption
CreateEntryGroup []gax.CallOption
GetEntryGroup []gax.CallOption
UpdateEntryGroup []gax.CallOption
DeleteEntryGroup []gax.CallOption
ListEntryGroups []gax.CallOption
CreateEntry []gax.CallOption
UpdateEntry []gax.CallOption
DeleteEntry []gax.CallOption
GetEntry []gax.CallOption
LookupEntry []gax.CallOption
ListEntries []gax.CallOption
ModifyEntryOverview []gax.CallOption
ModifyEntryContacts []gax.CallOption
CreateTagTemplate []gax.CallOption
GetTagTemplate []gax.CallOption
UpdateTagTemplate []gax.CallOption
DeleteTagTemplate []gax.CallOption
CreateTagTemplateField []gax.CallOption
UpdateTagTemplateField []gax.CallOption
RenameTagTemplateField []gax.CallOption
RenameTagTemplateFieldEnumValue []gax.CallOption
DeleteTagTemplateField []gax.CallOption
CreateTag []gax.CallOption
UpdateTag []gax.CallOption
DeleteTag []gax.CallOption
ListTags []gax.CallOption
ReconcileTags []gax.CallOption
StarEntry []gax.CallOption
UnstarEntry []gax.CallOption
SetIamPolicy []gax.CallOption
GetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
ImportEntries []gax.CallOption
SetConfig []gax.CallOption
RetrieveConfig []gax.CallOption
RetrieveEffectiveConfig []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
type Client ¶
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with Google Cloud Data Catalog API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Deprecated: Please use Dataplex Catalog instead.
Data Catalog API service allows you to discover, understand, and manage your data.
Deprecated: DataCatalog may be removed in a future version.
func NewClient ¶
NewClient creates a new data catalog client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Deprecated: Please use Dataplex Catalog instead.
Data Catalog API service allows you to discover, understand, and manage your data.
Deprecated: DataCatalog may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient ¶
NewRESTClient creates a new data catalog rest client.
Deprecated: Please use Dataplex Catalog instead.
Data Catalog API service allows you to discover, understand, and manage your data.
Deprecated: DataCatalog may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation ¶
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection ¶
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateEntry ¶
func (c *Client) CreateEntry(ctx context.Context, req *datacatalogpb.CreateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
CreateEntry creates an entry.
You can create entries only with ‘FILESET’, ‘CLUSTER’, ‘DATA_STREAM’, or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems.
You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
An entry group can have a maximum of 100,000 entries.
Deprecated: CreateEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateEntryRequest.
}
resp, err := c.CreateEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateEntryGroup ¶
func (c *Client) CreateEntryGroup(ctx context.Context, req *datacatalogpb.CreateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
CreateEntryGroup creates an entry group.
An entry group contains logically related entries together with Cloud Identity and Access Management (at /data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups.
Data Catalog automatically creates entry groups with names that start with the @ symbol for the following resources:
BigQuery entries (@bigquery)
Pub/Sub topics (@pubsub)
Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})
You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can’t contain the @ symbol, it is reserved for automatically created groups.
Entry groups, like entries, can be searched.
A maximum of 10,000 entry groups may be created per organization across all locations.
You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: CreateEntryGroup may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateEntryGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateEntryGroupRequest.
}
resp, err := c.CreateEntryGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateTag ¶
func (c *Client) CreateTag(ctx context.Context, req *datacatalogpb.CreateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error)
CreateTag creates a tag and assigns it to:
An Entry if the method name is projects.locations.entryGroups.entries.tags.create. Or EntryGroupif the method name is projects.locations.entryGroups.tags.create.
Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters (at https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters (at https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)) used to create the tag must be in the same organization.
Deprecated: CreateTag may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateTagRequest.
}
resp, err := c.CreateTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateTagTemplate ¶
func (c *Client) CreateTagTemplate(ctx context.Context, req *datacatalogpb.CreateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
CreateTagTemplate creates a tag template.
You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)).
Deprecated: CreateTagTemplate may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateTagTemplateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateTagTemplateRequest.
}
resp, err := c.CreateTagTemplate(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateTagTemplateField ¶
func (c *Client) CreateTagTemplateField(ctx context.Context, req *datacatalogpb.CreateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
CreateTagTemplateField creates a field in a tag template.
You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: CreateTagTemplateField may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateTagTemplateFieldRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateTagTemplateFieldRequest.
}
resp, err := c.CreateTagTemplateField(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DeleteEntry ¶
func (c *Client) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteEntryRequest, opts ...gax.CallOption) error
DeleteEntry deletes an existing entry.
You can delete only the entries created by the CreateEntry method.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: DeleteEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteEntryRequest.
}
err = c.DeleteEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteEntryGroup ¶
func (c *Client) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.DeleteEntryGroupRequest, opts ...gax.CallOption) error
DeleteEntryGroup deletes an entry group.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: DeleteEntryGroup may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteEntryGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteEntryGroupRequest.
}
err = c.DeleteEntryGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteOperation ¶
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTag ¶
func (c *Client) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTagRequest, opts ...gax.CallOption) error
DeleteTag deletes a tag.
Deprecated: DeleteTag may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteTagRequest.
}
err = c.DeleteTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTagTemplate ¶
func (c *Client) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.DeleteTagTemplateRequest, opts ...gax.CallOption) error
DeleteTagTemplate deletes a tag template and all tags that use it.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: DeleteTagTemplate may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteTagTemplateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteTagTemplateRequest.
}
err = c.DeleteTagTemplate(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTagTemplateField ¶
func (c *Client) DeleteTagTemplateField(ctx context.Context, req *datacatalogpb.DeleteTagTemplateFieldRequest, opts ...gax.CallOption) error
DeleteTagTemplateField deletes a field in a tag template and all uses of this field from the tags based on this template.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: DeleteTagTemplateField may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteTagTemplateFieldRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteTagTemplateFieldRequest.
}
err = c.DeleteTagTemplateField(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) GetEntry ¶
func (c *Client) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
GetEntry gets an entry.
Deprecated: GetEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.GetEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#GetEntryRequest.
}
resp, err := c.GetEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetEntryGroup ¶
func (c *Client) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
GetEntryGroup gets an entry group.
Deprecated: GetEntryGroup may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.GetEntryGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#GetEntryGroupRequest.
}
resp, err := c.GetEntryGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy ¶
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource.
May return:
ANOT_FOUND error if the resource doesn’t exist or you don’t have the permission to view it. An empty policy if the resource exists but doesn’t have a set policy.
Supported resources are:
Tag templates Entry groups
Note: This method doesn’t get policies from Google Cloud Platform resources ingested into Data Catalog.
To call this method, you must have the following Google IAM permissions:
datacatalog.tagTemplates.getIamPolicy to get policies on tag templates. datacatalog.entryGroups.getIamPolicy to get policies on entry groups.
Deprecated: GetIamPolicy may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation ¶
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetTagTemplate ¶
func (c *Client) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
GetTagTemplate gets a tag template.
Deprecated: GetTagTemplate may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.GetTagTemplateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#GetTagTemplateRequest.
}
resp, err := c.GetTagTemplate(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ImportEntries ¶
func (c *Client) ImportEntries(ctx context.Context, req *datacatalogpb.ImportEntriesRequest, opts ...gax.CallOption) (*ImportEntriesOperation, error)
ImportEntries imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog.
ImportEntries accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of DumpItem type.
ImportEntries returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with Operations.GetOperation to return ImportEntriesMetadata and an ImportEntriesResponse message.
Deprecated: ImportEntries may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ImportEntriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ImportEntriesRequest.
}
op, err := c.ImportEntries(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ImportEntriesOperation ¶
func (c *Client) ImportEntriesOperation(name string) *ImportEntriesOperation
ImportEntriesOperation returns a new ImportEntriesOperation from a given name. The name must be that of a previously created ImportEntriesOperation, possibly from a different process.
func (*Client) ListEntries ¶
func (c *Client) ListEntries(ctx context.Context, req *datacatalogpb.ListEntriesRequest, opts ...gax.CallOption) *EntryIterator
ListEntries lists entries.
Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use SearchCatalog.
Deprecated: ListEntries may be removed in a future version.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListEntriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListEntriesRequest.
}
it := c.ListEntries(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.ListEntriesResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListEntriesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListEntriesRequest.
}
for resp, err := range c.ListEntries(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListEntryGroups ¶
func (c *Client) ListEntryGroups(ctx context.Context, req *datacatalogpb.ListEntryGroupsRequest, opts ...gax.CallOption) *EntryGroupIterator
ListEntryGroups lists entry groups.
Deprecated: ListEntryGroups may be removed in a future version.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListEntryGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListEntryGroupsRequest.
}
it := c.ListEntryGroups(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.ListEntryGroupsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListEntryGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListEntryGroupsRequest.
}
for resp, err := range c.ListEntryGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations ¶
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListTags ¶
func (c *Client) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator
ListTags lists tags assigned to an Entry. The columns in the response are lowercased.
Deprecated: ListTags may be removed in a future version.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListTagsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListTagsRequest.
}
it := c.ListTags(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.ListTagsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListTagsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListTagsRequest.
}
for resp, err := range c.ListTags(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) LookupEntry ¶
func (c *Client) LookupEntry(ctx context.Context, req *datacatalogpb.LookupEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
LookupEntry gets an entry by its target resource name.
The resource name comes from the source Google Cloud Platform service.
Deprecated: LookupEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.LookupEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#LookupEntryRequest.
}
resp, err := c.LookupEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ModifyEntryContacts ¶
func (c *Client) ModifyEntryContacts(ctx context.Context, req *datacatalogpb.ModifyEntryContactsRequest, opts ...gax.CallOption) (*datacatalogpb.Contacts, error)
ModifyEntryContacts modifies contacts, part of the business context of an Entry.
To call this method, you must have the datacatalog.entries.updateContacts IAM permission on the corresponding project.
Deprecated: ModifyEntryContacts may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ModifyEntryContactsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ModifyEntryContactsRequest.
}
resp, err := c.ModifyEntryContacts(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ModifyEntryOverview ¶
func (c *Client) ModifyEntryOverview(ctx context.Context, req *datacatalogpb.ModifyEntryOverviewRequest, opts ...gax.CallOption) (*datacatalogpb.EntryOverview, error)
ModifyEntryOverview modifies entry overview, part of the business context of an Entry.
To call this method, you must have the datacatalog.entries.updateOverview IAM permission on the corresponding project.
Deprecated: ModifyEntryOverview may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ModifyEntryOverviewRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ModifyEntryOverviewRequest.
}
resp, err := c.ModifyEntryOverview(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ReconcileTags ¶
func (c *Client) ReconcileTags(ctx context.Context, req *datacatalogpb.ReconcileTagsRequest, opts ...gax.CallOption) (*ReconcileTagsOperation, error)
ReconcileTags ReconcileTags creates or updates a list of tags on the entry. If the ReconcileTagsRequest.force_delete_missing parameter is set, the operation deletes tags not included in the input tag list.
ReconcileTags returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with Operations.GetOperation to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.
Deprecated: ReconcileTags may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ReconcileTagsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ReconcileTagsRequest.
}
op, err := c.ReconcileTags(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ReconcileTagsOperation ¶
func (c *Client) ReconcileTagsOperation(name string) *ReconcileTagsOperation
ReconcileTagsOperation returns a new ReconcileTagsOperation from a given name. The name must be that of a previously created ReconcileTagsOperation, possibly from a different process.
func (*Client) RenameTagTemplateField ¶
func (c *Client) RenameTagTemplateField(ctx context.Context, req *datacatalogpb.RenameTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
RenameTagTemplateField renames a field in a tag template.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)).
Deprecated: RenameTagTemplateField may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.RenameTagTemplateFieldRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#RenameTagTemplateFieldRequest.
}
resp, err := c.RenameTagTemplateField(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) RenameTagTemplateFieldEnumValue ¶
func (c *Client) RenameTagTemplateFieldEnumValue(ctx context.Context, req *datacatalogpb.RenameTagTemplateFieldEnumValueRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
RenameTagTemplateFieldEnumValue renames an enum value in a tag template.
Within a single enum field, enum values must be unique.
Deprecated: RenameTagTemplateFieldEnumValue may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.RenameTagTemplateFieldEnumValueRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#RenameTagTemplateFieldEnumValueRequest.
}
resp, err := c.RenameTagTemplateFieldEnumValue(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) RetrieveConfig ¶
func (c *Client) RetrieveConfig(ctx context.Context, req *datacatalogpb.RetrieveConfigRequest, opts ...gax.CallOption) (*datacatalogpb.OrganizationConfig, error)
RetrieveConfig retrieves the configuration related to the migration from Data Catalog to Dataplex for a specific organization, including all the projects under it which have a separate configuration set.
Deprecated: RetrieveConfig may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.RetrieveConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#RetrieveConfigRequest.
}
resp, err := c.RetrieveConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) RetrieveEffectiveConfig ¶
func (c *Client) RetrieveEffectiveConfig(ctx context.Context, req *datacatalogpb.RetrieveEffectiveConfigRequest, opts ...gax.CallOption) (*datacatalogpb.MigrationConfig, error)
RetrieveEffectiveConfig retrieves the effective configuration related to the migration from Data Catalog to Dataplex for a specific organization or project. If there is no specific configuration set for the resource, the setting is checked hierarchicahlly through the ancestors of the resource, starting from the resource itself.
Deprecated: RetrieveEffectiveConfig may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.RetrieveEffectiveConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#RetrieveEffectiveConfigRequest.
}
resp, err := c.RetrieveEffectiveConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) SearchCatalog ¶
func (c *Client) SearchCatalog(ctx context.Context, req *datacatalogpb.SearchCatalogRequest, opts ...gax.CallOption) *SearchCatalogResultIterator
SearchCatalog searches Data Catalog for multiple resources like entries and tags that match a query.
This is a [Custom Method] (https://cloud.google.com/apis/design/custom_methods (at https://cloud.google.com/apis/design/custom_methods)) that doesn’t return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.
Note: Data Catalog search queries don’t guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.
For more information, see [Data Catalog search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-reference (at https://cloud.google.com/data-catalog/docs/how-to/search-reference)).
Deprecated: SearchCatalog may be removed in a future version.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.SearchCatalogRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#SearchCatalogRequest.
}
it := c.SearchCatalog(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.SearchCatalogResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.SearchCatalogRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#SearchCatalogRequest.
}
for resp, err := range c.SearchCatalog(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) SetConfig ¶
func (c *Client) SetConfig(ctx context.Context, req *datacatalogpb.SetConfigRequest, opts ...gax.CallOption) (*datacatalogpb.MigrationConfig, error)
SetConfig sets the configuration related to the migration to Dataplex for an organization or project.
Deprecated: SetConfig may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.SetConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#SetConfigRequest.
}
resp, err := c.SetConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) SetIamPolicy ¶
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets an access control policy for a resource. Replaces any existing policy.
Supported resources are:
Tag templates Entry groups
Note: This method sets policies only within Data Catalog and can’t be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog.
To call this method, you must have the following Google IAM permissions:
datacatalog.tagTemplates.setIamPolicy to set policies on tag templates. datacatalog.entryGroups.setIamPolicy to set policies on entry groups.
Deprecated: SetIamPolicy may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) StarEntry ¶
func (c *Client) StarEntry(ctx context.Context, req *datacatalogpb.StarEntryRequest, opts ...gax.CallOption) (*datacatalogpb.StarEntryResponse, error)
StarEntry marks an Entry as starred by the current user. Starring information is private to each user.
Deprecated: StarEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.StarEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#StarEntryRequest.
}
resp, err := c.StarEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissions ¶
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions gets your permissions on a resource.
Returns an empty set of permissions if the resource doesn’t exist.
Supported resources are:
Tag templates Entry groups
Note: This method gets policies only within Data Catalog and can’t be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog.
No Google IAM permissions are required to call this method.
Deprecated: TestIamPermissions may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UnstarEntry ¶
func (c *Client) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarEntryRequest, opts ...gax.CallOption) (*datacatalogpb.UnstarEntryResponse, error)
UnstarEntry marks an Entry as NOT starred by the current user. Starring information is private to each user.
Deprecated: UnstarEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UnstarEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UnstarEntryRequest.
}
resp, err := c.UnstarEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateEntry ¶
func (c *Client) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error)
UpdateEntry updates an existing entry.
You must enable the Data Catalog API in the project identified by the entry.name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: UpdateEntry may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateEntryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateEntryRequest.
}
resp, err := c.UpdateEntry(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateEntryGroup ¶
func (c *Client) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.UpdateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error)
UpdateEntryGroup updates an entry group.
You must enable the Data Catalog API in the project identified by the entry_group.name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: UpdateEntryGroup may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateEntryGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateEntryGroupRequest.
}
resp, err := c.UpdateEntryGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateTag ¶
func (c *Client) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error)
UpdateTag updates an existing tag.
Deprecated: UpdateTag may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateTagRequest.
}
resp, err := c.UpdateTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateTagTemplate ¶
func (c *Client) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.UpdateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error)
UpdateTagTemplate updates a tag template.
You can’t update template fields with this method. These fields are separate resources with their own create, update, and delete methods.
You must enable the Data Catalog API in the project identified by the tag_template.name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: UpdateTagTemplate may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateTagTemplateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateTagTemplateRequest.
}
resp, err := c.UpdateTagTemplate(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateTagTemplateField ¶
func (c *Client) UpdateTagTemplateField(ctx context.Context, req *datacatalogpb.UpdateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error)
UpdateTagTemplateField updates a field in a tag template.
You can’t update the field type with this method.
You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project).
Deprecated: UpdateTagTemplateField may be removed in a future version.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateTagTemplateFieldRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateTagTemplateFieldRequest.
}
resp, err := c.UpdateTagTemplateField(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type EntryGroupIterator ¶
type EntryGroupIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.EntryGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}
EntryGroupIterator manages a stream of *datacatalogpb.EntryGroup.
func (*EntryGroupIterator) All ¶
func (it *EntryGroupIterator) All() iter.Seq2[*datacatalogpb.EntryGroup, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*EntryGroupIterator) Next ¶
func (it *EntryGroupIterator) Next() (*datacatalogpb.EntryGroup, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*EntryGroupIterator) PageInfo ¶
func (it *EntryGroupIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type EntryIterator ¶
type EntryIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.Entry, nextPageToken string, err error)
// contains filtered or unexported fields
}
EntryIterator manages a stream of *datacatalogpb.Entry.
func (*EntryIterator) All ¶
func (it *EntryIterator) All() iter.Seq2[*datacatalogpb.Entry, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*EntryIterator) Next ¶
func (it *EntryIterator) Next() (*datacatalogpb.Entry, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*EntryIterator) PageInfo ¶
func (it *EntryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IamPolicyCallOptions ¶
type IamPolicyCallOptions struct {
SetIamPolicy []gax.CallOption
GetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
IamPolicyCallOptions contains the retry settings for each method of IamPolicyClient.
type IamPolicyClient ¶
type IamPolicyClient struct {
// The call options for this service.
CallOptions *IamPolicyCallOptions
// contains filtered or unexported fields
}
IamPolicyClient is a client for interacting with Batch API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
API Overview
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func NewIamPolicyClient ¶
func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyClient creates a new iam policy client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
API Overview
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func NewIamPolicyRESTClient ¶
func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyRESTClient creates a new iam policy rest client.
API Overview
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
Policy StructureSee google.iam.v1.Policy
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
func (*IamPolicyClient) CancelOperation ¶
func (c *IamPolicyClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) Close ¶
func (c *IamPolicyClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*IamPolicyClient) Connection ¶
func (c *IamPolicyClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*IamPolicyClient) DeleteOperation ¶
func (c *IamPolicyClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) GetIamPolicy ¶
func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
func (*IamPolicyClient) GetOperation ¶
func (c *IamPolicyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) ListOperations ¶
func (c *IamPolicyClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
func (*IamPolicyClient) SetIamPolicy ¶
func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
func (*IamPolicyClient) TestIamPermissions ¶
func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
type ImportEntriesOperation ¶
type ImportEntriesOperation struct {
// contains filtered or unexported fields
}
ImportEntriesOperation manages a long-running operation from ImportEntries.
func (*ImportEntriesOperation) Done ¶
func (op *ImportEntriesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ImportEntriesOperation) Metadata ¶
func (op *ImportEntriesOperation) Metadata() (*datacatalogpb.ImportEntriesMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ImportEntriesOperation) Name ¶
func (op *ImportEntriesOperation) 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 (*ImportEntriesOperation) Poll ¶
func (op *ImportEntriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ImportEntriesResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ImportEntriesOperation) Wait ¶
func (op *ImportEntriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ImportEntriesResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type OperationIterator ¶
type OperationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PolicyTagIterator ¶
type PolicyTagIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.PolicyTag, nextPageToken string, err error)
// contains filtered or unexported fields
}
PolicyTagIterator manages a stream of *datacatalogpb.PolicyTag.
func (*PolicyTagIterator) All ¶
func (it *PolicyTagIterator) All() iter.Seq2[*datacatalogpb.PolicyTag, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*PolicyTagIterator) Next ¶
func (it *PolicyTagIterator) Next() (*datacatalogpb.PolicyTag, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*PolicyTagIterator) PageInfo ¶
func (it *PolicyTagIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PolicyTagManagerCallOptions ¶
type PolicyTagManagerCallOptions struct {
CreateTaxonomy []gax.CallOption
DeleteTaxonomy []gax.CallOption
UpdateTaxonomy []gax.CallOption
ListTaxonomies []gax.CallOption
GetTaxonomy []gax.CallOption
CreatePolicyTag []gax.CallOption
DeletePolicyTag []gax.CallOption
UpdatePolicyTag []gax.CallOption
ListPolicyTags []gax.CallOption
GetPolicyTag []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
PolicyTagManagerCallOptions contains the retry settings for each method of PolicyTagManagerClient.
type PolicyTagManagerClient ¶
type PolicyTagManagerClient struct {
// The call options for this service.
CallOptions *PolicyTagManagerCallOptions
// contains filtered or unexported fields
}
PolicyTagManagerClient is a client for interacting with Google Cloud Data Catalog API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Policy Tag Manager API service allows you to manage your policy tags and taxonomies.
Policy tags are used to tag BigQuery columns and apply additional access control policies. A taxonomy is a hierarchical grouping of policy tags that classify data along a common axis.
func NewPolicyTagManagerClient ¶
func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerClient, error)
NewPolicyTagManagerClient creates a new policy tag manager client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Policy Tag Manager API service allows you to manage your policy tags and taxonomies.
Policy tags are used to tag BigQuery columns and apply additional access
control policies. A taxonomy is a hierarchical grouping of policy tags that
classify data along a common axis.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewPolicyTagManagerRESTClient ¶
func NewPolicyTagManagerRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerClient, error)
NewPolicyTagManagerRESTClient creates a new policy tag manager rest client.
Policy Tag Manager API service allows you to manage your policy tags and taxonomies.
Policy tags are used to tag BigQuery columns and apply additional access
control policies. A taxonomy is a hierarchical grouping of policy tags that
classify data along a common axis.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*PolicyTagManagerClient) CancelOperation ¶
func (c *PolicyTagManagerClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerClient) Close ¶
func (c *PolicyTagManagerClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PolicyTagManagerClient) Connection ¶
func (c *PolicyTagManagerClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*PolicyTagManagerClient) CreatePolicyTag ¶
func (c *PolicyTagManagerClient) CreatePolicyTag(ctx context.Context, req *datacatalogpb.CreatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
CreatePolicyTag creates a policy tag in a taxonomy.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreatePolicyTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreatePolicyTagRequest.
}
resp, err := c.CreatePolicyTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) CreateTaxonomy ¶
func (c *PolicyTagManagerClient) CreateTaxonomy(ctx context.Context, req *datacatalogpb.CreateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
CreateTaxonomy creates a taxonomy in a specified project.
The taxonomy is initially empty, that is, it doesn’t contain policy tags.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.CreateTaxonomyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#CreateTaxonomyRequest.
}
resp, err := c.CreateTaxonomy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) DeleteOperation ¶
func (c *PolicyTagManagerClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerClient) DeletePolicyTag ¶
func (c *PolicyTagManagerClient) DeletePolicyTag(ctx context.Context, req *datacatalogpb.DeletePolicyTagRequest, opts ...gax.CallOption) error
DeletePolicyTag deletes a policy tag together with the following:
All of its descendant policy tags, if any Policies associated with the policy tag and its descendants References from BigQuery table schema of the policy tag and its descendants
Example¶
Code:play
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeletePolicyTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeletePolicyTagRequest.
}
err = c.DeletePolicyTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerClient) DeleteTaxonomy ¶
func (c *PolicyTagManagerClient) DeleteTaxonomy(ctx context.Context, req *datacatalogpb.DeleteTaxonomyRequest, opts ...gax.CallOption) error
DeleteTaxonomy deletes a taxonomy, including all policy tags in this
taxonomy, their associated policies, and the policy tags references from
BigQuery columns.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.DeleteTaxonomyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#DeleteTaxonomyRequest.
}
err = c.DeleteTaxonomy(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerClient) GetIamPolicy ¶
func (c *PolicyTagManagerClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the IAM policy for a policy tag or a taxonomy.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) GetOperation ¶
func (c *PolicyTagManagerClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) GetPolicyTag ¶
func (c *PolicyTagManagerClient) GetPolicyTag(ctx context.Context, req *datacatalogpb.GetPolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
GetPolicyTag gets a policy tag.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.GetPolicyTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#GetPolicyTagRequest.
}
resp, err := c.GetPolicyTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) GetTaxonomy ¶
func (c *PolicyTagManagerClient) GetTaxonomy(ctx context.Context, req *datacatalogpb.GetTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
GetTaxonomy gets a taxonomy.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.GetTaxonomyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#GetTaxonomyRequest.
}
resp, err := c.GetTaxonomy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) ListOperations ¶
func (c *PolicyTagManagerClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*PolicyTagManagerClient) ListPolicyTags ¶
func (c *PolicyTagManagerClient) ListPolicyTags(ctx context.Context, req *datacatalogpb.ListPolicyTagsRequest, opts ...gax.CallOption) *PolicyTagIterator
ListPolicyTags lists all policy tags in a taxonomy.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListPolicyTagsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListPolicyTagsRequest.
}
it := c.ListPolicyTags(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.ListPolicyTagsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListPolicyTagsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListPolicyTagsRequest.
}
for resp, err := range c.ListPolicyTags(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*PolicyTagManagerClient) ListTaxonomies ¶
func (c *PolicyTagManagerClient) ListTaxonomies(ctx context.Context, req *datacatalogpb.ListTaxonomiesRequest, opts ...gax.CallOption) *TaxonomyIterator
ListTaxonomies lists all taxonomies in a project in a particular location that you
have a permission to view.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListTaxonomiesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListTaxonomiesRequest.
}
it := c.ListTaxonomies(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*datacatalogpb.ListTaxonomiesResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ListTaxonomiesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ListTaxonomiesRequest.
}
for resp, err := range c.ListTaxonomies(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*PolicyTagManagerClient) SetIamPolicy ¶
func (c *PolicyTagManagerClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the IAM policy for a policy tag or a taxonomy.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) TestIamPermissions ¶
func (c *PolicyTagManagerClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns your permissions on a specified policy tag or
taxonomy.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
iampb "cloud.google.com/go/iam/apiv1/iampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) UpdatePolicyTag ¶
func (c *PolicyTagManagerClient) UpdatePolicyTag(ctx context.Context, req *datacatalogpb.UpdatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error)
UpdatePolicyTag updates a policy tag, including its display
name, description, and parent policy tag.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdatePolicyTagRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdatePolicyTagRequest.
}
resp, err := c.UpdatePolicyTag(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerClient) UpdateTaxonomy ¶
func (c *PolicyTagManagerClient) UpdateTaxonomy(ctx context.Context, req *datacatalogpb.UpdateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
UpdateTaxonomy updates a taxonomy, including its display name,
description, and activated policy types.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.UpdateTaxonomyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#UpdateTaxonomyRequest.
}
resp, err := c.UpdateTaxonomy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type PolicyTagManagerSerializationCallOptions ¶
type PolicyTagManagerSerializationCallOptions struct {
ReplaceTaxonomy []gax.CallOption
ImportTaxonomies []gax.CallOption
ExportTaxonomies []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
PolicyTagManagerSerializationCallOptions contains the retry settings for each method of PolicyTagManagerSerializationClient.
type PolicyTagManagerSerializationClient ¶
type PolicyTagManagerSerializationClient struct {
// The call options for this service.
CallOptions *PolicyTagManagerSerializationCallOptions
// contains filtered or unexported fields
}
PolicyTagManagerSerializationClient is a client for interacting with Google Cloud Data Catalog API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Policy Tag Manager Serialization API service allows you to manipulate your policy tags and taxonomies in a serialized format.
Taxonomy is a hierarchical group of policy tags.
func NewPolicyTagManagerSerializationClient ¶
func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerSerializationClient, error)
NewPolicyTagManagerSerializationClient creates a new policy tag manager serialization client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Policy Tag Manager Serialization API service allows you to manipulate your policy tags and taxonomies in a serialized format.
Taxonomy is a hierarchical group of policy tags.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewPolicyTagManagerSerializationRESTClient ¶
func NewPolicyTagManagerSerializationRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerSerializationClient, error)
NewPolicyTagManagerSerializationRESTClient creates a new policy tag manager serialization rest client.
Policy Tag Manager Serialization API service allows you to manipulate your policy tags and taxonomies in a serialized format.
Taxonomy is a hierarchical group of policy tags.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*PolicyTagManagerSerializationClient) CancelOperation ¶
func (c *PolicyTagManagerSerializationClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerSerializationClient) Close ¶
func (c *PolicyTagManagerSerializationClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PolicyTagManagerSerializationClient) Connection ¶
func (c *PolicyTagManagerSerializationClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*PolicyTagManagerSerializationClient) DeleteOperation ¶
func (c *PolicyTagManagerSerializationClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyTagManagerSerializationClient) ExportTaxonomies ¶
func (c *PolicyTagManagerSerializationClient) ExportTaxonomies(ctx context.Context, req *datacatalogpb.ExportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ExportTaxonomiesResponse, error)
ExportTaxonomies exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project.
This method generates SerializedTaxonomy protocol buffers with nested
policy tags that can be used as input for ImportTaxonomies calls.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ExportTaxonomiesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ExportTaxonomiesRequest.
}
resp, err := c.ExportTaxonomies(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerSerializationClient) GetOperation ¶
func (c *PolicyTagManagerSerializationClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerSerializationClient) ImportTaxonomies ¶
func (c *PolicyTagManagerSerializationClient) ImportTaxonomies(ctx context.Context, req *datacatalogpb.ImportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ImportTaxonomiesResponse, error)
ImportTaxonomies creates new taxonomies (including their policy tags) in a given project by importing from inlined or cross-regional sources.
For a cross-regional source, new taxonomies are created by copying from a source in another region.
For an inlined source, taxonomies and policy tags are created in bulk using
nested protocol buffer structures.
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ImportTaxonomiesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ImportTaxonomiesRequest.
}
resp, err := c.ImportTaxonomies(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyTagManagerSerializationClient) ListOperations ¶
func (c *PolicyTagManagerSerializationClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Code:play
Code:play
Example¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All)¶
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*PolicyTagManagerSerializationClient) ReplaceTaxonomy ¶
func (c *PolicyTagManagerSerializationClient) ReplaceTaxonomy(ctx context.Context, req *datacatalogpb.ReplaceTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error)
ReplaceTaxonomy replaces (updates) a taxonomy and all its policy tags.
The taxonomy and its entire hierarchy of policy tags must be represented literally by SerializedTaxonomy and the nested SerializedPolicyTag messages.
This operation automatically does the following:
Deletes the existing policy tags that are missing from the SerializedPolicyTag. Creates policy tags that don’t have resource names. They are considered new. Updates policy tags with valid resources names accordingly.
Example¶
Code:play
package main
import (
"context"
datacatalog "cloud.google.com/go/datacatalog/apiv1"
datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &datacatalogpb.ReplaceTaxonomyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/datacatalog/apiv1/datacatalogpb#ReplaceTaxonomyRequest.
}
resp, err := c.ReplaceTaxonomy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
type ReconcileTagsOperation ¶
type ReconcileTagsOperation struct {
// contains filtered or unexported fields
}
ReconcileTagsOperation manages a long-running operation from ReconcileTags.
func (*ReconcileTagsOperation) Done ¶
func (op *ReconcileTagsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ReconcileTagsOperation) Metadata ¶
func (op *ReconcileTagsOperation) Metadata() (*datacatalogpb.ReconcileTagsMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ReconcileTagsOperation) Name ¶
func (op *ReconcileTagsOperation) 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 (*ReconcileTagsOperation) Poll ¶
func (op *ReconcileTagsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ReconcileTagsResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ReconcileTagsOperation) Wait ¶
func (op *ReconcileTagsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datacatalogpb.ReconcileTagsResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type SearchCatalogResultIterator ¶
type SearchCatalogResultIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.SearchCatalogResult, nextPageToken string, err error)
// contains filtered or unexported fields
}
SearchCatalogResultIterator manages a stream of *datacatalogpb.SearchCatalogResult.
func (*SearchCatalogResultIterator) All ¶
func (it *SearchCatalogResultIterator) All() iter.Seq2[*datacatalogpb.SearchCatalogResult, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SearchCatalogResultIterator) Next ¶
func (it *SearchCatalogResultIterator) Next() (*datacatalogpb.SearchCatalogResult, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SearchCatalogResultIterator) PageInfo ¶
func (it *SearchCatalogResultIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type TagIterator ¶
type TagIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.Tag, nextPageToken string, err error)
// contains filtered or unexported fields
}
TagIterator manages a stream of *datacatalogpb.Tag.
func (*TagIterator) All ¶
func (it *TagIterator) All() iter.Seq2[*datacatalogpb.Tag, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*TagIterator) Next ¶
func (it *TagIterator) Next() (*datacatalogpb.Tag, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*TagIterator) PageInfo ¶
func (it *TagIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type TaxonomyIterator ¶
type TaxonomyIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*datacatalogpb.Taxonomy, nextPageToken string, err error)
// contains filtered or unexported fields
}
TaxonomyIterator manages a stream of *datacatalogpb.Taxonomy.
func (*TaxonomyIterator) All ¶
func (it *TaxonomyIterator) All() iter.Seq2[*datacatalogpb.Taxonomy, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*TaxonomyIterator) Next ¶
func (it *TaxonomyIterator) Next() (*datacatalogpb.Taxonomy, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*TaxonomyIterator) PageInfo ¶
func (it *TaxonomyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
Source Files ¶
auxiliary.go auxiliary_go123.go data_catalog_client.go doc.go helpers.go iam_policy_client.go policy_tag_manager_client.go policy_tag_manager_serialization_client.go version.go
Directories ¶
| Path | Synopsis |
|---|---|
| apiv1/datacatalogpb |
- Version
- v1.26.0 (latest)
- Published
- Apr 30, 2025
- Platform
- linux/amd64
- Imports
- 30 packages
- Last checked
- 8 months ago –
Tools for package owners.