Class: Google::Cloud::Dlp::V2::DlpService::Rest::Client

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#column_data_profile_path, #connection_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.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dlp::V2::DlpService::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the DlpService client.

Yield Parameters:



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 312

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_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


355
356
357
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 355

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.

Examples:


# Modify the configuration for all DlpService clients
::Google::Cloud::Dlp::V2::DlpService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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
263
264
265
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 73

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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ActivateJobTriggerRequest.new

# Call the activate_job_trigger method.
result = client.activate_job_trigger request

# The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
p result

Overloads:

  • #activate_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to activate_job_trigger via a request object, either of type ActivateJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ActivateJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #activate_job_trigger(name: nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to activate_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the trigger to activate, for example projects/dlp-test-project/jobTriggers/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2579

def activate_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.activate_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.activate_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.activate_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.activate_job_trigger request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CancelDlpJobRequest.new

# Call the cancel_dlp_job method.
result = client.cancel_dlp_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_dlp_job via a request object, either of type CancelDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CancelDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #cancel_dlp_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DlpJob resource to be cancelled.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3556

def cancel_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.cancel_dlp_job request, options 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.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



282
283
284
285
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 282

def configure
  yield @config if block_given?
  @config
end

#create_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection #create_connection(parent: nil, connection: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

Create a Connection to an external data source.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new

# Call the create_connection method.
result = client.create_connection request

# The returned object is of type Google::Cloud::Dlp::V2::Connection.
p result

Overloads:

  • #create_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to create_connection via a request object, either of type CreateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_connection(parent: nil, connection: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to create_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name in the format: projects/{project}/locations/{location}.

    • connection (::Google::Cloud::Dlp::V2::Connection, ::Hash) (defaults to: nil)

      Required. The connection resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5027

def create_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_connection request, options 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_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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest.new

# Call the create_deidentify_template method.
result = client.create_deidentify_template request

# The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
p result

Overloads:

  • #create_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to create_deidentify_template via a request object, either of type CreateDeidentifyTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateDeidentifyTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_deidentify_template(parent: nil, deidentify_template: nil, template_id: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to create_deidentify_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID
      • Organizations scope, location specified:
        organizations/ORG_ID/locations/LOCATION_ID
      • Organizations scope, no location specified (defaults to global):
        organizations/ORG_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • deidentify_template (::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash) (defaults to: nil)

      Required. The DeidentifyTemplate to create.

    • template_id (::String) (defaults to: nil)

      The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1515

def create_deidentify_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_deidentify_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_deidentify_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_deidentify_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_deidentify_template request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest.new

# Call the create_discovery_config method.
result = client.create_discovery_config request

# The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig.
p result

Overloads:

  • #create_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to create_discovery_config via a request object, either of type CreateDiscoveryConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_discovery_config(parent: nil, discovery_config: nil, config_id: nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to create_discovery_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value is as follows: projects/PROJECT_ID/locations/LOCATION_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • discovery_config (::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash) (defaults to: nil)

      Required. The DiscoveryConfig to create.

    • config_id (::String) (defaults to: nil)

      The config ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2674

def create_discovery_config request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_discovery_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_discovery_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_discovery_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_discovery_config request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateDlpJobRequest.new

# Call the create_dlp_job method.
result = client.create_dlp_job request

# The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
p result

Overloads:

  • #create_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to create_dlp_job via a request object, either of type CreateDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_dlp_job(parent: nil, inspect_job: nil, risk_job: nil, job_id: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to create_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • inspect_job (::Google::Cloud::Dlp::V2::InspectJobConfig, ::Hash) (defaults to: nil)

      An inspection job scans a storage repository for InfoTypes.

    • risk_job (::Google::Cloud::Dlp::V2::RiskAnalysisJobConfig, ::Hash) (defaults to: nil)

      A risk analysis job calculates re-identification risk metrics for a BigQuery table.

    • job_id (::String) (defaults to: nil)

      The job id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3145

def create_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_dlp_job request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateInspectTemplateRequest.new

# Call the create_inspect_template method.
result = client.create_inspect_template request

# The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
p result

Overloads:

  • #create_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to create_inspect_template via a request object, either of type CreateInspectTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateInspectTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_inspect_template(parent: nil, inspect_template: nil, template_id: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to create_inspect_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID
      • Organizations scope, location specified:
        organizations/ORG_ID/locations/LOCATION_ID
      • Organizations scope, no location specified (defaults to global):
        organizations/ORG_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • inspect_template (::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash) (defaults to: nil)

      Required. The InspectTemplate to create.

    • template_id (::String) (defaults to: nil)

      The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
1046
1047
1048
1049
1050
1051
1052
1053
1054
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1020

def create_inspect_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_inspect_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_inspect_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_inspect_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_inspect_template request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateJobTriggerRequest.new

# Call the create_job_trigger method.
result = client.create_job_trigger request

# The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
p result

Overloads:

  • #create_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to create_job_trigger via a request object, either of type CreateJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_job_trigger(parent: nil, job_trigger: nil, trigger_id: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to create_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • job_trigger (::Google::Cloud::Dlp::V2::JobTrigger, ::Hash) (defaults to: nil)

      Required. The JobTrigger to create.

    • trigger_id (::String) (defaults to: nil)

      The trigger id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2008

def create_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_job_trigger request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest.new

# Call the create_stored_info_type method.
result = client.create_stored_info_type request

# The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
p result

Overloads:

  • #create_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to create_stored_info_type via a request object, either of type CreateStoredInfoTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::CreateStoredInfoTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_stored_info_type(parent: nil, config: nil, stored_info_type_id: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to create_stored_info_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID
      • Organizations scope, location specified:
        organizations/ORG_ID/locations/LOCATION_ID
      • Organizations scope, no location specified (defaults to global):
        organizations/ORG_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • config (::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash) (defaults to: nil)

      Required. Configuration of the storedInfoType to create.

    • stored_info_type_id (::String) (defaults to: nil)

      The storedInfoType ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3666

def create_stored_info_type request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_stored_info_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_stored_info_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_stored_info_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.create_stored_info_type request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeidentifyContentRequest.new

# Call the deidentify_content method.
result = client.deidentify_content request

# The returned object is of type Google::Cloud::Dlp::V2::DeidentifyContentResponse.
p result

Overloads:

  • #deidentify_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyContentResponse

    Pass arguments to deidentify_content via a request object, either of type Google::Cloud::Dlp::V2::DeidentifyContentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeidentifyContentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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

    Pass arguments to deidentify_content via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • deidentify_config (::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash) (defaults to: nil)

      Configuration for the de-identification of the content item. Items specified here will override the template referenced by the deidentify_template_name argument.

    • inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) (defaults to: nil)

      Configuration for the inspector. Items specified here will override the template referenced by the inspect_template_name argument.

    • item (::Google::Cloud::Dlp::V2::ContentItem, ::Hash) (defaults to: nil)

      The item to de-identify. Will be treated as text.

      This value must be of type Table if your deidentify_config is a RecordTransformations object.

    • inspect_template_name (::String) (defaults to: nil)

      Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.

    • deidentify_template_name (::String) (defaults to: nil)

      Template to use. Any configuration directly specified in deidentify_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
715
716
717
718
719
720
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 686

def deidentify_content request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.deidentify_content..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.deidentify_content.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.deidentify_content.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.deidentify_content request, options 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_connection(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_connection(name: nil) ⇒ ::Google::Protobuf::Empty

Delete a Connection.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new

# Call the delete_connection method.
result = client.delete_connection request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_connection(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_connection via a request object, either of type Google::Cloud::Dlp::V2::DeleteConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_connection(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the Connection to be deleted, in the format: projects/{project}/locations/{location}/connections/{connection}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5371

def delete_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_connection request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest.new

# Call the delete_deidentify_template method.
result = client.delete_deidentify_template request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_deidentify_template(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_deidentify_template via a request object, either of type Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteDeidentifyTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_deidentify_template(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_deidentify_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and deidentify template to be deleted, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1901

def delete_deidentify_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_deidentify_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_deidentify_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_deidentify_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_deidentify_template request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest.new

# Call the delete_discovery_config method.
result = client.delete_discovery_config request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_discovery_config(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_discovery_config via a request object, either of type Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_discovery_config(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_discovery_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the config, for example projects/dlp-test-project/discoveryConfigs/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3030

def delete_discovery_config request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_discovery_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_discovery_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_discovery_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_discovery_config request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteDlpJobRequest.new

# Call the delete_dlp_job method.
result = client.delete_dlp_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_dlp_job via a request object, either of type Google::Cloud::Dlp::V2::DeleteDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_dlp_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DlpJob resource to be deleted.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3470

def delete_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_dlp_job request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest.new

# Call the delete_inspect_template method.
result = client.delete_inspect_template request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_inspect_template(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_inspect_template via a request object, either of type Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteInspectTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_inspect_template(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_inspect_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and inspectTemplate to be deleted, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1404

def delete_inspect_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_inspect_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_inspect_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_inspect_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_inspect_template request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteJobTriggerRequest.new

# Call the delete_job_trigger method.
result = client.delete_job_trigger request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_job_trigger(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_job_trigger via a request object, either of type Google::Cloud::Dlp::V2::DeleteJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_job_trigger(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2498

def delete_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_job_trigger request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest.new

# Call the delete_stored_info_type method.
result = client.delete_stored_info_type request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_stored_info_type(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_stored_info_type via a request object, either of type Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteStoredInfoTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_stored_info_type(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_stored_info_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and storedInfoType to be deleted, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4050

def delete_stored_info_type request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_stored_info_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_stored_info_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_stored_info_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_stored_info_type request, options 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_table_data_profile(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_table_data_profile(name: nil) ⇒ ::Google::Protobuf::Empty

Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new

# Call the delete_table_data_profile method.
result = client.delete_table_data_profile request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_table_data_profile(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_table_data_profile via a request object, either of type Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_table_data_profile(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_table_data_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the table data profile.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4781

def delete_table_data_profile request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_table_data_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_table_data_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_table_data_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.delete_table_data_profile request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::FinishDlpJobRequest.new

# Call the finish_dlp_job method.
result = client.finish_dlp_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #finish_dlp_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to finish_dlp_job via a request object, either of type FinishDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::FinishDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #finish_dlp_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to finish_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DlpJob resource to be finished.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4945

def finish_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.finish_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.finish_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.finish_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.finish_dlp_job request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetColumnDataProfileRequest.new

# Call the get_column_data_profile method.
result = client.get_column_data_profile request

# The returned object is of type Google::Cloud::Dlp::V2::ColumnDataProfile.
p result

Overloads:

  • #get_column_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ColumnDataProfile

    Pass arguments to get_column_data_profile via a request object, either of type GetColumnDataProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_column_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::ColumnDataProfile

    Pass arguments to get_column_data_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name, for example organizations/12345/locations/us/columnDataProfiles/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4701

def get_column_data_profile request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_column_data_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_column_data_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_column_data_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_column_data_profile request, options 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_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection #get_connection(name: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

Get a Connection by name.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetConnectionRequest.new

# Call the get_connection method.
result = client.get_connection request

# The returned object is of type Google::Cloud::Dlp::V2::Connection.
p result

Overloads:

  • #get_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to get_connection via a request object, either of type GetConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_connection(name: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to get_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name in the format: projects/{project}/locations/{location}/connections/{connection}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5107

def get_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_connection request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest.new

# Call the get_deidentify_template method.
result = client.get_deidentify_template request

# The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
p result

Overloads:

  • #get_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to get_deidentify_template via a request object, either of type GetDeidentifyTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetDeidentifyTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_deidentify_template(name: nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to get_deidentify_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and deidentify template to be read, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1688

def get_deidentify_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_deidentify_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_deidentify_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_deidentify_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_deidentify_template request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest.new

# Call the get_discovery_config method.
result = client.get_discovery_config request

# The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig.
p result

Overloads:

  • #get_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to get_discovery_config via a request object, either of type GetDiscoveryConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_discovery_config(name: nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to get_discovery_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the configuration, for example projects/dlp-test-project/discoveryConfigs/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2838

def get_discovery_config request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_discovery_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_discovery_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_discovery_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_discovery_config request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetDlpJobRequest.new

# Call the get_dlp_job method.
result = client.get_dlp_job request

# The returned object is of type Google::Cloud::Dlp::V2::DlpJob.
p result

Overloads:

  • #get_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to get_dlp_job via a request object, either of type GetDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_dlp_job(name: nil) ⇒ ::Google::Cloud::Dlp::V2::DlpJob

    Pass arguments to get_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DlpJob resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3384

def get_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_dlp_job request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetInspectTemplateRequest.new

# Call the get_inspect_template method.
result = client.get_inspect_template request

# The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
p result

Overloads:

  • #get_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to get_inspect_template via a request object, either of type GetInspectTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetInspectTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_inspect_template(name: nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to get_inspect_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and inspectTemplate to be read, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1192

def get_inspect_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_inspect_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_inspect_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_inspect_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_inspect_template request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetJobTriggerRequest.new

# Call the get_job_trigger method.
result = client.get_job_trigger request

# The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
p result

Overloads:

  • #get_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to get_job_trigger via a request object, either of type GetJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_job_trigger(name: nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to get_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2262

def get_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_job_trigger request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetProjectDataProfileRequest.new

# Call the get_project_data_profile method.
result = client.get_project_data_profile request

# The returned object is of type Google::Cloud::Dlp::V2::ProjectDataProfile.
p result

Overloads:

  • #get_project_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ProjectDataProfile

    Pass arguments to get_project_data_profile via a request object, either of type GetProjectDataProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_project_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::ProjectDataProfile

    Pass arguments to get_project_data_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name, for example organizations/12345/locations/us/projectDataProfiles/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4541

def get_project_data_profile request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_project_data_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_project_data_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_project_data_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_project_data_profile request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest.new

# Call the get_stored_info_type method.
result = client.get_stored_info_type request

# The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
p result

Overloads:

  • #get_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to get_stored_info_type via a request object, either of type GetStoredInfoTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetStoredInfoTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_stored_info_type(name: nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to get_stored_info_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the organization and storedInfoType to be read, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3841

def get_stored_info_type request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_stored_info_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_stored_info_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_stored_info_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_stored_info_type request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::GetTableDataProfileRequest.new

# Call the get_table_data_profile method.
result = client.get_table_data_profile request

# The returned object is of type Google::Cloud::Dlp::V2::TableDataProfile.
p result

Overloads:

  • #get_table_data_profile(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::TableDataProfile

    Pass arguments to get_table_data_profile via a request object, either of type GetTableDataProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::GetTableDataProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_table_data_profile(name: nil) ⇒ ::Google::Cloud::Dlp::V2::TableDataProfile

    Pass arguments to get_table_data_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name, for example organizations/12345/locations/us/tableDataProfiles/53234423.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4621

def get_table_data_profile request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_table_data_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_table_data_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_table_data_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.get_table_data_profile request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest.new

# Call the hybrid_inspect_dlp_job method.
result = client.hybrid_inspect_dlp_job request

# The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse.
p result

Overloads:

  • #hybrid_inspect_dlp_job(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse

    Pass arguments to hybrid_inspect_dlp_job via a request object, either of type HybridInspectDlpJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::HybridInspectDlpJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #hybrid_inspect_dlp_job(name: nil, hybrid_item: nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse

    Pass arguments to hybrid_inspect_dlp_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the job to execute a hybrid inspect on, for example projects/dlp-test-project/dlpJob/53234423.

    • hybrid_item (::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash) (defaults to: nil)

      The item to inspect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4865

def hybrid_inspect_dlp_job request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.hybrid_inspect_dlp_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.hybrid_inspect_dlp_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.hybrid_inspect_dlp_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.hybrid_inspect_dlp_job request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest.new

# Call the hybrid_inspect_job_trigger method.
result = client.hybrid_inspect_job_trigger request

# The returned object is of type Google::Cloud::Dlp::V2::HybridInspectResponse.
p result

Overloads:

  • #hybrid_inspect_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse

    Pass arguments to hybrid_inspect_job_trigger via a request object, either of type HybridInspectJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::HybridInspectJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #hybrid_inspect_job_trigger(name: nil, hybrid_item: nil) ⇒ ::Google::Cloud::Dlp::V2::HybridInspectResponse

    Pass arguments to hybrid_inspect_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the trigger to execute a hybrid inspect on, for example projects/dlp-test-project/jobTriggers/53234423.

    • hybrid_item (::Google::Cloud::Dlp::V2::HybridContentItem, ::Hash) (defaults to: nil)

      The item to inspect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2179

def hybrid_inspect_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.hybrid_inspect_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.hybrid_inspect_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.hybrid_inspect_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.hybrid_inspect_job_trigger request, options 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,

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::InspectContentRequest.new

# Call the inspect_content method.
result = client.inspect_content request

# The returned object is of type Google::Cloud::Dlp::V2::InspectContentResponse.
p result

Overloads:

  • #inspect_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectContentResponse

    Pass arguments to inspect_content via a request object, either of type InspectContentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::InspectContentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #inspect_content(parent: nil, inspect_config: nil, item: nil, inspect_template_name: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::InspectContentResponse

    Pass arguments to inspect_content via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) (defaults to: nil)

      Configuration for the inspector. What specified here will override the template referenced by the inspect_template_name argument.

    • item (::Google::Cloud::Dlp::V2::ContentItem, ::Hash) (defaults to: nil)

      The item to inspect.

    • inspect_template_name (::String) (defaults to: nil)

      Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
471
472
473
474
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 440

def inspect_content request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.inspect_content..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.inspect_content.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.inspect_content.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.inspect_content request, options 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 column data profiles for an organization.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest.new

# Call the list_column_data_profiles method.
result = client.list_column_data_profiles request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::ColumnDataProfile.
  p item
end

Overloads:

  • #list_column_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ColumnDataProfile>

    Pass arguments to list_column_data_profiles via a request object, either of type ListColumnDataProfilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_column_data_profiles via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Resource name of the organization or project, for example organizations/433245324/locations/europe or projects/project-id/locations/asia.

    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed.

      Examples:

      • project_id asc
      • table_id
      • sensitivity_level desc

      Supported fields are:

      • project_id: The Google Cloud project ID.
      • dataset_id: The ID of a BigQuery dataset.
      • table_id: The ID of a BigQuery table.
      • sensitivity_level: How sensitive the data in a column is, at most.
      • data_risk_level: How much risk is associated with this data.
      • profile_last_generated: When the profile was last updated in epoch seconds.
    • filter (::String) (defaults to: nil)

      Allows filtering.

      Supported syntax:

      • Filter expressions are made up of one or more restrictions.
      • Restrictions can be combined by AND or OR logical operators. A sequence of restrictions implicitly uses AND.
      • A restriction has the form of {field} {operator} {value}.
      • Supported fields/values:
        • table_data_profile_name - The name of the related table data profile.
        • project_id - The Google Cloud project ID. (REQUIRED)
        • dataset_id - The BigQuery dataset ID. (REQUIRED)
        • table_id - The BigQuery table ID. (REQUIRED)
        • field_id - The ID of the BigQuery field.
        • info_type - The infotype detected in the resource.
        • sensitivity_level - HIGH|MEDIUM|LOW
        • data_risk_level: How much risk is associated with this data.
        • status_code - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
      • The operator must be = for project_id, dataset_id, and table_id. Other filters also support !=.

      Examples:

      • project_id = 12345 AND status_code = 1
      • project_id = 12345 AND sensitivity_level = HIGH
      • project_id = 12345 AND info_type = STREET_ADDRESS

      The length of this field should be no more than 500 characters.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4460

def list_column_data_profiles request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_column_data_profiles..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_column_data_profiles.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_column_data_profiles.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_column_data_profiles request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, "column_data_profiles", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection> #list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

Lists Connections in a parent.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new

# Call the list_connections method.
result = client.list_connections request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::Connection.
  p item
end

Overloads:

  • #list_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

    Pass arguments to list_connections via a request object, either of type ListConnectionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

    Pass arguments to list_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent name, for example: projects/project-id/locations/global.

    • page_size (::Integer) (defaults to: nil)

      Optional. Number of results per page, max 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.

    • filter (::String) (defaults to: nil)

      Optional. Supported field/value: state - MISSING|AVAILABLE|ERROR

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5198

def list_connections request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_connections..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_connections.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connections.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_connections request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_connections, "connections", request, result, options
    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>

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest.new

# Call the list_deidentify_templates method.
result = client.list_deidentify_templates request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate.
  p item
end

Overloads:

  • #list_deidentify_templates(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DeidentifyTemplate>

    Pass arguments to list_deidentify_templates via a request object, either of type ListDeidentifyTemplatesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListDeidentifyTemplatesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_deidentify_templates via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID
      • Organizations scope, location specified:
        organizations/ORG_ID/locations/LOCATION_ID
      • Organizations scope, no location specified (defaults to global):
        organizations/ORG_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval. Comes from the previous call to ListDeidentifyTemplates.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc,update_time, create_time desc

      Supported fields are:

      • create_time: corresponds to the time the template was created.
      • update_time: corresponds to the time the template was last updated.
      • name: corresponds to the template's name.
      • display_name: corresponds to the template's display name.
    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1815

def list_deidentify_templates request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_deidentify_templates..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_deidentify_templates.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_deidentify_templates.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_deidentify_templates request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, "deidentify_templates", request, result, options
    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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest.new

# Call the list_discovery_configs method.
result = client.list_discovery_configs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::DiscoveryConfig.
  p item
end

Overloads:

  • #list_discovery_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>

    Pass arguments to list_discovery_configs via a request object, either of type ListDiscoveryConfigsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_discovery_configs(parent: nil, page_token: nil, page_size: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DiscoveryConfig>

    Pass arguments to list_discovery_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value is as follows: projects/PROJECT_ID/locations/LOCATION_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval. Comes from the previous call to ListDiscoveryConfigs. order_by field must not change for subsequent calls.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by a server.

    • order_by (::String) (defaults to: nil)

      Comma separated list of config fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc,update_time, create_time desc

      Supported fields are:

      • last_run_time: corresponds to the last time the DiscoveryConfig ran.
      • name: corresponds to the DiscoveryConfig's name.
      • status: corresponds to DiscoveryConfig's status.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2949

def list_discovery_configs request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_discovery_configs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_discovery_configs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_discovery_configs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_discovery_configs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, "discovery_configs", request, result, options
    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>

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListDlpJobsRequest.new

# Call the list_dlp_jobs method.
result = client.list_dlp_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob.
  p item
end

Overloads:

  • #list_dlp_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::DlpJob>

    Pass arguments to list_dlp_jobs via a request object, either of type ListDlpJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListDlpJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_dlp_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • filter (::String) (defaults to: nil)

      Allows filtering.

      Supported syntax:

      • Filter expressions are made up of one or more restrictions.
      • Restrictions can be combined by AND or OR logical operators. A sequence of restrictions implicitly uses AND.
      • A restriction has the form of {field} {operator} {value}.
      • Supported fields/values for inspect jobs:
        • state - PENDING|RUNNING|CANCELED|FINISHED|FAILED
        • inspected_storage - DATASTORE|CLOUD_STORAGE|BIGQUERY
        • trigger_name - The name of the trigger that created the job.
        • 'end_time` - Corresponds to the time the job finished.
        • 'start_time` - Corresponds to the time the job finished.
      • Supported fields for risk analysis jobs:
        • state - RUNNING|CANCELED|FINISHED|FAILED
        • 'end_time` - Corresponds to the time the job finished.
        • 'start_time` - Corresponds to the time the job finished.
      • The operator must be = or !=.

      Examples:

      • inspected_storage = cloud_storage AND state = done
      • inspected_storage = cloud_storage OR inspected_storage = bigquery
      • inspected_storage = cloud_storage AND (state = done OR state = canceled)
      • end_time > \"2017-12-12T00:00:00+00:00\"

      The length of this field should be no more than 500 characters.

    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token.

    • type (::Google::Cloud::Dlp::V2::DlpJobType) (defaults to: nil)

      The type of job. Defaults to DlpJobType.INSPECT

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc, end_time asc, create_time desc

      Supported fields are:

      • create_time: corresponds to the time the job was created.
      • end_time: corresponds to the time the job ended.
      • name: corresponds to the job's name.
      • state: corresponds to state
    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3299

def list_dlp_jobs request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_dlp_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_dlp_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_dlp_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_dlp_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, "jobs", request, result, options
    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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListInfoTypesRequest.new

# Call the list_info_types method.
result = client.list_info_types request

# The returned object is of type Google::Cloud::Dlp::V2::ListInfoTypesResponse.
p result

Overloads:

  • #list_info_types(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ListInfoTypesResponse

    Pass arguments to list_info_types via a request object, either of type ListInfoTypesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListInfoTypesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_info_types(parent: nil, language_code: nil, filter: nil, location_id: nil) ⇒ ::Google::Cloud::Dlp::V2::ListInfoTypesResponse

    Pass arguments to list_info_types via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      The parent resource name.

      The format of this value is as follows:

      locations/<var>LOCATION_ID</var>
      
    • language_code (::String) (defaults to: nil)

      BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.

    • filter (::String) (defaults to: nil)

      filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
936
937
938
939
940
941
942
943
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 909

def list_info_types request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_info_types..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_info_types.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_info_types.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_info_types request, options 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>

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListInspectTemplatesRequest.new

# Call the list_inspect_templates method.
result = client.list_inspect_templates request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate.
  p item
end

Overloads:

  • #list_inspect_templates(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::InspectTemplate>

    Pass arguments to list_inspect_templates via a request object, either of type ListInspectTemplatesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListInspectTemplatesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_inspect_templates via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID
      • Organizations scope, location specified:
        organizations/ORG_ID/locations/LOCATION_ID
      • Organizations scope, no location specified (defaults to global):
        organizations/ORG_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval. Comes from the previous call to ListInspectTemplates.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc,update_time, create_time desc

      Supported fields are:

      • create_time: corresponds to the time the template was created.
      • update_time: corresponds to the time the template was last updated.
      • name: corresponds to the template's name.
      • display_name: corresponds to the template's display name.
    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1319

def list_inspect_templates request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_inspect_templates..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_inspect_templates.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_inspect_templates.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_inspect_templates request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, "inspect_templates", request, result, options
    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>

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListJobTriggersRequest.new

# Call the list_job_triggers method.
result = client.list_job_triggers request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger.
  p item
end

Overloads:

  • #list_job_triggers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::JobTrigger>

    Pass arguments to list_job_triggers via a request object, either of type ListJobTriggersRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListJobTriggersRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_job_triggers via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval. Comes from the previous call to ListJobTriggers. order_by field must not change for subsequent calls.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by a server.

    • order_by (::String) (defaults to: nil)

      Comma separated list of triggeredJob fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc,update_time, create_time desc

      Supported fields are:

      • create_time: corresponds to the time the JobTrigger was created.
      • update_time: corresponds to the time the JobTrigger was last updated.
      • last_run_time: corresponds to the last time the JobTrigger ran.
      • name: corresponds to the JobTrigger's name.
      • display_name: corresponds to the JobTrigger's display name.
      • status: corresponds to JobTrigger's status.
    • filter (::String) (defaults to: nil)

      Allows filtering.

      Supported syntax:

      • Filter expressions are made up of one or more restrictions.
      • Restrictions can be combined by AND or OR logical operators. A sequence of restrictions implicitly uses AND.
      • A restriction has the form of {field} {operator} {value}.
      • Supported fields/values for inspect triggers:
        • status - HEALTHY|PAUSED|CANCELLED
        • inspected_storage - DATASTORE|CLOUD_STORAGE|BIGQUERY
        • 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored.
        • 'error_count' - Number of errors that have occurred while running.
      • The operator must be = or != for status and inspected_storage.

      Examples:

      • inspected_storage = cloud_storage AND status = HEALTHY
      • inspected_storage = cloud_storage OR inspected_storage = bigquery
      • inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
      • last_run_time > \"2017-12-12T00:00:00+00:00\"

      The length of this field should be no more than 500 characters.

    • type (::Google::Cloud::Dlp::V2::DlpJobType) (defaults to: nil)

      The type of jobs. Will use DlpJobType.INSPECT if not set.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2414

def list_job_triggers request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_job_triggers..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_job_triggers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_job_triggers.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_job_triggers request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, "job_triggers", request, result, options
    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 project data profiles for an organization.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest.new

# Call the list_project_data_profiles method.
result = client.list_project_data_profiles request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::ProjectDataProfile.
  p item
end

Overloads:

  • #list_project_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ProjectDataProfile>

    Pass arguments to list_project_data_profiles via a request object, either of type ListProjectDataProfilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_project_data_profiles via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. organizations/{org_id}/locations/{loc_id}

    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed.

      Examples:

      • project_id
      • sensitivity_level desc

      Supported fields are:

      • project_id: Google Cloud project ID
      • sensitivity_level: How sensitive the data in a project is, at most.
      • data_risk_level: How much risk is associated with this data.
      • profile_last_generated: When the profile was last updated in epoch seconds.
    • filter (::String) (defaults to: nil)

      Allows filtering.

      Supported syntax:

      • Filter expressions are made up of one or more restrictions.
      • Restrictions can be combined by AND or OR logical operators. A sequence of restrictions implicitly uses AND.
      • A restriction has the form of {field} {operator} {value}.
      • Supported fields/values:
      • The operator must be = or !=.

      Examples:

      • project_id = 12345 AND status_code = 1
      • project_id = 12345 AND sensitivity_level = HIGH

      The length of this field should be no more than 500 characters.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4177

def list_project_data_profiles request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_project_data_profiles..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_project_data_profiles.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_project_data_profiles.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_project_data_profiles request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, "project_data_profiles", request, result, options
    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>

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest.new

# Call the list_stored_info_types method.
result = client.list_stored_info_types request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType.
  p item
end

Overloads:

  • #list_stored_info_types(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::StoredInfoType>

    Pass arguments to list_stored_info_types via a request object, either of type ListStoredInfoTypesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListStoredInfoTypesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_stored_info_types via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval. Comes from the previous call to ListStoredInfoTypes.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant.

      Example: name asc, display_name, create_time desc

      Supported fields are:

      • create_time: corresponds to the time the most recent version of the resource was created.
      • state: corresponds to the state of the resource.
      • name: corresponds to resource name.
      • display_name: corresponds to info type's display name.
    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3965

def list_stored_info_types request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_stored_info_types..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_stored_info_types.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_stored_info_types.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_stored_info_types request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, "stored_info_types", request, result, options
    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 table data profiles for an organization.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ListTableDataProfilesRequest.new

# Call the list_table_data_profiles method.
result = client.list_table_data_profiles request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::TableDataProfile.
  p item
end

Overloads:

  • #list_table_data_profiles(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::TableDataProfile>

    Pass arguments to list_table_data_profiles via a request object, either of type ListTableDataProfilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_table_data_profiles via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Resource name of the organization or project, for example organizations/433245324/locations/europe or projects/project-id/locations/asia.

    • page_token (::String) (defaults to: nil)

      Page token to continue retrieval.

    • page_size (::Integer) (defaults to: nil)

      Size of the page. This value can be limited by the server. If zero, server returns a page of max size 100.

    • order_by (::String) (defaults to: nil)

      Comma separated list of fields to order by, followed by asc or desc postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed.

      Examples:

      • project_id asc
      • table_id
      • sensitivity_level desc

      Supported fields are:

      • project_id: The Google Cloud project ID.
      • dataset_id: The ID of a BigQuery dataset.
      • table_id: The ID of a BigQuery table.
      • sensitivity_level: How sensitive the data in a table is, at most.
      • data_risk_level: How much risk is associated with this data.
      • profile_last_generated: When the profile was last updated in epoch seconds.
      • last_modified: The last time the resource was modified.
      • resource_visibility: Visibility restriction for this resource.
      • row_count: Number of rows in this resource.
    • filter (::String) (defaults to: nil)

      Allows filtering.

      Supported syntax:

      • Filter expressions are made up of one or more restrictions.
      • Restrictions can be combined by AND or OR logical operators. A sequence of restrictions implicitly uses AND.
      • A restriction has the form of {field} {operator} {value}.
      • Supported fields/values:
      • The operator must be = or !=.

      Examples:

      • project_id = 12345 AND status_code = 1
      • project_id = 12345 AND sensitivity_level = HIGH
      • project_id = 12345 AND resource_visibility = PUBLIC

      The length of this field should be no more than 500 characters.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 4318

def list_table_data_profiles request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_table_data_profiles..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_table_data_profiles.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_table_data_profiles.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.list_table_data_profiles request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, "table_data_profiles", request, result, options
    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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::RedactImageRequest.new

# Call the redact_image method.
result = client.redact_image request

# The returned object is of type Google::Cloud::Dlp::V2::RedactImageResponse.
p result

Overloads:

  • #redact_image(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::RedactImageResponse

    Pass arguments to redact_image via a request object, either of type RedactImageRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::RedactImageRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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

    Pass arguments to redact_image via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

    • inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) (defaults to: nil)

      Configuration for the inspector.

    • image_redaction_configs (::Array<::Google::Cloud::Dlp::V2::RedactImageRequest::ImageRedactionConfig, ::Hash>) (defaults to: nil)

      The configuration for specifying what content to redact from images.

    • include_findings (::Boolean) (defaults to: nil)

      Whether the response should include findings along with the redacted image.

    • byte_item (::Google::Cloud::Dlp::V2::ByteContentItem, ::Hash) (defaults to: nil)

      The content must be PNG, JPEG, SVG or BMP.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
583
584
585
586
587
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 553

def redact_image request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.redact_image..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.redact_image.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.redact_image.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.redact_image request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::ReidentifyContentRequest.new

# Call the reidentify_content method.
result = client.reidentify_content request

# The returned object is of type Google::Cloud::Dlp::V2::ReidentifyContentResponse.
p result

Overloads:

  • #reidentify_content(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::ReidentifyContentResponse

    Pass arguments to reidentify_content via a request object, either of type ReidentifyContentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::ReidentifyContentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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

    Pass arguments to reidentify_content via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent resource name.

      The format of this value varies depending on whether you have specified a processing location:

      • Projects scope, location specified:
        projects/PROJECT_ID/locations/LOCATION_ID
      • Projects scope, no location specified (defaults to global):
        projects/PROJECT_ID

      The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:

      parent=projects/example-project/locations/europe-west3
      
    • reidentify_config (::Google::Cloud::Dlp::V2::DeidentifyConfig, ::Hash) (defaults to: nil)

      Configuration for the re-identification of the content item. This field shares the same proto message type that is used for de-identification, however its usage here is for the reversal of the previous de-identification. Re-identification is performed by examining the transformations used to de-identify the items and executing the reverse. This requires that only reversible transformations be provided here. The reversible transformations are:

      • CryptoDeterministicConfig
      • CryptoReplaceFfxFpeConfig
    • inspect_config (::Google::Cloud::Dlp::V2::InspectConfig, ::Hash) (defaults to: nil)

      Configuration for the inspector.

    • item (::Google::Cloud::Dlp::V2::ContentItem, ::Hash) (defaults to: nil)

      The item to re-identify. Will be treated as text.

    • inspect_template_name (::String) (defaults to: nil)

      Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.

    • reidentify_template_name (::String) (defaults to: nil)

      Template to use. References an instance of DeidentifyTemplate. Any configuration directly specified in reidentify_config or inspect_config will override those set in the template. The DeidentifyTemplate used must include only reversible transformations. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.

    • location_id (::String) (defaults to: nil)

      Deprecated. This field has no effect.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
842
843
844
845
846
847
848
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 814

def reidentify_content request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.reidentify_content..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.reidentify_content.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.reidentify_content.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.reidentify_content request, options 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

#search_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection> #search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

Searches for Connections in a parent.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new

# Call the search_connections method.
result = client.search_connections request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dlp::V2::Connection.
  p item
end

Overloads:

  • #search_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

    Pass arguments to search_connections via a request object, either of type SearchConnectionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>

    Pass arguments to search_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent name, typically an organization, without location. For example: organizations/12345678.

    • page_size (::Integer) (defaults to: nil)

      Optional. Number of results per page, max 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.

    • filter (::String) (defaults to: nil)

      Optional. Supported field/value: - state - MISSING|AVAILABLE|ERROR

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5290

def search_connections request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.search_connections..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.search_connections.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_connections.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.search_connections request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :search_connections, "connections", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


292
293
294
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 292

def universe_domain
  @dlp_service_stub.universe_domain
end

#update_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection #update_connection(name: nil, connection: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

Update a Connection.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new

# Call the update_connection method.
result = client.update_connection request

# The returned object is of type Google::Cloud::Dlp::V2::Connection.
p result

Overloads:

  • #update_connection(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to update_connection via a request object, either of type UpdateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_connection(name: nil, connection: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::Connection

    Pass arguments to update_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name in the format: projects/{project}/locations/{location}/connections/{connection}.

    • connection (::Google::Cloud::Dlp::V2::Connection, ::Hash) (defaults to: nil)

      Required. The connection with new values for the relevant fields.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 5455

def update_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_connection request, options 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_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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest.new

# Call the update_deidentify_template method.
result = client.update_deidentify_template request

# The returned object is of type Google::Cloud::Dlp::V2::DeidentifyTemplate.
p result

Overloads:

  • #update_deidentify_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to update_deidentify_template via a request object, either of type UpdateDeidentifyTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateDeidentifyTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_deidentify_template(name: nil, deidentify_template: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::DeidentifyTemplate

    Pass arguments to update_deidentify_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of organization and deidentify template to be updated, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

    • deidentify_template (::Google::Cloud::Dlp::V2::DeidentifyTemplate, ::Hash) (defaults to: nil)

      New DeidentifyTemplate value.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1604

def update_deidentify_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_deidentify_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_deidentify_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_deidentify_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_deidentify_template request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest.new

# Call the update_discovery_config method.
result = client.update_discovery_config request

# The returned object is of type Google::Cloud::Dlp::V2::DiscoveryConfig.
p result

Overloads:

  • #update_discovery_config(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to update_discovery_config via a request object, either of type UpdateDiscoveryConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_discovery_config(name: nil, discovery_config: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::DiscoveryConfig

    Pass arguments to update_discovery_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the configuration, for example projects/dlp-test-project/discoveryConfigs/53234423.

    • discovery_config (::Google::Cloud::Dlp::V2::DiscoveryConfig, ::Hash) (defaults to: nil)

      Required. New DiscoveryConfig value.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2758

def update_discovery_config request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_discovery_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_discovery_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_discovery_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_discovery_config request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest.new

# Call the update_inspect_template method.
result = client.update_inspect_template request

# The returned object is of type Google::Cloud::Dlp::V2::InspectTemplate.
p result

Overloads:

  • #update_inspect_template(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to update_inspect_template via a request object, either of type UpdateInspectTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateInspectTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_inspect_template(name: nil, inspect_template: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::InspectTemplate

    Pass arguments to update_inspect_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of organization and inspectTemplate to be updated, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

    • inspect_template (::Google::Cloud::Dlp::V2::InspectTemplate, ::Hash) (defaults to: nil)

      New InspectTemplate value.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 1108

def update_inspect_template request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_inspect_template..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_inspect_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_inspect_template.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_inspect_template request, options 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

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateJobTriggerRequest.new

# Call the update_job_trigger method.
result = client.update_job_trigger request

# The returned object is of type Google::Cloud::Dlp::V2::JobTrigger.
p result

Overloads:

  • #update_job_trigger(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to update_job_trigger via a request object, either of type UpdateJobTriggerRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateJobTriggerRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_job_trigger(name: nil, job_trigger: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::JobTrigger

    Pass arguments to update_job_trigger via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

    • job_trigger (::Google::Cloud::Dlp::V2::JobTrigger, ::Hash) (defaults to: nil)

      New JobTrigger value.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 2095

def update_job_trigger request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_job_trigger..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_job_trigger.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_job_trigger.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_job_trigger request, options 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.

Examples:

Basic example

require "google/cloud/dlp/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest.new

# Call the update_stored_info_type method.
result = client.update_stored_info_type request

# The returned object is of type Google::Cloud::Dlp::V2::StoredInfoType.
p result

Overloads:

  • #update_stored_info_type(request, options = nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to update_stored_info_type via a request object, either of type UpdateStoredInfoTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dlp::V2::UpdateStoredInfoTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_stored_info_type(name: nil, config: nil, update_mask: nil) ⇒ ::Google::Cloud::Dlp::V2::StoredInfoType

    Pass arguments to update_stored_info_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Resource name of organization and storedInfoType to be updated, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

    • config (::Google::Cloud::Dlp::V2::StoredInfoTypeConfig, ::Hash) (defaults to: nil)

      Updated configuration for the storedInfoType. If not provided, a new version of the storedInfoType will be created with the existing configuration.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask to control which fields get updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
# File 'lib/google/cloud/dlp/v2/dlp_service/rest/client.rb', line 3757

def update_stored_info_type request, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_stored_info_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_stored_info_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_stored_info_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dlp_service_stub.update_stored_info_type request, options 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