blob: 78c54e31123b78ba6aaef5e756a7c89a8587e383 [file] [log] [blame]
:py:mod:`airflow.providers.google.cloud.hooks.dlp`
==================================================
.. py:module:: airflow.providers.google.cloud.hooks.dlp
.. autoapi-nested-parse::
This module contains a CloudDLPHook
which allows you to connect to Google Cloud DLP service.
.. spelling::
ImageRedactionConfig
RedactImageRequest
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.google.cloud.hooks.dlp.CloudDLPHook
Attributes
~~~~~~~~~~
.. autoapisummary::
airflow.providers.google.cloud.hooks.dlp.DLP_JOB_PATH_PATTERN
.. py:data:: DLP_JOB_PATH_PATTERN
:annotation: = ^projects/[^/]+/dlpJobs/(?P<job>.*?)$
.. py:class:: CloudDLPHook(gcp_conn_id = 'google_cloud_default', delegate_to = None, impersonation_chain = None)
Bases: :py:obj:`airflow.providers.google.common.hooks.base_google.GoogleBaseHook`
Hook for Google Cloud Data Loss Prevention (DLP) APIs.
Cloud DLP 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 based data sets.
:param gcp_conn_id: The connection ID to use when fetching connection info.
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
if any. For this to work, the service account making the request must have
domain-wide delegation enabled.
:param impersonation_chain: Optional service account to impersonate using short-term
credentials, or chained list of accounts required to get the access_token
of the last account in the list, which will be impersonated in the request.
If set as a string, the account must grant the originating account
the Service Account Token Creator IAM role.
If set as a sequence, the identities from the list must grant
Service Account Token Creator IAM role to the directly preceding identity, with first
account from the list granting this role to the originating account.
.. py:method:: get_conn()
Provides a client for interacting with the Cloud DLP API.
:return: Google Cloud DLP API Client
:rtype: google.cloud.dlp_v2.DlpServiceClient
.. py:method:: cancel_dlp_job(dlp_job_id, project_id = PROVIDE_PROJECT_ID, retry = DEFAULT, timeout = None, metadata = ())
Starts asynchronous cancellation on a long-running DLP job.
:param dlp_job_id: ID of the DLP job resource to be cancelled.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default project_id
from the Google Cloud connection is used.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: create_deidentify_template(organization_id = None, project_id = None, deidentify_template = None, template_id = None, retry = DEFAULT, timeout = None, metadata = ())
Creates a deidentify template for re-using frequently used configuration for
de-identifying content, images, and storage.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param deidentify_template: (Optional) The de-identify template to create.
:param template_id: (Optional) The template ID.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
.. py:method:: create_dlp_job(project_id = PROVIDE_PROJECT_ID, inspect_job = None, risk_job = None, job_id = None, retry = DEFAULT, timeout = None, metadata = (), wait_until_finished = True, time_to_sleep_in_seconds = 60)
Creates a new job to inspect storage or calculate risk metrics.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param inspect_job: (Optional) The configuration for the inspect job.
:param risk_job: (Optional) The configuration for the risk job.
:param job_id: (Optional) The job ID.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:param wait_until_finished: (Optional) If true, it will keep polling the job state
until it is set to DONE.
:rtype: google.cloud.dlp_v2.types.DlpJob
:param time_to_sleep_in_seconds: (Optional) Time to sleep, in seconds, between active checks
of the operation results. Defaults to 60.
.. py:method:: create_inspect_template(organization_id = None, project_id = None, inspect_template = None, template_id = None, retry = DEFAULT, timeout = None, metadata = ())
Creates an inspect template for re-using frequently used configuration for
inspecting content, images, and storage.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param inspect_template: (Optional) The inspect template to create.
:param template_id: (Optional) The template ID.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.InspectTemplate
.. py:method:: create_job_trigger(project_id = PROVIDE_PROJECT_ID, job_trigger = None, trigger_id = None, retry = DEFAULT, timeout = None, metadata = ())
Creates a job trigger to run DLP actions such as scanning storage for sensitive
information on a set schedule.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param job_trigger: (Optional) The job trigger to create.
:param trigger_id: (Optional) The job trigger ID.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.JobTrigger
.. py:method:: create_stored_info_type(organization_id = None, project_id = None, config = None, stored_info_type_id = None, retry = DEFAULT, timeout = None, metadata = ())
Creates a pre-built stored info type to be used for inspection.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param config: (Optional) The config for the stored info type.
:param stored_info_type_id: (Optional) The stored info type ID.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.StoredInfoType
.. py:method:: deidentify_content(project_id = PROVIDE_PROJECT_ID, deidentify_config = None, inspect_config = None, item = None, inspect_template_name = None, deidentify_template_name = None, retry = DEFAULT, timeout = None, metadata = ())
De-identifies potentially sensitive info from a content item. This method has limits
on input size and output size.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param deidentify_config: (Optional) Configuration for the de-identification of the
content item. Items specified here will override the template referenced by the
deidentify_template_name argument.
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:param item: (Optional) The item to de-identify. Will be treated as text.
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:param deidentify_template_name: (Optional) Optional template to use. Any
configuration directly specified in deidentify_config will override those set
in the template.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.DeidentifyContentResponse
.. py:method:: delete_deidentify_template(template_id, organization_id=None, project_id=None, retry=DEFAULT, timeout=None, metadata=())
Deletes a deidentify template.
:param template_id: The ID of deidentify template to be deleted.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: delete_dlp_job(dlp_job_id, project_id, retry = DEFAULT, timeout = None, metadata = ())
Deletes a long-running DLP job. This method indicates that the client is no longer
interested in the DLP job result. The job will be cancelled if possible.
:param dlp_job_id: The ID of the DLP job resource to be cancelled.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: delete_inspect_template(template_id, organization_id = None, project_id = None, retry = DEFAULT, timeout = None, metadata = ())
Deletes an inspect template.
:param template_id: The ID of the inspect template to be deleted.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: delete_job_trigger(job_trigger_id, project_id, retry = DEFAULT, timeout = None, metadata = ())
Deletes a job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be deleted.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: delete_stored_info_type(stored_info_type_id, organization_id = None, project_id = None, retry = DEFAULT, timeout = None, metadata = ())
Deletes a stored info type.
:param stored_info_type_id: The ID of the stored info type to be deleted.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
.. py:method:: get_deidentify_template(template_id, organization_id = None, project_id = None, retry = DEFAULT, timeout = None, metadata = ())
Gets a deidentify template.
:param template_id: The ID of deidentify template to be read.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
.. py:method:: get_dlp_job(dlp_job_id, project_id, retry = DEFAULT, timeout = None, metadata = ())
Gets the latest state of a long-running Dlp Job.
:param dlp_job_id: The ID of the DLP job resource to be read.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.DlpJob
.. py:method:: get_inspect_template(template_id, organization_id = None, project_id = None, retry = DEFAULT, timeout = None, metadata = ())
Gets an inspect template.
:param template_id: The ID of inspect template to be read.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.InspectTemplate
.. py:method:: get_job_trigger(job_trigger_id, project_id, retry = DEFAULT, timeout = None, metadata = ())
Gets a DLP job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be read.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.JobTrigger
.. py:method:: get_stored_info_type(stored_info_type_id, organization_id = None, project_id = None, retry = DEFAULT, timeout = None, metadata = ())
Gets a stored info type.
:param stored_info_type_id: The ID of the stored info type to be read.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.StoredInfoType
.. py:method:: inspect_content(project_id, inspect_config = None, item = None, inspect_template_name = None, retry = DEFAULT, timeout = None, metadata = ())
Finds potentially sensitive info in content. This method has limits on input size,
processing time, and output size.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:param item: (Optional) The item to de-identify. Will be treated as text.
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.InspectContentResponse
.. py:method:: list_deidentify_templates(organization_id = None, project_id = None, page_size = None, order_by = None, retry = DEFAULT, timeout = None, metadata = ())
Lists deidentify templates.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: List[google.cloud.dlp_v2.types.DeidentifyTemplate]
.. py:method:: list_dlp_jobs(project_id, results_filter = None, page_size = None, job_type = None, order_by = None, retry = DEFAULT, timeout = None, metadata = ())
Lists DLP jobs that match the specified filter in the request.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param results_filter: (Optional) Filter used to specify a subset of results.
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:param job_type: (Optional) The type of job.
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: List[google.cloud.dlp_v2.types.DlpJob]
.. py:method:: list_info_types(language_code = None, results_filter = None, retry = DEFAULT, timeout = None, metadata = ())
Returns a list of the sensitive information types that the DLP API supports.
:param language_code: (Optional) Optional BCP-47 language code for localized info
type friendly names. If omitted, or if localized strings are not available,
en-US strings will be returned.
:param results_filter: (Optional) Filter used to specify a subset of results.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.ListInfoTypesResponse
.. py:method:: list_inspect_templates(organization_id = None, project_id = None, page_size = None, order_by = None, retry = DEFAULT, timeout = None, metadata = ())
Lists inspect templates.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: List[google.cloud.dlp_v2.types.InspectTemplate]
.. py:method:: list_job_triggers(project_id, page_size = None, order_by = None, results_filter = None, retry = DEFAULT, timeout = None, metadata = ())
Lists job triggers.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:param results_filter: (Optional) Filter used to specify a subset of results.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: List[google.cloud.dlp_v2.types.JobTrigger]
.. py:method:: list_stored_info_types(organization_id = None, project_id = None, page_size = None, order_by = None, retry = DEFAULT, timeout = None, metadata = ())
Lists stored info types.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: List[google.cloud.dlp_v2.types.StoredInfoType]
.. py:method:: redact_image(project_id, inspect_config = None, image_redaction_configs = None, include_findings = None, byte_item = None, retry = DEFAULT, timeout = None, metadata = ())
Redacts potentially sensitive info from an image. This method has limits on
input size, processing time, and output size.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:param image_redaction_configs: (Optional) The configuration for specifying what
content to redact from images.
List[google.cloud.dlp_v2.types.RedactImageRequest.ImageRedactionConfig]
:param include_findings: (Optional) Whether the response should include findings
along with the redacted image.
:param byte_item: (Optional) The content must be PNG, JPEG, SVG or BMP.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.RedactImageResponse
.. py:method:: reidentify_content(project_id, reidentify_config = None, inspect_config = None, item = None, inspect_template_name = None, reidentify_template_name = None, retry = DEFAULT, timeout = None, metadata = ())
Re-identifies content that has been de-identified.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param reidentify_config: (Optional) Configuration for the re-identification of
the content item.
:param inspect_config: (Optional) Configuration for the inspector.
:param item: (Optional) The item to re-identify. Will be treated as text.
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:param reidentify_template_name: (Optional) Optional template to use. References an
instance of deidentify template. Any configuration directly specified in
reidentify_config or inspect_config will override those set in the template.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.ReidentifyContentResponse
.. py:method:: update_deidentify_template(template_id, organization_id = None, project_id = None, deidentify_template = None, update_mask = None, retry = DEFAULT, timeout = None, metadata = ())
Updates the deidentify template.
:param template_id: The ID of deidentify template to be updated.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param deidentify_template: New deidentify template value.
:param update_mask: Mask to control which fields get updated.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
.. py:method:: update_inspect_template(template_id, organization_id = None, project_id = None, inspect_template = None, update_mask = None, retry = DEFAULT, timeout = None, metadata = ())
Updates the inspect template.
:param template_id: The ID of the inspect template to be updated.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param inspect_template: New inspect template value.
:param update_mask: Mask to control which fields get updated.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.InspectTemplate
.. py:method:: update_job_trigger(job_trigger_id, project_id, job_trigger = None, update_mask = None, retry = DEFAULT, timeout = None, metadata = ())
Updates a job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be updated.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the Google Cloud connection is used.
:param job_trigger: New job trigger value.
:param update_mask: Mask to control which fields get updated.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.JobTrigger
.. py:method:: update_stored_info_type(stored_info_type_id, organization_id = None, project_id = None, config = None, update_mask = None, retry = DEFAULT, timeout = None, metadata = ())
Updates the stored info type by creating a new version.
:param stored_info_type_id: The ID of the stored info type to be updated.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organization.
:param project_id: (Optional) Google Cloud project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organization.
:param config: Updated configuration for the stored info type. If not provided, a new
version of the stored info type will be created with the existing configuration.
:param update_mask: Mask to control which fields get updated.
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:param metadata: (Optional) Additional metadata that is provided to the method.
:rtype: google.cloud.dlp_v2.types.StoredInfoType