Package cloud.google.com/go/dlp/apiv2 (v1.27.0) Stay organized with collections Save and categorize content based on your preferences.
Package dlp is an auto-generated package for theSensitive Data Protection (DLP).
Discover and protect your sensitive data. A fully managed service designedto help you discover, classify, and protect your valuable data assets withease.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/dlp/apiv2@latestctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req:=&dlppb.ActivateJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ActivateJobTriggerRequest.}resp,err:=c.ActivateJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
typeCallOptionsstruct{InspectContent[]gax.CallOptionRedactImage[]gax.CallOptionDeidentifyContent[]gax.CallOptionReidentifyContent[]gax.CallOptionListInfoTypes[]gax.CallOptionCreateInspectTemplate[]gax.CallOptionUpdateInspectTemplate[]gax.CallOptionGetInspectTemplate[]gax.CallOptionListInspectTemplates[]gax.CallOptionDeleteInspectTemplate[]gax.CallOptionCreateDeidentifyTemplate[]gax.CallOptionUpdateDeidentifyTemplate[]gax.CallOptionGetDeidentifyTemplate[]gax.CallOptionListDeidentifyTemplates[]gax.CallOptionDeleteDeidentifyTemplate[]gax.CallOptionCreateJobTrigger[]gax.CallOptionUpdateJobTrigger[]gax.CallOptionHybridInspectJobTrigger[]gax.CallOptionGetJobTrigger[]gax.CallOptionListJobTriggers[]gax.CallOptionDeleteJobTrigger[]gax.CallOptionActivateJobTrigger[]gax.CallOptionCreateDiscoveryConfig[]gax.CallOptionUpdateDiscoveryConfig[]gax.CallOptionGetDiscoveryConfig[]gax.CallOptionListDiscoveryConfigs[]gax.CallOptionDeleteDiscoveryConfig[]gax.CallOptionCreateDlpJob[]gax.CallOptionListDlpJobs[]gax.CallOptionGetDlpJob[]gax.CallOptionDeleteDlpJob[]gax.CallOptionCancelDlpJob[]gax.CallOptionCreateStoredInfoType[]gax.CallOptionUpdateStoredInfoType[]gax.CallOptionGetStoredInfoType[]gax.CallOptionListStoredInfoTypes[]gax.CallOptionDeleteStoredInfoType[]gax.CallOptionListProjectDataProfiles[]gax.CallOptionListTableDataProfiles[]gax.CallOptionListColumnDataProfiles[]gax.CallOptionGetProjectDataProfile[]gax.CallOptionListFileStoreDataProfiles[]gax.CallOptionGetFileStoreDataProfile[]gax.CallOptionDeleteFileStoreDataProfile[]gax.CallOptionGetTableDataProfile[]gax.CallOptionGetColumnDataProfile[]gax.CallOptionDeleteTableDataProfile[]gax.CallOptionHybridInspectDlpJob[]gax.CallOptionFinishDlpJob[]gax.CallOptionCreateConnection[]gax.CallOptionGetConnection[]gax.CallOptionListConnections[]gax.CallOptionSearchConnections[]gax.CallOptionDeleteConnection[]gax.CallOptionUpdateConnection[]gax.CallOption}CallOptions contains the retry settings for each method of Client.
Client
typeClientstruct{// The call options for this service.CallOptions*CallOptions// contains filtered or unexported fields}Client is a client for interacting with Sensitive Data Protection (DLP).Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Sensitive Data Protection provides access to a powerful sensitive datainspection, classification, and de-identification platform that workson text, images, and Google Cloud storage repositories.To learn more about concepts and find how-to guides seehttps://cloud.google.com/sensitive-data-protection/docs/ (athttps://cloud.google.com/sensitive-data-protection/docs/).
func NewClient
NewClient creates a new dlp service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Sensitive Data Protection provides access to a powerful sensitive datainspection, classification, and de-identification platform that workson text, images, and Google Cloud storage repositories.To learn more about concepts and find how-to guides seehttps://cloud.google.com/sensitive-data-protection/docs/ (athttps://cloud.google.com/sensitive-data-protection/docs/).
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRESTClient
NewRESTClient creates a new dlp service rest client.
Sensitive Data Protection provides access to a powerful sensitive datainspection, classification, and de-identification platform that workson text, images, and Google Cloud storage repositories.To learn more about concepts and find how-to guides seehttps://cloud.google.com/sensitive-data-protection/docs/ (athttps://cloud.google.com/sensitive-data-protection/docs/).
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) ActivateJobTrigger
func(c*Client)ActivateJobTrigger(ctxcontext.Context,req*dlppb.ActivateJobTriggerRequest,opts...gax.CallOption)(*dlppb.DlpJob,error)ActivateJobTrigger activate a job trigger. Causes the immediate execute of a triggerinstead of waiting on the trigger event to occur.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ActivateJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ActivateJobTriggerRequest.}resp,err:=c.ActivateJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CancelDlpJob
func(c*Client)CancelDlpJob(ctxcontext.Context,req*dlppb.CancelDlpJobRequest,opts...gax.CallOption)errorCancelDlpJob starts asynchronous cancellation on a long-running DlpJob. The servermakes a best effort to cancel the DlpJob, but success is notguaranteed.Seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage)andhttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis (athttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CancelDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CancelDlpJobRequest.}err=c.CancelDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*Client) Connection (deprecated)
func(c*Client)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*Client) CreateConnection
func(c*Client)CreateConnection(ctxcontext.Context,req*dlppb.CreateConnectionRequest,opts...gax.CallOption)(*dlppb.Connection,error)CreateConnection create a Connection to an external data source.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateConnectionRequest.}resp,err:=c.CreateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateDeidentifyTemplate
func(c*Client)CreateDeidentifyTemplate(ctxcontext.Context,req*dlppb.CreateDeidentifyTemplateRequest,opts...gax.CallOption)(*dlppb.DeidentifyTemplate,error)CreateDeidentifyTemplate creates a DeidentifyTemplate for reusing frequently used configurationfor de-identifying content, images, and storage.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateDeidentifyTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateDeidentifyTemplateRequest.}resp,err:=c.CreateDeidentifyTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateDiscoveryConfig
func(c*Client)CreateDiscoveryConfig(ctxcontext.Context,req*dlppb.CreateDiscoveryConfigRequest,opts...gax.CallOption)(*dlppb.DiscoveryConfig,error)CreateDiscoveryConfig creates a config for discovery to scan and profile storage.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateDiscoveryConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateDiscoveryConfigRequest.}resp,err:=c.CreateDiscoveryConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateDlpJob
func(c*Client)CreateDlpJob(ctxcontext.Context,req*dlppb.CreateDlpJobRequest,opts...gax.CallOption)(*dlppb.DlpJob,error)CreateDlpJob creates a new job to inspect storage or calculate risk metrics.Seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage)andhttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis (athttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis)to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, thesystem will automatically choose what detectors to run. By default this maybe all types, but may change over time as detectors are updated.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateDlpJobRequest.}resp,err:=c.CreateDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateInspectTemplate
func(c*Client)CreateInspectTemplate(ctxcontext.Context,req*dlppb.CreateInspectTemplateRequest,opts...gax.CallOption)(*dlppb.InspectTemplate,error)CreateInspectTemplate creates an InspectTemplate for reusing frequently used configurationfor inspecting content, images, and storage.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateInspectTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateInspectTemplateRequest.}resp,err:=c.CreateInspectTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateJobTrigger
func(c*Client)CreateJobTrigger(ctxcontext.Context,req*dlppb.CreateJobTriggerRequest,opts...gax.CallOption)(*dlppb.JobTrigger,error)CreateJobTrigger creates a job trigger to run DLP actions such as scanning storage forsensitive information on a set schedule.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers (athttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateJobTriggerRequest.}resp,err:=c.CreateJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateStoredInfoType
func(c*Client)CreateStoredInfoType(ctxcontext.Context,req*dlppb.CreateStoredInfoTypeRequest,opts...gax.CallOption)(*dlppb.StoredInfoType,error)CreateStoredInfoType creates a pre-built stored infoType to be used for inspection.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes (athttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.CreateStoredInfoTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#CreateStoredInfoTypeRequest.}resp,err:=c.CreateStoredInfoType(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeidentifyContent
func(c*Client)DeidentifyContent(ctxcontext.Context,req*dlppb.DeidentifyContentRequest,opts...gax.CallOption)(*dlppb.DeidentifyContentResponse,error)DeidentifyContent de-identifies potentially sensitive info from a ContentItem.This method has limits on input size and output size.Seehttps://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data (athttps://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data)to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, thesystem will automatically choose what detectors to run. By default this maybe all types, but may change over time as detectors are updated.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeidentifyContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeidentifyContentRequest.}resp,err:=c.DeidentifyContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeleteConnection
func(c*Client)DeleteConnection(ctxcontext.Context,req*dlppb.DeleteConnectionRequest,opts...gax.CallOption)errorDeleteConnection delete a Connection.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteConnectionRequest.}err=c.DeleteConnection(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteDeidentifyTemplate
func(c*Client)DeleteDeidentifyTemplate(ctxcontext.Context,req*dlppb.DeleteDeidentifyTemplateRequest,opts...gax.CallOption)errorDeleteDeidentifyTemplate deletes a DeidentifyTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteDeidentifyTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteDeidentifyTemplateRequest.}err=c.DeleteDeidentifyTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteDiscoveryConfig
func(c*Client)DeleteDiscoveryConfig(ctxcontext.Context,req*dlppb.DeleteDiscoveryConfigRequest,opts...gax.CallOption)errorDeleteDiscoveryConfig deletes a discovery configuration.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteDiscoveryConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteDiscoveryConfigRequest.}err=c.DeleteDiscoveryConfig(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteDlpJob
func(c*Client)DeleteDlpJob(ctxcontext.Context,req*dlppb.DeleteDlpJobRequest,opts...gax.CallOption)errorDeleteDlpJob deletes a long-running DlpJob. This method indicates that the client isno longer interested in the DlpJob result. The job will be canceled ifpossible.Seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage)andhttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis (athttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteDlpJobRequest.}err=c.DeleteDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteFileStoreDataProfile
func(c*Client)DeleteFileStoreDataProfile(ctxcontext.Context,req*dlppb.DeleteFileStoreDataProfileRequest,opts...gax.CallOption)errorDeleteFileStoreDataProfile delete a FileStoreDataProfile. Will not prevent the profile from beingregenerated if the resource is still included in a discovery configuration.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteFileStoreDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteFileStoreDataProfileRequest.}err=c.DeleteFileStoreDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteInspectTemplate
func(c*Client)DeleteInspectTemplate(ctxcontext.Context,req*dlppb.DeleteInspectTemplateRequest,opts...gax.CallOption)errorDeleteInspectTemplate deletes an InspectTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteInspectTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteInspectTemplateRequest.}err=c.DeleteInspectTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteJobTrigger
func(c*Client)DeleteJobTrigger(ctxcontext.Context,req*dlppb.DeleteJobTriggerRequest,opts...gax.CallOption)errorDeleteJobTrigger deletes a job trigger.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers (athttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteJobTriggerRequest.}err=c.DeleteJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteStoredInfoType
func(c*Client)DeleteStoredInfoType(ctxcontext.Context,req*dlppb.DeleteStoredInfoTypeRequest,opts...gax.CallOption)errorDeleteStoredInfoType deletes a stored infoType.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes (athttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteStoredInfoTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteStoredInfoTypeRequest.}err=c.DeleteStoredInfoType(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteTableDataProfile
func(c*Client)DeleteTableDataProfile(ctxcontext.Context,req*dlppb.DeleteTableDataProfileRequest,opts...gax.CallOption)errorDeleteTableDataProfile delete a TableDataProfile. Will not prevent the profile from beingregenerated if the table is still included in a discovery configuration.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.DeleteTableDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#DeleteTableDataProfileRequest.}err=c.DeleteTableDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) FinishDlpJob
func(c*Client)FinishDlpJob(ctxcontext.Context,req*dlppb.FinishDlpJobRequest,opts...gax.CallOption)errorFinishDlpJob finish a running hybrid DlpJob. Triggers the finalization steps and runningof any enabled actions that have not yet run.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.FinishDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#FinishDlpJobRequest.}err=c.FinishDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) GetColumnDataProfile
func(c*Client)GetColumnDataProfile(ctxcontext.Context,req*dlppb.GetColumnDataProfileRequest,opts...gax.CallOption)(*dlppb.ColumnDataProfile,error)GetColumnDataProfile gets a column data profile.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetColumnDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetColumnDataProfileRequest.}resp,err:=c.GetColumnDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetConnection
func(c*Client)GetConnection(ctxcontext.Context,req*dlppb.GetConnectionRequest,opts...gax.CallOption)(*dlppb.Connection,error)GetConnection get a Connection by name.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetConnectionRequest.}resp,err:=c.GetConnection(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetDeidentifyTemplate
func(c*Client)GetDeidentifyTemplate(ctxcontext.Context,req*dlppb.GetDeidentifyTemplateRequest,opts...gax.CallOption)(*dlppb.DeidentifyTemplate,error)GetDeidentifyTemplate gets a DeidentifyTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetDeidentifyTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetDeidentifyTemplateRequest.}resp,err:=c.GetDeidentifyTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetDiscoveryConfig
func(c*Client)GetDiscoveryConfig(ctxcontext.Context,req*dlppb.GetDiscoveryConfigRequest,opts...gax.CallOption)(*dlppb.DiscoveryConfig,error)GetDiscoveryConfig gets a discovery configuration.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetDiscoveryConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetDiscoveryConfigRequest.}resp,err:=c.GetDiscoveryConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetDlpJob
func(c*Client)GetDlpJob(ctxcontext.Context,req*dlppb.GetDlpJobRequest,opts...gax.CallOption)(*dlppb.DlpJob,error)GetDlpJob gets the latest state of a long-running DlpJob.Seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage)andhttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis (athttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetDlpJobRequest.}resp,err:=c.GetDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetFileStoreDataProfile
func(c*Client)GetFileStoreDataProfile(ctxcontext.Context,req*dlppb.GetFileStoreDataProfileRequest,opts...gax.CallOption)(*dlppb.FileStoreDataProfile,error)GetFileStoreDataProfile gets a file store data profile.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetFileStoreDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetFileStoreDataProfileRequest.}resp,err:=c.GetFileStoreDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetInspectTemplate
func(c*Client)GetInspectTemplate(ctxcontext.Context,req*dlppb.GetInspectTemplateRequest,opts...gax.CallOption)(*dlppb.InspectTemplate,error)GetInspectTemplate gets an InspectTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetInspectTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetInspectTemplateRequest.}resp,err:=c.GetInspectTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetJobTrigger
func(c*Client)GetJobTrigger(ctxcontext.Context,req*dlppb.GetJobTriggerRequest,opts...gax.CallOption)(*dlppb.JobTrigger,error)GetJobTrigger gets a job trigger.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers (athttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetJobTriggerRequest.}resp,err:=c.GetJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetProjectDataProfile
func(c*Client)GetProjectDataProfile(ctxcontext.Context,req*dlppb.GetProjectDataProfileRequest,opts...gax.CallOption)(*dlppb.ProjectDataProfile,error)GetProjectDataProfile gets a project data profile.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetProjectDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetProjectDataProfileRequest.}resp,err:=c.GetProjectDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetStoredInfoType
func(c*Client)GetStoredInfoType(ctxcontext.Context,req*dlppb.GetStoredInfoTypeRequest,opts...gax.CallOption)(*dlppb.StoredInfoType,error)GetStoredInfoType gets a stored infoType.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes (athttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetStoredInfoTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetStoredInfoTypeRequest.}resp,err:=c.GetStoredInfoType(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetTableDataProfile
func(c*Client)GetTableDataProfile(ctxcontext.Context,req*dlppb.GetTableDataProfileRequest,opts...gax.CallOption)(*dlppb.TableDataProfile,error)GetTableDataProfile gets a table data profile.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.GetTableDataProfileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#GetTableDataProfileRequest.}resp,err:=c.GetTableDataProfile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) HybridInspectDlpJob
func(c*Client)HybridInspectDlpJob(ctxcontext.Context,req*dlppb.HybridInspectDlpJobRequest,opts...gax.CallOption)(*dlppb.HybridInspectResponse,error)HybridInspectDlpJob inspect hybrid content and store findings to a job.To review the findings, inspect the job. Inspection will occurasynchronously.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.HybridInspectDlpJobRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#HybridInspectDlpJobRequest.}resp,err:=c.HybridInspectDlpJob(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) HybridInspectJobTrigger
func(c*Client)HybridInspectJobTrigger(ctxcontext.Context,req*dlppb.HybridInspectJobTriggerRequest,opts...gax.CallOption)(*dlppb.HybridInspectResponse,error)HybridInspectJobTrigger inspect hybrid content and store findings to a trigger. The inspectionwill be processed asynchronously. To review the findings monitor thejobs within the trigger.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.HybridInspectJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#HybridInspectJobTriggerRequest.}resp,err:=c.HybridInspectJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) InspectContent
func(c*Client)InspectContent(ctxcontext.Context,req*dlppb.InspectContentRequest,opts...gax.CallOption)(*dlppb.InspectContentResponse,error)InspectContent finds potentially sensitive info in content.This method has limits on input size, processing time, and output size.
When no InfoTypes or CustomInfoTypes are specified in this request, thesystem will automatically choose what detectors to run. By default this maybe all types, but may change over time as detectors are updated.
For how to guides, seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-images (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-images)andhttps://cloud.google.com/sensitive-data-protection/docs/inspecting-text (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-text),
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.InspectContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#InspectContentRequest.}resp,err:=c.InspectContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListColumnDataProfiles
func(c*Client)ListColumnDataProfiles(ctxcontext.Context,req*dlppb.ListColumnDataProfilesRequest,opts...gax.CallOption)*ColumnDataProfileIteratorListColumnDataProfiles lists column data profiles for an organization.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListColumnDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListColumnDataProfilesRequest.}it:=c.ListColumnDataProfiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListColumnDataProfilesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListColumnDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListColumnDataProfilesRequest.}forresp,err:=rangec.ListColumnDataProfiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListConnections
func(c*Client)ListConnections(ctxcontext.Context,req*dlppb.ListConnectionsRequest,opts...gax.CallOption)*ConnectionIteratorListConnections lists Connections in a parent. Use SearchConnections to see all connectionswithin an organization.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListConnectionsRequest.}it:=c.ListConnections(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListConnectionsResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListConnectionsRequest.}forresp,err:=rangec.ListConnections(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListDeidentifyTemplates
func(c*Client)ListDeidentifyTemplates(ctxcontext.Context,req*dlppb.ListDeidentifyTemplatesRequest,opts...gax.CallOption)*DeidentifyTemplateIteratorListDeidentifyTemplates lists DeidentifyTemplates.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid)to learn more.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDeidentifyTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDeidentifyTemplatesRequest.}it:=c.ListDeidentifyTemplates(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListDeidentifyTemplatesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDeidentifyTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDeidentifyTemplatesRequest.}forresp,err:=rangec.ListDeidentifyTemplates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListDiscoveryConfigs
func(c*Client)ListDiscoveryConfigs(ctxcontext.Context,req*dlppb.ListDiscoveryConfigsRequest,opts...gax.CallOption)*DiscoveryConfigIteratorListDiscoveryConfigs lists discovery configurations.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDiscoveryConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDiscoveryConfigsRequest.}it:=c.ListDiscoveryConfigs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListDiscoveryConfigsResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDiscoveryConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDiscoveryConfigsRequest.}forresp,err:=rangec.ListDiscoveryConfigs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListDlpJobs
func(c*Client)ListDlpJobs(ctxcontext.Context,req*dlppb.ListDlpJobsRequest,opts...gax.CallOption)*DlpJobIteratorListDlpJobs lists DlpJobs that match the specified filter in the request.Seehttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage (athttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage)andhttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis (athttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis)to learn more.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDlpJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDlpJobsRequest.}it:=c.ListDlpJobs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListDlpJobsResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListDlpJobsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListDlpJobsRequest.}forresp,err:=rangec.ListDlpJobs(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListFileStoreDataProfiles
func(c*Client)ListFileStoreDataProfiles(ctxcontext.Context,req*dlppb.ListFileStoreDataProfilesRequest,opts...gax.CallOption)*FileStoreDataProfileIteratorListFileStoreDataProfiles lists file store data profiles for an organization.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListFileStoreDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListFileStoreDataProfilesRequest.}it:=c.ListFileStoreDataProfiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListFileStoreDataProfilesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListFileStoreDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListFileStoreDataProfilesRequest.}forresp,err:=rangec.ListFileStoreDataProfiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListInfoTypes
func(c*Client)ListInfoTypes(ctxcontext.Context,req*dlppb.ListInfoTypesRequest,opts...gax.CallOption)(*dlppb.ListInfoTypesResponse,error)ListInfoTypes returns a list of the sensitive information types that the DLP APIsupports. Seehttps://cloud.google.com/sensitive-data-protection/docs/infotypes-reference (athttps://cloud.google.com/sensitive-data-protection/docs/infotypes-reference)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListInfoTypesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListInfoTypesRequest.}resp,err:=c.ListInfoTypes(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListInspectTemplates
func(c*Client)ListInspectTemplates(ctxcontext.Context,req*dlppb.ListInspectTemplatesRequest,opts...gax.CallOption)*InspectTemplateIteratorListInspectTemplates lists InspectTemplates.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates)to learn more.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListInspectTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListInspectTemplatesRequest.}it:=c.ListInspectTemplates(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListInspectTemplatesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListInspectTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListInspectTemplatesRequest.}forresp,err:=rangec.ListInspectTemplates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListJobTriggers
func(c*Client)ListJobTriggers(ctxcontext.Context,req*dlppb.ListJobTriggersRequest,opts...gax.CallOption)*JobTriggerIteratorListJobTriggers lists job triggers.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers (athttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers)to learn more.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListJobTriggersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListJobTriggersRequest.}it:=c.ListJobTriggers(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListJobTriggersResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListJobTriggersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListJobTriggersRequest.}forresp,err:=rangec.ListJobTriggers(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListProjectDataProfiles
func(c*Client)ListProjectDataProfiles(ctxcontext.Context,req*dlppb.ListProjectDataProfilesRequest,opts...gax.CallOption)*ProjectDataProfileIteratorListProjectDataProfiles lists project data profiles for an organization.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListProjectDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListProjectDataProfilesRequest.}it:=c.ListProjectDataProfiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListProjectDataProfilesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListProjectDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListProjectDataProfilesRequest.}forresp,err:=rangec.ListProjectDataProfiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListStoredInfoTypes
func(c*Client)ListStoredInfoTypes(ctxcontext.Context,req*dlppb.ListStoredInfoTypesRequest,opts...gax.CallOption)*StoredInfoTypeIteratorListStoredInfoTypes lists stored infoTypes.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes (athttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes)to learn more.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListStoredInfoTypesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListStoredInfoTypesRequest.}it:=c.ListStoredInfoTypes(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListStoredInfoTypesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListStoredInfoTypesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListStoredInfoTypesRequest.}forresp,err:=rangec.ListStoredInfoTypes(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListTableDataProfiles
func(c*Client)ListTableDataProfiles(ctxcontext.Context,req*dlppb.ListTableDataProfilesRequest,opts...gax.CallOption)*TableDataProfileIteratorListTableDataProfiles lists table data profiles for an organization.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListTableDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListTableDataProfilesRequest.}it:=c.ListTableDataProfiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.ListTableDataProfilesResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ListTableDataProfilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ListTableDataProfilesRequest.}forresp,err:=rangec.ListTableDataProfiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) RedactImage
func(c*Client)RedactImage(ctxcontext.Context,req*dlppb.RedactImageRequest,opts...gax.CallOption)(*dlppb.RedactImageResponse,error)RedactImage redacts potentially sensitive info from an image.This method has limits on input size, processing time, and output size.Seehttps://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images (athttps://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images)to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, thesystem will automatically choose what detectors to run. By default this maybe all types, but may change over time as detectors are updated.
Only the first frame of each multiframe image is redacted. Metadata andother frames are omitted in the response.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.RedactImageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#RedactImageRequest.}resp,err:=c.RedactImage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ReidentifyContent
func(c*Client)ReidentifyContent(ctxcontext.Context,req*dlppb.ReidentifyContentRequest,opts...gax.CallOption)(*dlppb.ReidentifyContentResponse,error)ReidentifyContent re-identifies content that has been de-identified.Seehttps://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example (athttps://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.ReidentifyContentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#ReidentifyContentRequest.}resp,err:=c.ReidentifyContent(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) SearchConnections
func(c*Client)SearchConnections(ctxcontext.Context,req*dlppb.SearchConnectionsRequest,opts...gax.CallOption)*ConnectionIteratorSearchConnections searches for Connections in a parent.
Examples
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.SearchConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#SearchConnectionsRequest.}it:=c.SearchConnections(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*dlppb.SearchConnectionsResponse)}}all
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.SearchConnectionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#SearchConnectionsRequest.}forresp,err:=rangec.SearchConnections(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) UpdateConnection
func(c*Client)UpdateConnection(ctxcontext.Context,req*dlppb.UpdateConnectionRequest,opts...gax.CallOption)(*dlppb.Connection,error)UpdateConnection update a Connection.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateConnectionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateConnectionRequest.}resp,err:=c.UpdateConnection(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateDeidentifyTemplate
func(c*Client)UpdateDeidentifyTemplate(ctxcontext.Context,req*dlppb.UpdateDeidentifyTemplateRequest,opts...gax.CallOption)(*dlppb.DeidentifyTemplate,error)UpdateDeidentifyTemplate updates the DeidentifyTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateDeidentifyTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateDeidentifyTemplateRequest.}resp,err:=c.UpdateDeidentifyTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateDiscoveryConfig
func(c*Client)UpdateDiscoveryConfig(ctxcontext.Context,req*dlppb.UpdateDiscoveryConfigRequest,opts...gax.CallOption)(*dlppb.DiscoveryConfig,error)UpdateDiscoveryConfig updates a discovery configuration.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateDiscoveryConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateDiscoveryConfigRequest.}resp,err:=c.UpdateDiscoveryConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateInspectTemplate
func(c*Client)UpdateInspectTemplate(ctxcontext.Context,req*dlppb.UpdateInspectTemplateRequest,opts...gax.CallOption)(*dlppb.InspectTemplate,error)UpdateInspectTemplate updates the InspectTemplate.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-templates (athttps://cloud.google.com/sensitive-data-protection/docs/creating-templates)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateInspectTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateInspectTemplateRequest.}resp,err:=c.UpdateInspectTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateJobTrigger
func(c*Client)UpdateJobTrigger(ctxcontext.Context,req*dlppb.UpdateJobTriggerRequest,opts...gax.CallOption)(*dlppb.JobTrigger,error)UpdateJobTrigger updates a job trigger.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers (athttps://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateJobTriggerRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateJobTriggerRequest.}resp,err:=c.UpdateJobTrigger(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateStoredInfoType
func(c*Client)UpdateStoredInfoType(ctxcontext.Context,req*dlppb.UpdateStoredInfoTypeRequest,opts...gax.CallOption)(*dlppb.StoredInfoType,error)UpdateStoredInfoType updates the stored infoType by creating a new version. The existing versionwill continue to be used until the new version is ready.Seehttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes (athttps://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes)to learn more.
Example
packagemainimport("context"dlp"cloud.google.com/go/dlp/apiv2"dlppb"cloud.google.com/go/dlp/apiv2/dlppb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=dlp.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&dlppb.UpdateStoredInfoTypeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/dlp/apiv2/dlppb#UpdateStoredInfoTypeRequest.}resp,err:=c.UpdateStoredInfoType(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}ColumnDataProfileIterator
typeColumnDataProfileIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.ColumnDataProfile,nextPageTokenstring,errerror)// contains filtered or unexported fields}ColumnDataProfileIterator manages a stream of *dlppb.ColumnDataProfile.
func (*ColumnDataProfileIterator) All
func(it*ColumnDataProfileIterator)All()iter.Seq2[*dlppb.ColumnDataProfile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ColumnDataProfileIterator) Next
func(it*ColumnDataProfileIterator)Next()(*dlppb.ColumnDataProfile,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ColumnDataProfileIterator) PageInfo
func(it*ColumnDataProfileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ConnectionIterator
typeConnectionIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.Connection,nextPageTokenstring,errerror)// contains filtered or unexported fields}ConnectionIterator manages a stream of *dlppb.Connection.
func (*ConnectionIterator) All
func(it*ConnectionIterator)All()iter.Seq2[*dlppb.Connection,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ConnectionIterator) Next
func(it*ConnectionIterator)Next()(*dlppb.Connection,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ConnectionIterator) PageInfo
func(it*ConnectionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DeidentifyTemplateIterator
typeDeidentifyTemplateIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.DeidentifyTemplate,nextPageTokenstring,errerror)// contains filtered or unexported fields}DeidentifyTemplateIterator manages a stream of *dlppb.DeidentifyTemplate.
func (*DeidentifyTemplateIterator) All
func(it*DeidentifyTemplateIterator)All()iter.Seq2[*dlppb.DeidentifyTemplate,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DeidentifyTemplateIterator) Next
func(it*DeidentifyTemplateIterator)Next()(*dlppb.DeidentifyTemplate,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DeidentifyTemplateIterator) PageInfo
func(it*DeidentifyTemplateIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DiscoveryConfigIterator
typeDiscoveryConfigIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.DiscoveryConfig,nextPageTokenstring,errerror)// contains filtered or unexported fields}DiscoveryConfigIterator manages a stream of *dlppb.DiscoveryConfig.
func (*DiscoveryConfigIterator) All
func(it*DiscoveryConfigIterator)All()iter.Seq2[*dlppb.DiscoveryConfig,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DiscoveryConfigIterator) Next
func(it*DiscoveryConfigIterator)Next()(*dlppb.DiscoveryConfig,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DiscoveryConfigIterator) PageInfo
func(it*DiscoveryConfigIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DlpJobIterator
typeDlpJobIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.DlpJob,nextPageTokenstring,errerror)// contains filtered or unexported fields}DlpJobIterator manages a stream of *dlppb.DlpJob.
func (*DlpJobIterator) All
func(it*DlpJobIterator)All()iter.Seq2[*dlppb.DlpJob,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DlpJobIterator) Next
func(it*DlpJobIterator)Next()(*dlppb.DlpJob,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DlpJobIterator) PageInfo
func(it*DlpJobIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FileStoreDataProfileIterator
typeFileStoreDataProfileIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.FileStoreDataProfile,nextPageTokenstring,errerror)// contains filtered or unexported fields}FileStoreDataProfileIterator manages a stream of *dlppb.FileStoreDataProfile.
func (*FileStoreDataProfileIterator) All
func(it*FileStoreDataProfileIterator)All()iter.Seq2[*dlppb.FileStoreDataProfile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FileStoreDataProfileIterator) Next
func(it*FileStoreDataProfileIterator)Next()(*dlppb.FileStoreDataProfile,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*FileStoreDataProfileIterator) PageInfo
func(it*FileStoreDataProfileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InspectTemplateIterator
typeInspectTemplateIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.InspectTemplate,nextPageTokenstring,errerror)// contains filtered or unexported fields}InspectTemplateIterator manages a stream of *dlppb.InspectTemplate.
func (*InspectTemplateIterator) All
func(it*InspectTemplateIterator)All()iter.Seq2[*dlppb.InspectTemplate,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*InspectTemplateIterator) Next
func(it*InspectTemplateIterator)Next()(*dlppb.InspectTemplate,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*InspectTemplateIterator) PageInfo
func(it*InspectTemplateIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
JobTriggerIterator
typeJobTriggerIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.JobTrigger,nextPageTokenstring,errerror)// contains filtered or unexported fields}JobTriggerIterator manages a stream of *dlppb.JobTrigger.
func (*JobTriggerIterator) All
func(it*JobTriggerIterator)All()iter.Seq2[*dlppb.JobTrigger,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*JobTriggerIterator) Next
func(it*JobTriggerIterator)Next()(*dlppb.JobTrigger,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*JobTriggerIterator) PageInfo
func(it*JobTriggerIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ProjectDataProfileIterator
typeProjectDataProfileIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.ProjectDataProfile,nextPageTokenstring,errerror)// contains filtered or unexported fields}ProjectDataProfileIterator manages a stream of *dlppb.ProjectDataProfile.
func (*ProjectDataProfileIterator) All
func(it*ProjectDataProfileIterator)All()iter.Seq2[*dlppb.ProjectDataProfile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ProjectDataProfileIterator) Next
func(it*ProjectDataProfileIterator)Next()(*dlppb.ProjectDataProfile,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ProjectDataProfileIterator) PageInfo
func(it*ProjectDataProfileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
StoredInfoTypeIterator
typeStoredInfoTypeIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.StoredInfoType,nextPageTokenstring,errerror)// contains filtered or unexported fields}StoredInfoTypeIterator manages a stream of *dlppb.StoredInfoType.
func (*StoredInfoTypeIterator) All
func(it*StoredInfoTypeIterator)All()iter.Seq2[*dlppb.StoredInfoType,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*StoredInfoTypeIterator) Next
func(it*StoredInfoTypeIterator)Next()(*dlppb.StoredInfoType,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*StoredInfoTypeIterator) PageInfo
func(it*StoredInfoTypeIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TableDataProfileIterator
typeTableDataProfileIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*dlppb.TableDataProfile,nextPageTokenstring,errerror)// contains filtered or unexported fields}TableDataProfileIterator manages a stream of *dlppb.TableDataProfile.
func (*TableDataProfileIterator) All
func(it*TableDataProfileIterator)All()iter.Seq2[*dlppb.TableDataProfile,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TableDataProfileIterator) Next
func(it*TableDataProfileIterator)Next()(*dlppb.TableDataProfile,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TableDataProfileIterator) PageInfo
func(it*TableDataProfileIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.