Reference documentation and code samples for the Cloud Data Loss Prevention (DLP) V2 API class Google::Cloud::Dlp::V2::DlpService::Rest::Client.
REST client for the DlpService service.
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/sensitive-data-protection/docs/.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the DlpService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DlpService clients ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config| config.timeout = 10.0 end
#activate_job_trigger
def activate_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
def activate_job_trigger(name: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
def activate_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
activate_job_trigger
via a request object, either of type
ActivateJobTriggerRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def activate_job_trigger(name: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
activate_job_trigger
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the trigger to activate, for example
projects/dlp-test-project/jobTriggers/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DlpJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new # Call the activate_job_trigger method. result = client.activate_job_trigger request # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. p result
#cancel_dlp_job
def cancel_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_dlp_job(name: nil) -> ::Google::Protobuf::Empty
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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
def cancel_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
cancel_dlp_job
via a request object, either of type
CancelDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def cancel_dlp_job(name: nil) -> ::Google::Protobuf::Empty
cancel_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the DlpJob resource to be cancelled.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new # Call the cancel_dlp_job method. result = client.cancel_dlp_job request # The returned object is of type Google::Protobuf::Empty. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the DlpService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_connection
def create_connection(request, options = nil) -> ::Google::Cloud::Dlp::V2::Connection
def create_connection(parent: nil, connection: nil) -> ::Google::Cloud::Dlp::V2::Connection
Create a Connection to an external data source.
def create_connection(request, options = nil) -> ::Google::Cloud::Dlp::V2::Connection
create_connection
via a request object, either of type
CreateConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_connection(parent: nil, connection: nil) -> ::Google::Cloud::Dlp::V2::Connection
create_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Required. Parent resource name.
The format of this value varies depending on the scope of the request (project or organization):
- Projects scope:
projects/{project_id}/locations/{location_id}
- Organizations scope:
organizations/{org_id}/locations/{location_id}
- Projects scope:
- connection (::Google::Cloud::Dlp::V2::Connection, ::Hash) — Required. The connection resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::Connection)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new # Call the create_connection method. result = client.create_connection request # The returned object is of type Google::Cloud::Dlp::V2::Connection. p result
#create_deidentify_template
def create_deidentify_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
def create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
def create_deidentify_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
create_deidentify_template
via a request object, either of type
CreateDeidentifyTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
create_deidentify_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
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:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
- Organizations scope, location specified:
organizations/{org_id}/locations/{location_id}
- Organizations scope, no location specified (defaults to global):
organizations/{org_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- deidentify_template (::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash) — Required. The DeidentifyTemplate to create.
-
template_id (::String) — The template id can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one. - location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DeidentifyTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new # Call the create_deidentify_template method. result = client.create_deidentify_template request # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. p result
#create_discovery_config
def create_discovery_config(request, options = nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
def create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
Creates a config for discovery to scan and profile storage.
def create_discovery_config(request, options = nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
create_discovery_config
via a request object, either of type
CreateDiscoveryConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
create_discovery_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Required. Parent resource name.
The format of this value varies depending on the scope of the request (project or organization):
- Projects scope:
projects/{project_id}/locations/{location_id}
- Organizations scope:
organizations/{org_id}/locations/{location_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope:
- discovery_config (::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash) — Required. The DiscoveryConfig to create.
-
config_id (::String) — The config ID can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DiscoveryConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new # Call the create_discovery_config method. result = client.create_discovery_config request # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. p result
#create_dlp_job
def create_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
def create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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.
def create_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
create_dlp_job
via a request object, either of type
CreateDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
create_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Required. Parent resource name.
The format of this value varies depending on whether you have specified a processing location:
- Projects scope, location specified:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- inspect_job (::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash) — An inspection job scans a storage repository for InfoTypes.
- risk_job (::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash) — A risk analysis job calculates re-identification risk metrics for a BigQuery table.
-
job_id (::String) — The job id can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one. - location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DlpJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new # Call the create_dlp_job method. result = client.create_dlp_job request # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. p result
#create_inspect_template
def create_inspect_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
def create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
def create_inspect_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
create_inspect_template
via a request object, either of type
CreateInspectTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
create_inspect_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
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:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
- Organizations scope, location specified:
organizations/{org_id}/locations/{location_id}
- Organizations scope, no location specified (defaults to global):
organizations/{org_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- inspect_template (::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash) — Required. The InspectTemplate to create.
-
template_id (::String) — The template id can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one. - location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::InspectTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new # Call the create_inspect_template method. result = client.create_inspect_template request # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. p result
#create_job_trigger
def create_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
def create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::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/sensitive-data-protection/docs/creating-job-triggers to learn more.
def create_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
create_job_trigger
via a request object, either of type
CreateJobTriggerRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
create_job_trigger
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Required. Parent resource name.
The format of this value varies depending on whether you have specified a processing location:
- Projects scope, location specified:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- job_trigger (::Google::Cloud::Dlp::V2::JobTrigger, ::Hash) — Required. The JobTrigger to create.
-
trigger_id (::String) — The trigger id can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one. - location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::JobTrigger)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new # Call the create_job_trigger method. result = client.create_job_trigger request # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. p result
#create_stored_info_type
def create_stored_info_type(request, options = nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
def create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
def create_stored_info_type(request, options = nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
create_stored_info_type
via a request object, either of type
CreateStoredInfoTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
create_stored_info_type
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
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:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
- Organizations scope, location specified:
organizations/{org_id}/locations/{location_id}
- Organizations scope, no location specified (defaults to global):
organizations/{org_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- config (::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash) — Required. Configuration of the storedInfoType to create.
-
stored_info_type_id (::String) — The storedInfoType ID can contain uppercase and lowercase letters,
numbers, and hyphens; that is, it must match the regular
expression:
[a-zA-Z\d-_]+
. The maximum length is 100 characters. Can be empty to allow the system to generate one. - location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::StoredInfoType)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new # Call the create_stored_info_type method. result = client.create_stored_info_type request # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. p result
#deidentify_content
def deidentify_content(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyContentResponse
def deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyContentResponse
De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/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.
def deidentify_content(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyContentResponse
deidentify_content
via a request object, either of type
Google::Cloud::Dlp::V2::DeidentifyContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def deidentify_content(parent: nil, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyContentResponse
deidentify_content
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Parent resource name.
The format of this value varies depending on whether you have specified a processing location:
- Projects scope, location specified:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- deidentify_config (::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash) — Configuration for the de-identification of the content item. Items specified here will override the template referenced by the deidentify_template_name argument.
- inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) — Configuration for the inspector. Items specified here will override the template referenced by the inspect_template_name argument.
-
item (::Google::Cloud::Dlp::V2::ContentItem, ::Hash) — The item to de-identify. Will be treated as text.
This value must be of type Table if your deidentify_config is a RecordTransformations object.
- inspect_template_name (::String) — Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.
- deidentify_template_name (::String) — Template to use. Any configuration directly specified in deidentify_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.
- location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DeidentifyContentResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new # Call the deidentify_content method. result = client.deidentify_content request # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse. p result
#delete_connection
def delete_connection(request, options = nil) -> ::Google::Protobuf::Empty
def delete_connection(name: nil) -> ::Google::Protobuf::Empty
Delete a Connection.
def delete_connection(request, options = nil) -> ::Google::Protobuf::Empty
delete_connection
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_connection(name: nil) -> ::Google::Protobuf::Empty
delete_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the Connection to be deleted, in the format:
projects/{project}/locations/{location}/connections/{connection}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new # Call the delete_connection method. result = client.delete_connection request # The returned object is of type Google::Protobuf::Empty. p result
#delete_deidentify_template
def delete_deidentify_template(request, options = nil) -> ::Google::Protobuf::Empty
def delete_deidentify_template(name: nil) -> ::Google::Protobuf::Empty
Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
def delete_deidentify_template(request, options = nil) -> ::Google::Protobuf::Empty
delete_deidentify_template
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_deidentify_template(name: nil) -> ::Google::Protobuf::Empty
delete_deidentify_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and deidentify template to be
deleted, for example
organizations/433245324/deidentifyTemplates/432452342
or projects/project-id/deidentifyTemplates/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new # Call the delete_deidentify_template method. result = client.delete_deidentify_template request # The returned object is of type Google::Protobuf::Empty. p result
#delete_discovery_config
def delete_discovery_config(request, options = nil) -> ::Google::Protobuf::Empty
def delete_discovery_config(name: nil) -> ::Google::Protobuf::Empty
Deletes a discovery configuration.
def delete_discovery_config(request, options = nil) -> ::Google::Protobuf::Empty
delete_discovery_config
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_discovery_config(name: nil) -> ::Google::Protobuf::Empty
delete_discovery_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the project and the config, for example
projects/dlp-test-project/discoveryConfigs/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new # Call the delete_discovery_config method. result = client.delete_discovery_config request # The returned object is of type Google::Protobuf::Empty. p result
#delete_dlp_job
def delete_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_dlp_job(name: nil) -> ::Google::Protobuf::Empty
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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
def delete_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
delete_dlp_job
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_dlp_job(name: nil) -> ::Google::Protobuf::Empty
delete_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the DlpJob resource to be deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new # Call the delete_dlp_job method. result = client.delete_dlp_job request # The returned object is of type Google::Protobuf::Empty. p result
#delete_file_store_data_profile
def delete_file_store_data_profile(request, options = nil) -> ::Google::Protobuf::Empty
def delete_file_store_data_profile(name: nil) -> ::Google::Protobuf::Empty
Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.
def delete_file_store_data_profile(request, options = nil) -> ::Google::Protobuf::Empty
delete_file_store_data_profile
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_file_store_data_profile(name: nil) -> ::Google::Protobuf::Empty
delete_file_store_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Resource name of the file store data profile.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteFileStoreDataProfileRequest.new # Call the delete_file_store_data_profile method. result = client.delete_file_store_data_profile request # The returned object is of type Google::Protobuf::Empty. p result
#delete_inspect_template
def delete_inspect_template(request, options = nil) -> ::Google::Protobuf::Empty
def delete_inspect_template(name: nil) -> ::Google::Protobuf::Empty
Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
def delete_inspect_template(request, options = nil) -> ::Google::Protobuf::Empty
delete_inspect_template
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_inspect_template(name: nil) -> ::Google::Protobuf::Empty
delete_inspect_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and inspectTemplate to be
deleted, for example
organizations/433245324/inspectTemplates/432452342
or projects/project-id/inspectTemplates/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new # Call the delete_inspect_template method. result = client.delete_inspect_template request # The returned object is of type Google::Protobuf::Empty. p result
#delete_job_trigger
def delete_job_trigger(request, options = nil) -> ::Google::Protobuf::Empty
def delete_job_trigger(name: nil) -> ::Google::Protobuf::Empty
Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
def delete_job_trigger(request, options = nil) -> ::Google::Protobuf::Empty
delete_job_trigger
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteJobTriggerRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_job_trigger(name: nil) -> ::Google::Protobuf::Empty
delete_job_trigger
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the project and the triggeredJob, for example
projects/dlp-test-project/jobTriggers/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new # Call the delete_job_trigger method. result = client.delete_job_trigger request # The returned object is of type Google::Protobuf::Empty. p result
#delete_stored_info_type
def delete_stored_info_type(request, options = nil) -> ::Google::Protobuf::Empty
def delete_stored_info_type(name: nil) -> ::Google::Protobuf::Empty
Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
def delete_stored_info_type(request, options = nil) -> ::Google::Protobuf::Empty
delete_stored_info_type
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_stored_info_type(name: nil) -> ::Google::Protobuf::Empty
delete_stored_info_type
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and storedInfoType to be
deleted, for example
organizations/433245324/storedInfoTypes/432452342
or projects/project-id/storedInfoTypes/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new # Call the delete_stored_info_type method. result = client.delete_stored_info_type request # The returned object is of type Google::Protobuf::Empty. p result
#delete_table_data_profile
def delete_table_data_profile(request, options = nil) -> ::Google::Protobuf::Empty
def delete_table_data_profile(name: nil) -> ::Google::Protobuf::Empty
Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.
def delete_table_data_profile(request, options = nil) -> ::Google::Protobuf::Empty
delete_table_data_profile
via a request object, either of type
Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_table_data_profile(name: nil) -> ::Google::Protobuf::Empty
delete_table_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Resource name of the table data profile.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new # Call the delete_table_data_profile method. result = client.delete_table_data_profile request # The returned object is of type Google::Protobuf::Empty. p result
#finish_dlp_job
def finish_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
def finish_dlp_job(name: nil) -> ::Google::Protobuf::Empty
Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
def finish_dlp_job(request, options = nil) -> ::Google::Protobuf::Empty
finish_dlp_job
via a request object, either of type
FinishDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def finish_dlp_job(name: nil) -> ::Google::Protobuf::Empty
finish_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the DlpJob resource to be finished.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new # Call the finish_dlp_job method. result = client.finish_dlp_job request # The returned object is of type Google::Protobuf::Empty. p result
#get_column_data_profile
def get_column_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::ColumnDataProfile
def get_column_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::ColumnDataProfile
Gets a column data profile.
def get_column_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::ColumnDataProfile
get_column_data_profile
via a request object, either of type
GetColumnDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_column_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::ColumnDataProfile
get_column_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name, for example
organizations/12345/locations/us/columnDataProfiles/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::ColumnDataProfile)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new # Call the get_column_data_profile method. result = client.get_column_data_profile request # The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile. p result
#get_connection
def get_connection(request, options = nil) -> ::Google::Cloud::Dlp::V2::Connection
def get_connection(name: nil) -> ::Google::Cloud::Dlp::V2::Connection
Get a Connection by name.
def get_connection(request, options = nil) -> ::Google::Cloud::Dlp::V2::Connection
get_connection
via a request object, either of type
GetConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_connection(name: nil) -> ::Google::Cloud::Dlp::V2::Connection
get_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name in the format:
projects/{project}/locations/{location}/connections/{connection}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::Connection)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetConnectionRequest.new # Call the get_connection method. result = client.get_connection request # The returned object is of type Google::Cloud::Dlp::V2::Connection. p result
#get_deidentify_template
def get_deidentify_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
def get_deidentify_template(name: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
def get_deidentify_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
get_deidentify_template
via a request object, either of type
GetDeidentifyTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_deidentify_template(name: nil) -> ::Google::Cloud::Dlp::V2::DeidentifyTemplate
get_deidentify_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and deidentify template to be
read, for example
organizations/433245324/deidentifyTemplates/432452342
or projects/project-id/deidentifyTemplates/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DeidentifyTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new # Call the get_deidentify_template method. result = client.get_deidentify_template request # The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate. p result
#get_discovery_config
def get_discovery_config(request, options = nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
def get_discovery_config(name: nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
Gets a discovery configuration.
def get_discovery_config(request, options = nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
get_discovery_config
via a request object, either of type
GetDiscoveryConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_discovery_config(name: nil) -> ::Google::Cloud::Dlp::V2::DiscoveryConfig
get_discovery_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the project and the configuration, for example
projects/dlp-test-project/discoveryConfigs/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DiscoveryConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new # Call the get_discovery_config method. result = client.get_discovery_config request # The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig. p result
#get_dlp_job
def get_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
def get_dlp_job(name: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
def get_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::DlpJob
get_dlp_job
via a request object, either of type
GetDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_dlp_job(name: nil) -> ::Google::Cloud::Dlp::V2::DlpJob
get_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the DlpJob resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::DlpJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new # Call the get_dlp_job method. result = client.get_dlp_job request # The returned object is of type Google::Cloud::Dlp::V2::DlpJob. p result
#get_file_store_data_profile
def get_file_store_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::FileStoreDataProfile
def get_file_store_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::FileStoreDataProfile
Gets a file store data profile.
def get_file_store_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::FileStoreDataProfile
get_file_store_data_profile
via a request object, either of type
GetFileStoreDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_file_store_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::FileStoreDataProfile
get_file_store_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name, for example
organizations/12345/locations/us/fileStoreDataProfiles/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::FileStoreDataProfile)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetFileStoreDataProfileRequest.new # Call the get_file_store_data_profile method. result = client.get_file_store_data_profile request # The returned object is of type Google::Cloud::Dlp::V2::FileStoreDataProfile. p result
#get_inspect_template
def get_inspect_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
def get_inspect_template(name: nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
def get_inspect_template(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
get_inspect_template
via a request object, either of type
GetInspectTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_inspect_template(name: nil) -> ::Google::Cloud::Dlp::V2::InspectTemplate
get_inspect_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and inspectTemplate to be read,
for example
organizations/433245324/inspectTemplates/432452342
or projects/project-id/inspectTemplates/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::InspectTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new # Call the get_inspect_template method. result = client.get_inspect_template request # The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate. p result
#get_job_trigger
def get_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
def get_job_trigger(name: nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
def get_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
get_job_trigger
via a request object, either of type
GetJobTriggerRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_job_trigger(name: nil) -> ::Google::Cloud::Dlp::V2::JobTrigger
get_job_trigger
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the project and the triggeredJob, for example
projects/dlp-test-project/jobTriggers/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::JobTrigger)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new # Call the get_job_trigger method. result = client.get_job_trigger request # The returned object is of type Google::Cloud::Dlp::V2::JobTrigger. p result
#get_project_data_profile
def get_project_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::ProjectDataProfile
def get_project_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::ProjectDataProfile
Gets a project data profile.
def get_project_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::ProjectDataProfile
get_project_data_profile
via a request object, either of type
GetProjectDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_project_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::ProjectDataProfile
get_project_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name, for example
organizations/12345/locations/us/projectDataProfiles/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::ProjectDataProfile)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new # Call the get_project_data_profile method. result = client.get_project_data_profile request # The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile. p result
#get_stored_info_type
def get_stored_info_type(request, options = nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
def get_stored_info_type(name: nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
def get_stored_info_type(request, options = nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
get_stored_info_type
via a request object, either of type
GetStoredInfoTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_stored_info_type(name: nil) -> ::Google::Cloud::Dlp::V2::StoredInfoType
get_stored_info_type
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the organization and storedInfoType to be read,
for example
organizations/433245324/storedInfoTypes/432452342
or projects/project-id/storedInfoTypes/432452342.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::StoredInfoType)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new # Call the get_stored_info_type method. result = client.get_stored_info_type request # The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType. p result
#get_table_data_profile
def get_table_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::TableDataProfile
def get_table_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::TableDataProfile
Gets a table data profile.
def get_table_data_profile(request, options = nil) -> ::Google::Cloud::Dlp::V2::TableDataProfile
get_table_data_profile
via a request object, either of type
GetTableDataProfileRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_table_data_profile(name: nil) -> ::Google::Cloud::Dlp::V2::TableDataProfile
get_table_data_profile
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name, for example
organizations/12345/locations/us/tableDataProfiles/53234423
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::TableDataProfile)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new # Call the get_table_data_profile method. result = client.get_table_data_profile request # The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile. p result
#hybrid_inspect_dlp_job
def hybrid_inspect_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
def hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
def hybrid_inspect_dlp_job(request, options = nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
hybrid_inspect_dlp_job
via a request object, either of type
HybridInspectDlpJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
hybrid_inspect_dlp_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the job to execute a hybrid inspect on, for
example
projects/dlp-test-project/dlpJob/53234423
. - hybrid_item (::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash) — The item to inspect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::HybridInspectResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new # Call the hybrid_inspect_dlp_job method. result = client.hybrid_inspect_dlp_job request # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. p result
#hybrid_inspect_job_trigger
def hybrid_inspect_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
def hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
def hybrid_inspect_job_trigger(request, options = nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
hybrid_inspect_job_trigger
via a request object, either of type
HybridInspectJobTriggerRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) -> ::Google::Cloud::Dlp::V2::HybridInspectResponse
hybrid_inspect_job_trigger
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Resource name of the trigger to execute a hybrid inspect on, for
example
projects/dlp-test-project/jobTriggers/53234423
. - hybrid_item (::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash) — The item to inspect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::HybridInspectResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new # Call the hybrid_inspect_job_trigger method. result = client.hybrid_inspect_job_trigger request # The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new DlpService REST client object.
- (config) — Configure the DlpService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config| config.timeout = 10.0 end
#inspect_content
def inspect_content(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectContentResponse
def inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::InspectContentResponse
Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size.
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.
For how to guides, see https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
def inspect_content(request, options = nil) -> ::Google::Cloud::Dlp::V2::InspectContentResponse
inspect_content
via a request object, either of type
InspectContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) -> ::Google::Cloud::Dlp::V2::InspectContentResponse
inspect_content
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) —
Parent resource name.
The format of this value varies depending on whether you have specified a processing location:
- Projects scope, location specified:
projects/{project_id}/locations/{location_id}
- Projects scope, no location specified (defaults to global):
projects/{project_id}
The following example
parent
string specifies a parent project with the identifierexample-project
, and specifies theeurope-west3
location for processing data:parent=projects/example-project/locations/europe-west3
- Projects scope, location specified:
- inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) — Configuration for the inspector. What specified here will override the template referenced by the inspect_template_name argument.
- item (::Google::Cloud::Dlp::V2::ContentItem, ::Hash) — The item to inspect.
- inspect_template_name (::String) — Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.
- location_id (::String) — Deprecated. This field has no effect.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dlp::V2::InspectContentResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::InspectContentRequest.new # Call the inspect_content method. result = client.inspect_content request # The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse. p result
#list_column_data_profiles
def list_column_data_profiles(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>
def list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>
Lists column data profiles for an organization.
def list_column_data_profiles(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>
list_column_data_profiles
via a request object, either of type
ListColumnDataProfilesRequest or an equivalent Hash.
- request (::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_column_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>
list_column_data_profiles
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Resource name of the organization or project, for
example
organizations/433245324/locations/europe
orprojects/project-id/locations/asia
. - page_token (::String) — Page token to continue retrieval.
- page_size (::Integer) — Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.
-
order_by (::String) —
Comma-separated list of fields to order by, followed by
asc
ordesc
postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed.Examples:
project_id asc
table_id
sensitivity_level desc
Supported fields are:
project_id
: The Google Cloud project ID.dataset_id
: The ID of a BigQuery dataset.table_id
: The ID of a BigQuery table.sensitivity_level
: How sensitive the data in a column is, at most.data_risk_level
: How much risk is associated with this data.profile_last_generated
: When the profile was last updated in epoch seconds.
-
filter (::String) — Allows filtering.
Supported syntax:
- Filter expressions are made up of one or more restrictions.
- Restrictions can be combined by
AND
orOR
logical operators. A sequence of restrictions implicitly usesAND
. - A restriction has the form of
{field} {operator} {value}
. - Supported fields/values:
table_data_profile_name
- The name of the related table data profile.project_id
- The Google Cloud project ID. (REQUIRED)dataset_id
- The BigQuery dataset ID. (REQUIRED)table_id
- The BigQuery table ID. (REQUIRED)field_id
- The ID of the BigQuery field.info_type
- The infotype detected in the resource.sensitivity_level
- HIGH|MEDIUM|LOWdata_risk_level
: How much risk is associated with this data.status_code
- an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
- The operator must be
=
for project_id, dataset_id, and table_id. Other filters also support!=
.
Examples:
- project_id = 12345 AND status_code = 1
- project_id = 12345 AND sensitivity_level = HIGH
- project_id = 12345 AND info_type = STREET_ADDRESS
The length of this field should be no more than 500 characters.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dlp/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new # Call the list_column_data_profiles method. result = client.list_column_data_profiles request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile. p item end
#list_connections
def list_connections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>
def list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::<