Class: Google::Cloud::Dlp::V2::DlpServiceClient
- Inherits:
-
Object
- Object
- Google::Cloud::Dlp::V2::DlpServiceClient
- Defined in:
- lib/google/cloud/dlp/v2/dlp_service_client.rb
Overview
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/.
Constant Summary collapse
- SERVICE_ADDRESS =
The default address of the service.
"dlp.googleapis.com".freeze
- DEFAULT_SERVICE_PORT =
The default port of the service.
443
- GRPC_INTERCEPTORS =
The default set of gRPC interceptors.
[]
- DEFAULT_TIMEOUT =
30
- ALL_SCOPES =
The scopes needed to make gRPC calls to all of the methods defined in this service.
[ "https://www.googleapis.com/auth/cloud-platform" ].freeze
Class Method Summary collapse
-
.dlp_job_path(project, dlp_job) ⇒ String
Returns a fully-qualified dlp_job resource name string.
-
.organization_deidentify_template_path(organization, deidentify_template) ⇒ String
Returns a fully-qualified organization_deidentify_template resource name string.
-
.organization_inspect_template_path(organization, inspect_template) ⇒ String
Returns a fully-qualified organization_inspect_template resource name string.
-
.organization_path(organization) ⇒ String
Returns a fully-qualified organization resource name string.
-
.project_deidentify_template_path(project, deidentify_template) ⇒ String
Returns a fully-qualified project_deidentify_template resource name string.
-
.project_inspect_template_path(project, inspect_template) ⇒ String
Returns a fully-qualified project_inspect_template resource name string.
-
.project_job_trigger_path(project, job_trigger) ⇒ String
Returns a fully-qualified project_job_trigger resource name string.
-
.project_path(project) ⇒ String
Returns a fully-qualified project resource name string.
Instance Method Summary collapse
-
#cancel_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Object
Starts asynchronous cancellation on a long-running DlpJob.
-
#create_deidentify_template(parent, deidentify_template: nil, template_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage.
-
#create_dlp_job(parent, inspect_job: nil, risk_job: nil, job_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DlpJob
Creates a new job to inspect storage or calculate risk metrics.
-
#create_inspect_template(parent, inspect_template: nil, template_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage.
-
#create_job_trigger(parent, job_trigger: nil, trigger_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::JobTrigger
Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule.
-
#deidentify_content(parent, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyContentResponse
De-identifies potentially sensitive info from a ContentItem.
-
#delete_deidentify_template(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a DeidentifyTemplate.
-
#delete_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a long-running DlpJob.
-
#delete_inspect_template(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes an InspectTemplate.
-
#delete_job_trigger(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a job trigger.
-
#get_deidentify_template(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Gets a DeidentifyTemplate.
-
#get_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DlpJob
Gets the latest state of a long-running DlpJob.
-
#get_inspect_template(name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Gets an InspectTemplate.
-
#get_job_trigger(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::JobTrigger
Gets a job trigger.
-
#initialize(credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "") ⇒ DlpServiceClient
constructor
A new instance of DlpServiceClient.
-
#inspect_content(parent, inspect_config: nil, item: nil, inspect_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectContentResponse
Finds potentially sensitive info in content.
-
#list_deidentify_templates(parent, page_size: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::DeidentifyTemplate>
Lists DeidentifyTemplates.
-
#list_dlp_jobs(parent, filter: nil, page_size: nil, type: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::DlpJob>
Lists DlpJobs that match the specified filter in the request.
-
#list_info_types(language_code: nil, filter: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::ListInfoTypesResponse
Returns a list of the sensitive information types that the DLP API supports.
-
#list_inspect_templates(parent, page_size: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::InspectTemplate>
Lists InspectTemplates.
-
#list_job_triggers(parent, page_size: nil, order_by: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::JobTrigger>
Lists job triggers.
-
#redact_image(parent, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::RedactImageResponse
Redacts potentially sensitive info from an image.
-
#reidentify_content(parent, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::ReidentifyContentResponse
Re-identifies content that has been de-identified.
-
#update_deidentify_template(name, deidentify_template: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Updates the DeidentifyTemplate.
-
#update_inspect_template(name, inspect_template: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Updates the InspectTemplate.
-
#update_job_trigger(name, job_trigger: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::JobTrigger
Updates a job trigger.
Constructor Details
#initialize(credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "") ⇒ DlpServiceClient
Returns a new instance of DlpServiceClient
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 250 def initialize \ credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "" # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "google/gax/grpc" require "google/privacy/dlp/v2/dlp_services_pb" credentials ||= Google::Cloud::Dlp::V2::Credentials.default if credentials.is_a?(String) || credentials.is_a?(Hash) updater_proc = Google::Cloud::Dlp::V2::Credentials.new(credentials).updater_proc end if credentials.is_a?(GRPC::Core::Channel) channel = credentials end if credentials.is_a?(GRPC::Core::ChannelCredentials) chan_creds = credentials end if credentials.is_a?(Proc) updater_proc = credentials end if credentials.is_a?(Google::Auth::Credentials) updater_proc = credentials.updater_proc end package_version = Gem.loaded_specs['google-cloud-dlp'].version.version google_api_client = "gl-ruby/#{RUBY_VERSION}" google_api_client << " #{lib_name}/#{lib_version}" if lib_name google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" google_api_client << " grpc/#{GRPC::VERSION}" google_api_client.freeze headers = { :"x-goog-api-client" => google_api_client } headers.merge!() unless .nil? client_config_file = Pathname.new(__dir__).join( "dlp_service_client_config.json" ) defaults = client_config_file.open do |f| Google::Gax.construct_settings( "google.privacy.dlp.v2.DlpService", JSON.parse(f.read), client_config, Google::Gax::Grpc::STATUS_CODE_NAMES, timeout, page_descriptors: PAGE_DESCRIPTORS, errors: Google::Gax::Grpc::API_ERRORS, metadata: headers ) end # Allow overriding the service path/port in subclasses. service_path = self.class::SERVICE_ADDRESS port = self.class::DEFAULT_SERVICE_PORT interceptors = self.class::GRPC_INTERCEPTORS @dlp_service_stub = Google::Gax::Grpc.create_stub( service_path, port, chan_creds: chan_creds, channel: channel, updater_proc: updater_proc, scopes: scopes, interceptors: interceptors, &Google::Privacy::Dlp::V2::DlpService::Stub.method(:new) ) @inspect_content = Google::Gax.create_api_call( @dlp_service_stub.method(:inspect_content), defaults["inspect_content"], exception_transformer: exception_transformer ) @redact_image = Google::Gax.create_api_call( @dlp_service_stub.method(:redact_image), defaults["redact_image"], exception_transformer: exception_transformer ) @deidentify_content = Google::Gax.create_api_call( @dlp_service_stub.method(:deidentify_content), defaults["deidentify_content"], exception_transformer: exception_transformer ) @reidentify_content = Google::Gax.create_api_call( @dlp_service_stub.method(:reidentify_content), defaults["reidentify_content"], exception_transformer: exception_transformer ) @list_info_types = Google::Gax.create_api_call( @dlp_service_stub.method(:list_info_types), defaults["list_info_types"], exception_transformer: exception_transformer ) @create_inspect_template = Google::Gax.create_api_call( @dlp_service_stub.method(:create_inspect_template), defaults["create_inspect_template"], exception_transformer: exception_transformer ) @update_inspect_template = Google::Gax.create_api_call( @dlp_service_stub.method(:update_inspect_template), defaults["update_inspect_template"], exception_transformer: exception_transformer ) @get_inspect_template = Google::Gax.create_api_call( @dlp_service_stub.method(:get_inspect_template), defaults["get_inspect_template"], exception_transformer: exception_transformer ) @list_inspect_templates = Google::Gax.create_api_call( @dlp_service_stub.method(:list_inspect_templates), defaults["list_inspect_templates"], exception_transformer: exception_transformer ) @delete_inspect_template = Google::Gax.create_api_call( @dlp_service_stub.method(:delete_inspect_template), defaults["delete_inspect_template"], exception_transformer: exception_transformer ) @create_deidentify_template = Google::Gax.create_api_call( @dlp_service_stub.method(:create_deidentify_template), defaults["create_deidentify_template"], exception_transformer: exception_transformer ) @update_deidentify_template = Google::Gax.create_api_call( @dlp_service_stub.method(:update_deidentify_template), defaults["update_deidentify_template"], exception_transformer: exception_transformer ) @get_deidentify_template = Google::Gax.create_api_call( @dlp_service_stub.method(:get_deidentify_template), defaults["get_deidentify_template"], exception_transformer: exception_transformer ) @list_deidentify_templates = Google::Gax.create_api_call( @dlp_service_stub.method(:list_deidentify_templates), defaults["list_deidentify_templates"], exception_transformer: exception_transformer ) @delete_deidentify_template = Google::Gax.create_api_call( @dlp_service_stub.method(:delete_deidentify_template), defaults["delete_deidentify_template"], exception_transformer: exception_transformer ) @create_dlp_job = Google::Gax.create_api_call( @dlp_service_stub.method(:create_dlp_job), defaults["create_dlp_job"], exception_transformer: exception_transformer ) @list_dlp_jobs = Google::Gax.create_api_call( @dlp_service_stub.method(:list_dlp_jobs), defaults["list_dlp_jobs"], exception_transformer: exception_transformer ) @get_dlp_job = Google::Gax.create_api_call( @dlp_service_stub.method(:get_dlp_job), defaults["get_dlp_job"], exception_transformer: exception_transformer ) @delete_dlp_job = Google::Gax.create_api_call( @dlp_service_stub.method(:delete_dlp_job), defaults["delete_dlp_job"], exception_transformer: exception_transformer ) @cancel_dlp_job = Google::Gax.create_api_call( @dlp_service_stub.method(:cancel_dlp_job), defaults["cancel_dlp_job"], exception_transformer: exception_transformer ) @list_job_triggers = Google::Gax.create_api_call( @dlp_service_stub.method(:list_job_triggers), defaults["list_job_triggers"], exception_transformer: exception_transformer ) @get_job_trigger = Google::Gax.create_api_call( @dlp_service_stub.method(:get_job_trigger), defaults["get_job_trigger"], exception_transformer: exception_transformer ) @delete_job_trigger = Google::Gax.create_api_call( @dlp_service_stub.method(:delete_job_trigger), defaults["delete_job_trigger"], exception_transformer: exception_transformer ) @update_job_trigger = Google::Gax.create_api_call( @dlp_service_stub.method(:update_job_trigger), defaults["update_job_trigger"], exception_transformer: exception_transformer ) @create_job_trigger = Google::Gax.create_api_call( @dlp_service_stub.method(:create_job_trigger), defaults["create_job_trigger"], exception_transformer: exception_transformer ) end |
Class Method Details
.dlp_job_path(project, dlp_job) ⇒ String
Returns a fully-qualified dlp_job resource name string.
214 215 216 217 218 219 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 214 def self.dlp_job_path project, dlp_job DLP_JOB_PATH_TEMPLATE.render( :"project" => project, :"dlp_job" => dlp_job ) end |
.organization_deidentify_template_path(organization, deidentify_template) ⇒ String
Returns a fully-qualified organization_deidentify_template resource name string.
150 151 152 153 154 155 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 150 def self.organization_deidentify_template_path organization, deidentify_template ORGANIZATION_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE.render( :"organization" => organization, :"deidentify_template" => deidentify_template ) end |
.organization_inspect_template_path(organization, inspect_template) ⇒ String
Returns a fully-qualified organization_inspect_template resource name string.
172 173 174 175 176 177 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 172 def self.organization_inspect_template_path organization, inspect_template ORGANIZATION_INSPECT_TEMPLATE_PATH_TEMPLATE.render( :"organization" => organization, :"inspect_template" => inspect_template ) end |
.organization_path(organization) ⇒ String
Returns a fully-qualified organization resource name string.
140 141 142 143 144 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 140 def self.organization_path organization ORGANIZATION_PATH_TEMPLATE.render( :"organization" => organization ) end |
.project_deidentify_template_path(project, deidentify_template) ⇒ String
Returns a fully-qualified project_deidentify_template resource name string.
161 162 163 164 165 166 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 161 def self.project_deidentify_template_path project, deidentify_template PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE.render( :"project" => project, :"deidentify_template" => deidentify_template ) end |
.project_inspect_template_path(project, inspect_template) ⇒ String
Returns a fully-qualified project_inspect_template resource name string.
183 184 185 186 187 188 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 183 def self.project_inspect_template_path project, inspect_template PROJECT_INSPECT_TEMPLATE_PATH_TEMPLATE.render( :"project" => project, :"inspect_template" => inspect_template ) end |
.project_job_trigger_path(project, job_trigger) ⇒ String
Returns a fully-qualified project_job_trigger resource name string.
194 195 196 197 198 199 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 194 def self.project_job_trigger_path project, job_trigger PROJECT_JOB_TRIGGER_PATH_TEMPLATE.render( :"project" => project, :"job_trigger" => job_trigger ) end |
.project_path(project) ⇒ String
Returns a fully-qualified project resource name string.
204 205 206 207 208 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 204 def self.project_path project PROJECT_PATH_TEMPLATE.render( :"project" => project ) end |
Instance Method Details
#cancel_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Object
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.
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1418 def cancel_dlp_job \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CancelDlpJobRequest) @cancel_dlp_job.call(req, , &block) nil end |
#create_deidentify_template(parent, deidentify_template: nil, template_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1005 def create_deidentify_template \ parent, deidentify_template: nil, template_id: nil, options: nil, &block req = { parent: parent, deidentify_template: deidentify_template, template_id: template_id }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateDeidentifyTemplateRequest) @create_deidentify_template.call(req, , &block) end |
#create_dlp_job(parent, inspect_job: nil, risk_job: nil, job_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::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.
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1227 def create_dlp_job \ parent, inspect_job: nil, risk_job: nil, job_id: nil, options: nil, &block req = { parent: parent, inspect_job: inspect_job, risk_job: risk_job, job_id: job_id }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateDlpJobRequest) @create_dlp_job.call(req, , &block) end |
#create_inspect_template(parent, inspect_template: nil, template_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
792 793 794 795 796 797 798 799 800 801 802 803 804 805 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 792 def create_inspect_template \ parent, inspect_template: nil, template_id: nil, options: nil, &block req = { parent: parent, inspect_template: inspect_template, template_id: template_id }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateInspectTemplateRequest) @create_inspect_template.call(req, , &block) end |
#create_job_trigger(parent, job_trigger: nil, trigger_id: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::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/dlp/docs/creating-job-triggers to learn more.
1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1640 def create_job_trigger \ parent, job_trigger: nil, trigger_id: nil, options: nil, &block req = { parent: parent, job_trigger: job_trigger, trigger_id: trigger_id }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateJobTriggerRequest) @create_job_trigger.call(req, , &block) end |
#deidentify_content(parent, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::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/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.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 626 def deidentify_content \ parent, deidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, deidentify_template_name: nil, options: nil, &block req = { parent: parent, deidentify_config: deidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, deidentify_template_name: deidentify_template_name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeidentifyContentRequest) @deidentify_content.call(req, , &block) end |
#delete_deidentify_template(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1179 def delete_deidentify_template \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeleteDeidentifyTemplateRequest) @delete_deidentify_template.call(req, , &block) nil end |
#delete_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1384 def delete_dlp_job \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeleteDlpJobRequest) @delete_dlp_job.call(req, , &block) nil end |
#delete_inspect_template(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
961 962 963 964 965 966 967 968 969 970 971 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 961 def delete_inspect_template \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeleteInspectTemplateRequest) @delete_inspect_template.call(req, , &block) nil end |
#delete_job_trigger(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1554 def delete_job_trigger \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeleteJobTriggerRequest) @delete_job_trigger.call(req, , &block) nil end |
#get_deidentify_template(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1089 def get_deidentify_template \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::GetDeidentifyTemplateRequest) @get_deidentify_template.call(req, , &block) end |
#get_dlp_job(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DlpJob
Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1351 def get_dlp_job \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::GetDlpJobRequest) @get_dlp_job.call(req, , &block) end |
#get_inspect_template(name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
873 874 875 876 877 878 879 880 881 882 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 873 def get_inspect_template \ name: nil, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::GetInspectTemplateRequest) @get_inspect_template.call(req, , &block) end |
#get_job_trigger(name, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::JobTrigger
Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1521 def get_job_trigger \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::GetJobTriggerRequest) @get_job_trigger.call(req, , &block) end |
#inspect_content(parent, inspect_config: nil, item: nil, inspect_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::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/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 495 def inspect_content \ parent, inspect_config: nil, item: nil, inspect_template_name: nil, options: nil, &block req = { parent: parent, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::InspectContentRequest) @inspect_content.call(req, , &block) end |
#list_deidentify_templates(parent, page_size: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::DeidentifyTemplate>
Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1144 def list_deidentify_templates \ parent, page_size: nil, options: nil, &block req = { parent: parent, page_size: page_size }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListDeidentifyTemplatesRequest) @list_deidentify_templates.call(req, , &block) end |
#list_dlp_jobs(parent, filter: nil, page_size: nil, type: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::DlpJob>
Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1313 def list_dlp_jobs \ parent, filter: nil, page_size: nil, type: nil, options: nil, &block req = { parent: parent, filter: filter, page_size: page_size, type: type }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListDlpJobsRequest) @list_dlp_jobs.call(req, , &block) end |
#list_info_types(language_code: nil, filter: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::ListInfoTypesResponse
Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
748 749 750 751 752 753 754 755 756 757 758 759 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 748 def list_info_types \ language_code: nil, filter: nil, options: nil, &block req = { language_code: language_code, filter: filter }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListInfoTypesRequest) @list_info_types.call(req, , &block) end |
#list_inspect_templates(parent, page_size: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::InspectTemplate>
Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
927 928 929 930 931 932 933 934 935 936 937 938 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 927 def list_inspect_templates \ parent, page_size: nil, options: nil, &block req = { parent: parent, page_size: page_size }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListInspectTemplatesRequest) @list_inspect_templates.call(req, , &block) end |
#list_job_triggers(parent, page_size: nil, order_by: nil, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::JobTrigger>
Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1485 def list_job_triggers \ parent, page_size: nil, order_by: nil, options: nil, &block req = { parent: parent, page_size: page_size, order_by: order_by }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListJobTriggersRequest) @list_job_triggers.call(req, , &block) end |
#redact_image(parent, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::RedactImageResponse
Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images 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.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 553 def redact_image \ parent, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil, options: nil, &block req = { parent: parent, inspect_config: inspect_config, image_redaction_configs: image_redaction_configs, include_findings: include_findings, byte_item: byte_item }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::RedactImageRequest) @redact_image.call(req, , &block) end |
#reidentify_content(parent, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::ReidentifyContentResponse
Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 702 def reidentify_content \ parent, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, options: nil, &block req = { parent: parent, reidentify_config: reidentify_config, inspect_config: inspect_config, item: item, inspect_template_name: inspect_template_name, reidentify_template_name: reidentify_template_name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ReidentifyContentRequest) @reidentify_content.call(req, , &block) end |
#update_deidentify_template(name, deidentify_template: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::DeidentifyTemplate
Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1051 def update_deidentify_template \ name, deidentify_template: nil, update_mask: nil, options: nil, &block req = { name: name, deidentify_template: deidentify_template, update_mask: update_mask }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::UpdateDeidentifyTemplateRequest) @update_deidentify_template.call(req, , &block) end |
#update_inspect_template(name, inspect_template: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::InspectTemplate
Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 837 def update_inspect_template \ name, inspect_template: nil, update_mask: nil, options: nil, &block req = { name: name, inspect_template: inspect_template, update_mask: update_mask }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::UpdateInspectTemplateRequest) @update_inspect_template.call(req, , &block) end |
#update_job_trigger(name, job_trigger: nil, update_mask: nil, options: nil) {|result, operation| ... } ⇒ Google::Privacy::Dlp::V2::JobTrigger
Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 |
# File 'lib/google/cloud/dlp/v2/dlp_service_client.rb', line 1595 def update_job_trigger \ name, job_trigger: nil, update_mask: nil, options: nil, &block req = { name: name, job_trigger: job_trigger, update_mask: update_mask }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::UpdateJobTriggerRequest) @update_job_trigger.call(req, , &block) end |