DlpServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.dlp_v2.services.dlp_service.transports.base.DlpServiceTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
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
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
DlpServiceTransport | The transport used by the client instance. |
Methods
DlpServiceClient
DlpServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.dlp_v2.services.dlp_service.transports.base.DlpServiceTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the dlp service client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str, DlpServiceTransport]
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. It won't take effect if a |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
activate_job_trigger
activate_job_trigger(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.ActivateJobTriggerRequest, dict]
] = None,
*,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.DlpJob
Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_activate_job_trigger():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.ActivateJobTriggerRequest(
name="name_value",
)
# Make the request
response = client.activate_job_trigger(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.ActivateJobTriggerRequest, dict]
The request object. Request message for ActivateJobTrigger. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.DlpJob | Combines all of the information about a DLP job. |
cancel_dlp_job
cancel_dlp_job(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CancelDlpJobRequest, dict]
] = None,
*,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
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.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_cancel_dlp_job():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.CancelDlpJobRequest(
name="name_value",
)
# Make the request
client.cancel_dlp_job(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CancelDlpJobRequest, dict]
The request object. The request message for canceling a DLP job. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_deidentify_template
create_deidentify_template(
request: typing.Optional[
typing.Union[
google.cloud.dlp_v2.types.dlp.CreateDeidentifyTemplateRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
deidentify_template: typing.Optional[
google.cloud.dlp_v2.types.dlp.DeidentifyTemplate
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.DeidentifyTemplate
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.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_deidentify_template():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.CreateDeidentifyTemplateRequest(
parent="parent_value",
)
# Make the request
response = client.create_deidentify_template(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateDeidentifyTemplateRequest, dict]
The request object. Request message for CreateDeidentifyTemplate. |
parent |
str
Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have |
deidentify_template |
google.cloud.dlp_v2.types.DeidentifyTemplate
Required. The DeidentifyTemplate to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.DeidentifyTemplate | DeidentifyTemplates contains instructions on how to de-identify content. See https://cloud.google.com/dlp/docs/concepts-templates to learn more. |
create_discovery_config
create_discovery_config(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CreateDiscoveryConfigRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
discovery_config: typing.Optional[
google.cloud.dlp_v2.types.dlp.DiscoveryConfig
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.DiscoveryConfig
Creates a config for discovery to scan and profile storage.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_discovery_config():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
discovery_config = dlp_v2.DiscoveryConfig()
discovery_config.status = "PAUSED"
request = dlp_v2.CreateDiscoveryConfigRequest(
parent="parent_value",
discovery_config=discovery_config,
)
# Make the request
response = client.create_discovery_config(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateDiscoveryConfigRequest, dict]
The request object. Request message for CreateDiscoveryConfig. |
parent |
str
Required. Parent resource name. The format of this value is as follows: |
discovery_config |
google.cloud.dlp_v2.types.DiscoveryConfig
Required. The DiscoveryConfig to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.DiscoveryConfig | Configuration for discovery to scan resources for profile generation. Only one discovery configuration may exist per organization, folder, or project. The generated data profiles are retained according to the [data retention policy] (https://cloud.google.com/dlp/docs/data-profiles#retention). |
create_dlp_job
create_dlp_job(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CreateDlpJobRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
inspect_job: typing.Optional[google.cloud.dlp_v2.types.dlp.InspectJobConfig] = None,
risk_job: typing.Optional[
google.cloud.dlp_v2.types.dlp.RiskAnalysisJobConfig
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.DlpJob
Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_dlp_job():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.CreateDlpJobRequest(
parent="parent_value",
)
# Make the request
response = client.create_dlp_job(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateDlpJobRequest, dict]
The request object. Request message for CreateDlpJobRequest. Used to initiate long running jobs such as calculating risk metrics or inspecting Google Cloud Storage. |
parent |
str
Required. Parent resource name. The format of this value varies depending on whether you have |
inspect_job |
google.cloud.dlp_v2.types.InspectJobConfig
An inspection job scans a storage repository for InfoTypes. This corresponds to the |
risk_job |
google.cloud.dlp_v2.types.RiskAnalysisJobConfig
A risk analysis job calculates re-identification risk metrics for a BigQuery table. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.DlpJob | Combines all of the information about a DLP job. |
create_inspect_template
create_inspect_template(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CreateInspectTemplateRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
inspect_template: typing.Optional[
google.cloud.dlp_v2.types.dlp.InspectTemplate
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.InspectTemplate
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_inspect_template():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.CreateInspectTemplateRequest(
parent="parent_value",
)
# Make the request
response = client.create_inspect_template(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateInspectTemplateRequest, dict]
The request object. Request message for CreateInspectTemplate. |
parent |
str
Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have |
inspect_template |
google.cloud.dlp_v2.types.InspectTemplate
Required. The InspectTemplate to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.InspectTemplate | The inspectTemplate contains a configuration (set of types of sensitive data to be detected) to be used anywhere you otherwise would normally specify InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates to learn more. |
create_job_trigger
create_job_trigger(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CreateJobTriggerRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
job_trigger: typing.Optional[google.cloud.dlp_v2.types.dlp.JobTrigger] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.JobTrigger
Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_job_trigger():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
job_trigger = dlp_v2.JobTrigger()
job_trigger.status = "CANCELLED"
request = dlp_v2.CreateJobTriggerRequest(
parent="parent_value",
job_trigger=job_trigger,
)
# Make the request
response = client.create_job_trigger(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateJobTriggerRequest, dict]
The request object. Request message for CreateJobTrigger. |
parent |
str
Required. Parent resource name. The format of this value varies depending on whether you have |
job_trigger |
google.cloud.dlp_v2.types.JobTrigger
Required. The JobTrigger to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.JobTrigger | Contains a configuration to make dlp api calls on a repeating basis. See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more. |
create_stored_info_type
create_stored_info_type(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.CreateStoredInfoTypeRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
config: typing.Optional[google.cloud.dlp_v2.types.dlp.StoredInfoTypeConfig] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.StoredInfoType
Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_create_stored_info_type():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.CreateStoredInfoTypeRequest(
parent="parent_value",
)
# Make the request
response = client.create_stored_info_type(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.CreateStoredInfoTypeRequest, dict]
The request object. Request message for CreateStoredInfoType. |
parent |
str
Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have |
config |
google.cloud.dlp_v2.types.StoredInfoTypeConfig
Required. Configuration of the storedInfoType to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.StoredInfoType | StoredInfoType resource message that contains information about the current version and any pending updates. |
deidentify_content
deidentify_content(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.DeidentifyContentRequest, dict]
] = None,
*,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.dlp_v2.types.dlp.DeidentifyContentResponse
De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_deidentify_content():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeidentifyContentRequest(
)
# Make the request
response = client.deidentify_content(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeidentifyContentRequest, dict]
The request object. Request to de-identify a ContentItem. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.dlp_v2.types.DeidentifyContentResponse | Results of de-identifying a ContentItem. |
deidentify_template_path
deidentify_template_path(organization: str, deidentify_template: str) -> str
Returns a fully-qualified deidentify_template string.
delete_deidentify_template
delete_deidentify_template(
request: typing.Optional[
typing.Union[
google.cloud.dlp_v2.types.dlp.DeleteDeidentifyTemplateRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_delete_deidentify_template():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeleteDeidentifyTemplateRequest(
name="name_value",
)
# Make the request
client.delete_deidentify_template(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeleteDeidentifyTemplateRequest, dict]
The request object. Request message for DeleteDeidentifyTemplate. |
name |
str
Required. Resource name of the organization and deidentify template to be deleted, for example |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_discovery_config
delete_discovery_config(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.DeleteDiscoveryConfigRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a discovery configuration.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_delete_discovery_config():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeleteDiscoveryConfigRequest(
name="name_value",
)
# Make the request
client.delete_discovery_config(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeleteDiscoveryConfigRequest, dict]
The request object. Request message for DeleteDiscoveryConfig. |
name |
str
Required. Resource name of the project and the config, for example |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_dlp_job
delete_dlp_job(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.DeleteDlpJobRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_delete_dlp_job():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeleteDlpJobRequest(
name="name_value",
)
# Make the request
client.delete_dlp_job(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeleteDlpJobRequest, dict]
The request object. The request message for deleting a DLP job. |
name |
str
Required. The name of the DlpJob resource to be deleted. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_inspect_template
delete_inspect_template(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.DeleteInspectTemplateRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_delete_inspect_template():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeleteInspectTemplateRequest(
name="name_value",
)
# Make the request
client.delete_inspect_template(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeleteInspectTemplateRequest, dict]
The request object. Request message for DeleteInspectTemplate. |
name |
str
Required. Resource name of the organization and inspectTemplate to be deleted, for example |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_job_trigger
delete_job_trigger(
request: typing.Optional[
typing.Union[google.cloud.dlp_v2.types.dlp.DeleteJobTriggerRequest, dict]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
# 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://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dlp_v2
def sample_delete_job_trigger():
# Create a client
client = dlp_v2.DlpServiceClient()
# Initialize request argument(s)
request = dlp_v2.DeleteJobTriggerRequest(
name="name_value",
)
# Make the request
client.delete_job_trigger(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.dlp_v2.types.DeleteJobTriggerRequest, dict]
The request object. Request message for DeleteJobTrigger. |
name |
|