Class: Google::Cloud::Dlp::V2::DlpService::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Dlp::V2::DlpService::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/dlp/v2/dlp_service/rest/client.rb
Overview
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/.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DlpService Client class.
Instance Method Summary collapse
-
#activate_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DlpJob
Activate a job trigger.
-
#cancel_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Starts asynchronous cancellation on a long-running DlpJob.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DlpService Client instance.
-
#create_deidentify_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage.
-
#create_discovery_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig
Creates a config for discovery to scan and profile storage.
-
#create_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DlpJob
Creates a new job to inspect storage or calculate risk metrics.
-
#create_inspect_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage.
-
#create_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::JobTrigger
Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule.
-
#create_stored_info_type(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType
Creates a pre-built stored infoType to be used for inspection.
-
#deidentify_content(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DeidentifyContentResponse
De-identifies potentially sensitive info from a ContentItem.
-
#delete_deidentify_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a DeidentifyTemplate.
-
#delete_discovery_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a discovery configuration.
-
#delete_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a long-running DlpJob.
-
#delete_inspect_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an InspectTemplate.
-
#delete_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a job trigger.
-
#delete_stored_info_type(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a stored infoType.
-
#finish_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Finish a running hybrid DlpJob.
-
#get_column_data_profile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::ColumnDataProfile
Gets a column data profile.
-
#get_deidentify_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Gets a DeidentifyTemplate.
-
#get_discovery_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig
Gets a discovery configuration.
-
#get_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DlpJob
Gets the latest state of a long-running DlpJob.
-
#get_inspect_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate
Gets an InspectTemplate.
-
#get_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::JobTrigger
Gets a job trigger.
-
#get_project_data_profile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::ProjectDataProfile
Gets a project data profile.
-
#get_stored_info_type(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType
Gets a stored infoType.
-
#get_table_data_profile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::TableDataProfile
Gets a table data profile.
-
#hybrid_inspect_dlp_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse
Inspect hybrid content and store findings to a job.
-
#hybrid_inspect_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse
Inspect hybrid content and store findings to a trigger.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DlpService REST client object.
-
#inspect_content(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::InspectContentResponse
Finds potentially sensitive info in content.
-
#list_column_data_profiles(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>
Lists data profiles for an organization.
-
#list_deidentify_templates(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>
Lists DeidentifyTemplates.
-
#list_discovery_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>
Lists discovery configurations.
-
#list_dlp_jobs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>
Lists DlpJobs that match the specified filter in the request.
-
#list_info_types(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::ListInfoTypesResponse
Returns a list of the sensitive information types that DLP API supports.
-
#list_inspect_templates(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>
Lists InspectTemplates.
-
#list_job_triggers(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>
Lists job triggers.
-
#list_project_data_profiles(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>
Lists data profiles for an organization.
-
#list_stored_info_types(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>
Lists stored infoTypes.
-
#list_table_data_profiles(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>
Lists data profiles for an organization.
-
#redact_image(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::RedactImageResponse
Redacts potentially sensitive info from an image.
-
#reidentify_content(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::ReidentifyContentResponse
Re-identifies content that has been de-identified.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_deidentify_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Updates the DeidentifyTemplate.
-
#update_discovery_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig
Updates a discovery configuration.
-
#update_inspect_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate
Updates the InspectTemplate.
-
#update_job_trigger(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::JobTrigger
Updates a job trigger.
-
#update_stored_info_type(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType
Updates the stored infoType by creating a new version.
Methods included from Paths
#column_data_profile_path, #deidentify_template_path, #discovery_config_path, #dlp_job_path, #inspect_template_path, #job_trigger_path, #location_path, #organization_location_path, #organization_path, #project_data_profile_path, #project_path, #stored_info_type_path, #table_data_profile_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DlpService REST client object.
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 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 309 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @dlp_service_stub = ::Google::Cloud::Dlp::V2::DlpService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @dlp_service_stub.endpoint config.universe_domain = @dlp_service_stub.universe_domain end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
352 353 354 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 352 def location_client @location_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DlpService Client class.
See Configuration for a description of the configuration fields.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 70 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Dlp", "V2"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.inspect_content.timeout = 300.0 default_config.rpcs.inspect_content.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.redact_image.timeout = 300.0 default_config.rpcs.redact_image.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.deidentify_content.timeout = 300.0 default_config.rpcs.deidentify_content.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.reidentify_content.timeout = 300.0 default_config.rpcs.reidentify_content.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_info_types.timeout = 300.0 default_config.rpcs.list_info_types.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_inspect_template.timeout = 300.0 default_config.rpcs.update_inspect_template.timeout = 300.0 default_config.rpcs.get_inspect_template.timeout = 300.0 default_config.rpcs.get_inspect_template.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_inspect_templates.timeout = 300.0 default_config.rpcs.list_inspect_templates.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_inspect_template.timeout = 300.0 default_config.rpcs.delete_inspect_template.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_deidentify_template.timeout = 300.0 default_config.rpcs.update_deidentify_template.timeout = 300.0 default_config.rpcs.get_deidentify_template.timeout = 300.0 default_config.rpcs.get_deidentify_template.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_deidentify_templates.timeout = 300.0 default_config.rpcs.list_deidentify_templates.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_deidentify_template.timeout = 300.0 default_config.rpcs.delete_deidentify_template.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_job_trigger.timeout = 300.0 default_config.rpcs.update_job_trigger.timeout = 300.0 default_config.rpcs.hybrid_inspect_job_trigger.timeout = 300.0 default_config.rpcs.get_job_trigger.timeout = 300.0 default_config.rpcs.get_job_trigger.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_job_triggers.timeout = 300.0 default_config.rpcs.list_job_triggers.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_job_trigger.timeout = 300.0 default_config.rpcs.delete_job_trigger.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.activate_job_trigger.timeout = 300.0 default_config.rpcs.create_discovery_config.timeout = 300.0 default_config.rpcs.update_discovery_config.timeout = 300.0 default_config.rpcs.get_discovery_config.timeout = 300.0 default_config.rpcs.get_discovery_config.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_discovery_configs.timeout = 300.0 default_config.rpcs.list_discovery_configs.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_discovery_config.timeout = 300.0 default_config.rpcs.delete_discovery_config.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_dlp_job.timeout = 300.0 default_config.rpcs.list_dlp_jobs.timeout = 300.0 default_config.rpcs.list_dlp_jobs.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_dlp_job.timeout = 300.0 default_config.rpcs.get_dlp_job.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_dlp_job.timeout = 300.0 default_config.rpcs.delete_dlp_job.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.cancel_dlp_job.timeout = 300.0 default_config.rpcs.create_stored_info_type.timeout = 300.0 default_config.rpcs.update_stored_info_type.timeout = 300.0 default_config.rpcs.get_stored_info_type.timeout = 300.0 default_config.rpcs.get_stored_info_type.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_stored_info_types.timeout = 300.0 default_config.rpcs.list_stored_info_types.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_stored_info_type.timeout = 300.0 default_config.rpcs.delete_stored_info_type.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_project_data_profiles.timeout = 300.0 default_config.rpcs.list_project_data_profiles.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_table_data_profiles.timeout = 300.0 default_config.rpcs.list_table_data_profiles.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_column_data_profiles.timeout = 300.0 default_config.rpcs.list_column_data_profiles.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_project_data_profile.timeout = 300.0 default_config.rpcs.get_project_data_profile.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_table_data_profile.timeout = 300.0 default_config.rpcs.get_table_data_profile.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_column_data_profile.timeout = 300.0 default_config.rpcs.get_column_data_profile.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.hybrid_inspect_dlp_job.timeout = 300.0 default_config.rpcs.finish_dlp_job.timeout = 300.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#activate_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob #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.
2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2555 def activate_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.activate_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.activate_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.activate_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.activate_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#cancel_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3522 def cancel_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CancelDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.cancel_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.cancel_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.cancel_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.cancel_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#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 configure.
See Configuration for a description of the configuration fields.
279 280 281 282 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 279 def configure yield @config if block_given? @config end |
#create_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate #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.
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1502 def create_deidentify_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_deidentify_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_deidentify_template.timeout, metadata: , retry_policy: @config.rpcs.create_deidentify_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_deidentify_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig #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.
2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2649 def create_discovery_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_discovery_config..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_discovery_config.timeout, metadata: , retry_policy: @config.rpcs.create_discovery_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_discovery_config request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob #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.
3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3115 def create_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.create_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate #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.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1012 def create_inspect_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_inspect_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_inspect_template.timeout, metadata: , retry_policy: @config.rpcs.create_inspect_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_inspect_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger #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.
1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1990 def create_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.create_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType #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.
3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3631 def create_stored_info_type request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_stored_info_type..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_stored_info_type.timeout, metadata: , retry_policy: @config.rpcs.create_stored_info_type.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.create_stored_info_type request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#deidentify_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyContentResponse #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.
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 681 def deidentify_content request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeidentifyContentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.deidentify_content..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.deidentify_content.timeout, metadata: , retry_policy: @config.rpcs.deidentify_content.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.deidentify_content request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_deidentify_template(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1884 def delete_deidentify_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_deidentify_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_deidentify_template.timeout, metadata: , retry_policy: @config.rpcs.delete_deidentify_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_deidentify_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_discovery_config(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_discovery_config(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a discovery configuration.
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3001 def delete_discovery_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_discovery_config..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_discovery_config.timeout, metadata: , retry_policy: @config.rpcs.delete_discovery_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_discovery_config request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3437 def delete_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.delete_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_inspect_template(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1392 def delete_inspect_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_inspect_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_inspect_template.timeout, metadata: , retry_policy: @config.rpcs.delete_inspect_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_inspect_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_job_trigger(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2475 def delete_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.delete_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_stored_info_type(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4011 def delete_stored_info_type request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_stored_info_type..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_stored_info_type.timeout, metadata: , retry_policy: @config.rpcs.delete_stored_info_type.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.delete_stored_info_type request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#finish_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4818 def finish_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::FinishDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.finish_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.finish_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.finish_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.finish_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_column_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ColumnDataProfile #get_column_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::ColumnDataProfile
Gets a column data profile.
4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4656 def get_column_data_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_column_data_profile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_column_data_profile.timeout, metadata: , retry_policy: @config.rpcs.get_column_data_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_column_data_profile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate #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.
1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1673 def get_deidentify_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_deidentify_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_deidentify_template.timeout, metadata: , retry_policy: @config.rpcs.get_deidentify_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_deidentify_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig #get_discovery_config(name: nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig
Gets a discovery configuration.
2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2811 def get_discovery_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_discovery_config..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_discovery_config.timeout, metadata: , retry_policy: @config.rpcs.get_discovery_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_discovery_config request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob #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.
3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3352 def get_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.get_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate #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.
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1182 def get_inspect_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetInspectTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_inspect_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_inspect_template.timeout, metadata: , retry_policy: @config.rpcs.get_inspect_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_inspect_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger #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.
2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2241 def get_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.get_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_project_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ProjectDataProfile #get_project_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::ProjectDataProfile
Gets a project data profile.
4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4498 def get_project_data_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_project_data_profile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_project_data_profile.timeout, metadata: , retry_policy: @config.rpcs.get_project_data_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_project_data_profile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType #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.
3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3804 def get_stored_info_type request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_stored_info_type..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_stored_info_type.timeout, metadata: , retry_policy: @config.rpcs.get_stored_info_type.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_stored_info_type request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_table_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::TableDataProfile #get_table_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::TableDataProfile
Gets a table data profile.
4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4577 def get_table_data_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetTableDataProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_table_data_profile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_table_data_profile.timeout, metadata: , retry_policy: @config.rpcs.get_table_data_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.get_table_data_profile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#hybrid_inspect_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse #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.
4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4739 def hybrid_inspect_dlp_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.hybrid_inspect_dlp_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.hybrid_inspect_dlp_job.timeout, metadata: , retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.hybrid_inspect_dlp_job request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#hybrid_inspect_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse #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.
2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2159 def hybrid_inspect_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.hybrid_inspect_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.hybrid_inspect_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.hybrid_inspect_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#inspect_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectContentResponse #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,
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 437 def inspect_content request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::InspectContentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.inspect_content..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.inspect_content.timeout, metadata: , retry_policy: @config.rpcs.inspect_content.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.inspect_content request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_column_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile> #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 data profiles for an organization.
4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4418 def list_column_data_profiles request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_column_data_profiles..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_column_data_profiles.timeout, metadata: , retry_policy: @config.rpcs.list_column_data_profiles.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_column_data_profiles request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, "column_data_profiles", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_deidentify_templates(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate> #list_deidentify_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>
Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1799 def list_deidentify_templates request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_deidentify_templates..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_deidentify_templates.timeout, metadata: , retry_policy: @config.rpcs.list_deidentify_templates.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_deidentify_templates request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, "deidentify_templates", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_discovery_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig> #list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>
Lists discovery configurations.
2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2921 def list_discovery_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_discovery_configs..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_discovery_configs.timeout, metadata: , retry_policy: @config.rpcs.list_discovery_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_discovery_configs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, "discovery_configs", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_dlp_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob> #list_dlp_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, type: nil, order_by: nil, location_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>
Lists DlpJobs that match the specified filter in the request. 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.
3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3268 def list_dlp_jobs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListDlpJobsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_dlp_jobs..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_dlp_jobs.timeout, metadata: , retry_policy: @config.rpcs.list_dlp_jobs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_dlp_jobs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, "jobs", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_info_types(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ListInfoTypesResponse #list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::ListInfoTypesResponse
Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 902 def list_info_types request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInfoTypesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_info_types..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_info_types.timeout, metadata: , retry_policy: @config.rpcs.list_info_types.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_info_types request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_inspect_templates(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate> #list_inspect_templates(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>
Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1308 def list_inspect_templates request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_inspect_templates..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_inspect_templates.timeout, metadata: , retry_policy: @config.rpcs.list_inspect_templates.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_inspect_templates request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, "inspect_templates", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_job_triggers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger> #list_job_triggers(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil, type: nil, location_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>
Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2392 def list_job_triggers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListJobTriggersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_job_triggers..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_job_triggers.timeout, metadata: , retry_policy: @config.rpcs.list_job_triggers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_job_triggers request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, "job_triggers", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_project_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile> #list_project_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>
Lists data profiles for an organization.
4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4137 def list_project_data_profiles request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_project_data_profiles..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_project_data_profiles.timeout, metadata: , retry_policy: @config.rpcs.list_project_data_profiles.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_project_data_profiles request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, "project_data_profiles", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_stored_info_types(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType> #list_stored_info_types(parent: nil, page_token: nil, page_size: nil, order_by: nil, location_id: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>
Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3927 def list_stored_info_types request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_stored_info_types..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_stored_info_types.timeout, metadata: , retry_policy: @config.rpcs.list_stored_info_types.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_stored_info_types request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, "stored_info_types", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_table_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile> #list_table_data_profiles(parent: nil, page_token: nil, page_size: nil, order_by: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>
Lists data profiles for an organization.
4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4277 def list_table_data_profiles request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_table_data_profiles..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_table_data_profiles.timeout, metadata: , retry_policy: @config.rpcs.list_table_data_profiles.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.list_table_data_profiles request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, "table_data_profiles", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#redact_image(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::RedactImageResponse #redact_image(parent: nil, location_id: nil, inspect_config: nil, image_redaction_configs: nil, include_findings: nil, byte_item: nil) ⇒ ::Google::Cloud::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/sensitive-data-protection/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.
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 549 def redact_image request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::RedactImageRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.redact_image..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.redact_image.timeout, metadata: , retry_policy: @config.rpcs.redact_image.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.redact_image request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#reidentify_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ReidentifyContentResponse #reidentify_content(parent: nil, reidentify_config: nil, inspect_config: nil, item: nil, inspect_template_name: nil, reidentify_template_name: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::ReidentifyContentResponse
Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 808 def reidentify_content request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ReidentifyContentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.reidentify_content..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.reidentify_content.timeout, metadata: , retry_policy: @config.rpcs.reidentify_content.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.reidentify_content request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
289 290 291 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 289 def universe_domain @dlp_service_stub.universe_domain end |
#update_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate #update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate
Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1590 def update_deidentify_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_deidentify_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_deidentify_template.timeout, metadata: , retry_policy: @config.rpcs.update_deidentify_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.update_deidentify_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig #update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig
Updates a discovery configuration.
2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2732 def update_discovery_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_discovery_config..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_discovery_config.timeout, metadata: , retry_policy: @config.rpcs.update_discovery_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.update_discovery_config request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate #update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate
Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1099 def update_inspect_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_inspect_template..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_inspect_template.timeout, metadata: , retry_policy: @config.rpcs.update_inspect_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.update_inspect_template request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger #update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger
Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2076 def update_job_trigger request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_job_trigger..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_job_trigger.timeout, metadata: , retry_policy: @config.rpcs.update_job_trigger.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.update_job_trigger request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType #update_stored_info_type(name: nil, config: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType
Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 |
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3721 def update_stored_info_type request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_stored_info_type..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Dlp::V2::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_stored_info_type.timeout, metadata: , retry_policy: @config.rpcs.update_stored_info_type.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @dlp_service_stub.update_stored_info_type request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |