Google Cloud Data Loss Prevention v2 API - Class DlpServiceClient (4.4.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class DlpServiceClient

Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class DlpServiceClient.

DlpService client wrapper, for convenient use.

Inheritance

Object > DlpServiceClient

Derived Types

Namespace

Google.Cloud.Dlp.V2

Assembly

Google.Cloud.Dlp.V2.dll

Remarks

The Cloud Data Loss Prevention (DLP) API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. The service also includes methods for sensitive data redaction and scheduling of data scans on Google Cloud Platform based data sets.

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the DlpService service, which is a host of "dlp.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DlpService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default DlpService scopes are:

GrpcClient

public virtual DlpService.DlpServiceClient GrpcClient { get; }

The underlying gRPC DlpService client

Property Value
TypeDescription
DlpService.DlpServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

ActivateJobTrigger(ActivateJobTriggerRequest, CallSettings)

public virtual DlpJob ActivateJobTrigger(ActivateJobTriggerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestActivateJobTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DlpJob

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
ActivateJobTriggerRequest request = new ActivateJobTriggerRequest
{
    JobTriggerName = JobTriggerName.FromProjectJobTrigger("[PROJECT]", "[JOB_TRIGGER]"),
};
// Make the request
DlpJob response = dlpServiceClient.ActivateJobTrigger(request);

ActivateJobTriggerAsync(ActivateJobTriggerRequest, CallSettings)

public virtual Task<DlpJob> ActivateJobTriggerAsync(ActivateJobTriggerRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestActivateJobTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<DlpJob>

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
ActivateJobTriggerRequest request = new ActivateJobTriggerRequest
{
    JobTriggerName = JobTriggerName.FromProjectJobTrigger("[PROJECT]", "[JOB_TRIGGER]"),
};
// Make the request
DlpJob response = await dlpServiceClient.ActivateJobTriggerAsync(request);

ActivateJobTriggerAsync(ActivateJobTriggerRequest, CancellationToken)

public virtual Task<DlpJob> ActivateJobTriggerAsync(ActivateJobTriggerRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestActivateJobTriggerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<DlpJob>

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
ActivateJobTriggerRequest request = new ActivateJobTriggerRequest
{
    JobTriggerName = JobTriggerName.FromProjectJobTrigger("[PROJECT]", "[JOB_TRIGGER]"),
};
// Make the request
DlpJob response = await dlpServiceClient.ActivateJobTriggerAsync(request);

CancelDlpJob(CancelDlpJobRequest, CallSettings)

public virtual void CancelDlpJob(CancelDlpJobRequest request, CallSettings callSettings = null)

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
requestCancelDlpJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
CancelDlpJobRequest request = new CancelDlpJobRequest
{
    DlpJobName = DlpJobName.FromProjectDlpJob("[PROJECT]", "[DLP_JOB]"),
};
// Make the request
dlpServiceClient.CancelDlpJob(request);

CancelDlpJobAsync(CancelDlpJobRequest, CallSettings)

public virtual Task CancelDlpJobAsync(CancelDlpJobRequest request, CallSettings callSettings = null)

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
requestCancelDlpJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
CancelDlpJobRequest request = new CancelDlpJobRequest
{
    DlpJobName = DlpJobName.FromProjectDlpJob("[PROJECT]", "[DLP_JOB]"),
};
// Make the request
await dlpServiceClient.CancelDlpJobAsync(request);

CancelDlpJobAsync(CancelDlpJobRequest, CancellationToken)

public virtual Task CancelDlpJobAsync(CancelDlpJobRequest request, CancellationToken cancellationToken)

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
requestCancelDlpJobRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
CancelDlpJobRequest request = new CancelDlpJobRequest
{
    DlpJobName = DlpJobName.FromProjectDlpJob("[PROJECT]", "[DLP_JOB]"),
};
// Make the request
await dlpServiceClient.CancelDlpJobAsync(request);

Create()

public static DlpServiceClient Create()

Synchronously creates a DlpServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DlpServiceClientBuilder.

Returns
TypeDescription
DlpServiceClient

The created DlpServiceClient.

CreateAsync(CancellationToken)

public static Task<DlpServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a DlpServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DlpServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<DlpServiceClient>

The task representing the created DlpServiceClient.

CreateDeidentifyTemplate(LocationName, DeidentifyTemplate, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(LocationName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentLocationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(parent, deidentifyTemplate);

CreateDeidentifyTemplate(OrganizationName, DeidentifyTemplate, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(OrganizationName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentOrganizationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(parent, deidentifyTemplate);

CreateDeidentifyTemplate(ProjectName, DeidentifyTemplate, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(ProjectName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentProjectName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(parent, deidentifyTemplate);

CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest request, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
requestCreateDeidentifyTemplateRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
CreateDeidentifyTemplateRequest request = new CreateDeidentifyTemplateRequest
{
    ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    DeidentifyTemplate = new DeidentifyTemplate(),
    TemplateId = "",
    LocationId = "",
};
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(request);

CreateDeidentifyTemplate(OrganizationLocationName, DeidentifyTemplate, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentOrganizationLocationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(parent, deidentifyTemplate);

CreateDeidentifyTemplate(String, DeidentifyTemplate, CallSettings)

public virtual DeidentifyTemplate CreateDeidentifyTemplate(string parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentString

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeidentifyTemplate

The RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = DlpServiceClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = dlpServiceClient.CreateDeidentifyTemplate(parent, deidentifyTemplate);

CreateDeidentifyTemplateAsync(LocationName, DeidentifyTemplate, CallSettings)

public virtual Task<DeidentifyTemplate> CreateDeidentifyTemplateAsync(LocationName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentLocationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<DeidentifyTemplate>

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = await dlpServiceClient.CreateDeidentifyTemplateAsync(parent, deidentifyTemplate);

CreateDeidentifyTemplateAsync(LocationName, DeidentifyTemplate, CancellationToken)

public virtual Task<DeidentifyTemplate> CreateDeidentifyTemplateAsync(LocationName parent, DeidentifyTemplate deidentifyTemplate, CancellationToken cancellationToken)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentLocationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<DeidentifyTemplate>

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = await dlpServiceClient.CreateDeidentifyTemplateAsync(parent, deidentifyTemplate);

CreateDeidentifyTemplateAsync(OrganizationName, DeidentifyTemplate, CallSettings)

public virtual Task<DeidentifyTemplate> CreateDeidentifyTemplateAsync(OrganizationName parent, DeidentifyTemplate deidentifyTemplate, CallSettings callSettings = null)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentOrganizationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<DeidentifyTemplate>

A Task containing the RPC response.

Example
// Create client
DlpServiceClient dlpServiceClient = await DlpServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
DeidentifyTemplate deidentifyTemplate = new DeidentifyTemplate();
// Make the request
DeidentifyTemplate response = await dlpServiceClient.CreateDeidentifyTemplateAsync(parent, deidentifyTemplate);

CreateDeidentifyTemplateAsync(OrganizationName, DeidentifyTemplate, CancellationToken)

public virtual Task<DeidentifyTemplate> CreateDeidentifyTemplateAsync(OrganizationName parent, DeidentifyTemplate deidentifyTemplate, CancellationToken cancellationToken)

Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
parentOrganizationName

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

  • Projects scope, location specified:<br/> projects/<var>PROJECT_ID</var>/locations/<var>LOCATION_ID</var>
  • Projects scope, no location specified (defaults to global):<br/> projects/<var>PROJECT_ID</var>
  • Organizations scope, location specified:<br/> organizations/<var>ORG_ID</var>/locations/<var>LOCATION_ID</var>
  • Organizations scope, no location specified (defaults to global):<br/> organizations/<var>ORG_ID</var>

The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

parent=projects/example-project/locations/europe-west3

deidentifyTemplateDeidentifyTemplate

Required. The DeidentifyTemplate to create.

cancellationTokenCancellationToken

A