public class DlpResourceManager
extends java.lang.Object
implements org.apache.beam.it.common.ResourceManager
| Modifier and Type | Class and Description |
|---|---|
static class |
DlpResourceManager.Builder
A builder class for creating instances of
DlpResourceManager. |
| Constructor and Description |
|---|
DlpResourceManager(java.lang.String project,
com.google.api.gax.core.CredentialsProvider credentialsProvider)
Constructs a new DlpResourceManager with the specified project and credentials provider.
|
| Modifier and Type | Method and Description |
|---|---|
static DlpResourceManager.Builder |
builder(java.lang.String project,
com.google.api.gax.core.CredentialsProvider credentialsProvider)
Creates a new Builder for constructing a DlpResourceManager instance.
|
void |
cleanupAll() |
com.google.privacy.dlp.v2.DeidentifyTemplate |
createDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate template)
Creates a deidentify template in the specified project.
|
com.google.cloud.dlp.v2.DlpServiceClient |
getDlpClient()
Retrieves a DlpServiceClient with the configured settings.
|
void |
removeDeidentifyTemplate(java.lang.String templateName)
Removes a deidentify template by its name.
|
public DlpResourceManager(java.lang.String project,
com.google.api.gax.core.CredentialsProvider credentialsProvider)
project - the GCP project IDcredentialsProvider - the credentials provider for authenticationpublic com.google.cloud.dlp.v2.DlpServiceClient getDlpClient()
throws java.io.IOException
java.io.IOException - if an error occurs during client creationpublic com.google.privacy.dlp.v2.DeidentifyTemplate createDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate template)
throws java.io.IOException
template - the deidentify template to createjava.io.IOException - if an error occurs during template creationpublic void removeDeidentifyTemplate(java.lang.String templateName)
throws java.io.IOException
templateName - the name of the template to removejava.io.IOException - if an error occurs during template deletionpublic void cleanupAll()
cleanupAll in interface org.apache.beam.it.common.ResourceManagerpublic static DlpResourceManager.Builder builder(java.lang.String project, com.google.api.gax.core.CredentialsProvider credentialsProvider)
project - the GCP project ID