Sensitive Data Protection (DLP) v2 - Package cloud.google.com/go/dlp/apiv2 (v1.24.0)

Package dlp is an auto-generated package for the Sensitive Data Protection (DLP).

Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/dlp/apiv2@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := dlp.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

req := &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)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

CallOptions

type CallOptions struct {
	InspectContent             []gax.CallOption
	RedactImage                []gax.CallOption
	DeidentifyContent          []gax.CallOption
	ReidentifyContent          []gax.CallOption
	ListInfoTypes              []gax.CallOption
	CreateInspectTemplate      []gax.CallOption
	UpdateInspectTemplate      []gax.CallOption
	GetInspectTemplate         []gax.CallOption
	ListInspectTemplates       []gax.CallOption
	DeleteInspectTemplate      []gax.CallOption
	CreateDeidentifyTemplate   []gax.CallOption
	UpdateDeidentifyTemplate   []gax.CallOption
	GetDeidentifyTemplate      []gax.CallOption
	ListDeidentifyTemplates    []gax.CallOption
	DeleteDeidentifyTemplate   []gax.CallOption
	CreateJobTrigger           []gax.CallOption
	UpdateJobTrigger           []gax.CallOption
	HybridInspectJobTrigger    []gax.CallOption
	GetJobTrigger              []gax.CallOption
	ListJobTriggers            []gax.CallOption
	DeleteJobTrigger           []gax.CallOption
	ActivateJobTrigger         []gax.CallOption
	CreateDiscoveryConfig      []gax.CallOption
	UpdateDiscoveryConfig      []gax.CallOption
	GetDiscoveryConfig         []gax.CallOption
	ListDiscoveryConfigs       []gax.CallOption
	DeleteDiscoveryConfig      []gax.CallOption
	CreateDlpJob               []gax.CallOption
	ListDlpJobs                []gax.CallOption
	GetDlpJob                  []gax.CallOption
	DeleteDlpJob               []gax.CallOption
	CancelDlpJob               []gax.CallOption
	CreateStoredInfoType       []gax.CallOption
	UpdateStoredInfoType       []gax.CallOption
	GetStoredInfoType          []gax.CallOption
	ListStoredInfoTypes        []gax.CallOption
	DeleteStoredInfoType       []gax.CallOption
	ListProjectDataProfiles    []gax.CallOption
	ListTableDataProfiles      []gax.CallOption
	ListColumnDataProfiles     []gax.CallOption
	GetProjectDataProfile      []gax.CallOption
	ListFileStoreDataProfiles  []gax.CallOption
	GetFileStoreDataProfile    []gax.CallOption
	DeleteFileStoreDataProfile []gax.CallOption
	GetTableDataProfile        []gax.CallOption
	GetColumnDataProfile       []gax.CallOption
	DeleteTableDataProfile     []gax.CallOption
	HybridInspectDlpJob        []gax.CallOption
	FinishDlpJob               []gax.CallOption
	CreateConnection           []gax.CallOption
	GetConnection              []gax.CallOption
	ListConnections            []gax.CallOption
	SearchConnections          []gax.CallOption
	DeleteConnection           []gax.CallOption
	UpdateConnection           []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

Client

type Client struct {

	// 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 data inspection, classification, and de-identification platform that works on text, images, and Google Cloud storage repositories. To learn more about concepts and find how-to guides see https://cloud.google.com/sensitive-data-protection/docs/ (at https://cloud.google.com/sensitive-data-protection/docs/).

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

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 data inspection, classification, and de-identification platform that works on text, images, and Google Cloud storage repositories. To learn more about concepts and find how-to guides see https://cloud.google.com/sensitive-data-protection/docs/ (at https://cloud.google.com/sensitive-data-protection/docs/).

Example

package main

import (
	"context"

	dlp "cloud.google.com/go/dlp/apiv2"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dlp.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewRESTClient

func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewRESTClient creates a new dlp service rest client.

Sensitive Data Protection provides access to a powerful sensitive data inspection, classification, and de-identification platform that works on text, images, and Google Cloud storage repositories. To learn more about concepts and find how-to guides see https://cloud.google.com/sensitive-data-protection/docs/ (at https://cloud.google.com/sensitive-data-protection/docs/).

Example

package main

import (
	"context"

	dlp "cloud.google.com/go/dlp/apiv2"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dlp.NewRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*Client) ActivateJobTrigger

func (c *Client) ActivateJobTrigger(ctx context.Context, req *dlppb.ActivateJobTriggerRequest, opts ...gax.CallOption) (*dlppb.DlpJob, error)

ActivateJobTrigger activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.

Example

package main

import (
	"context"

	dlp "cloud.google.com/go/dlp/apiv2"
	dlppb "cloud.google.com/go/dlp/apiv2/dlppb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dlp.