google-cloud-dlp 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dlp.rb +1 -1
- data/lib/google/cloud/dlp/v2.rb +1 -1
- data/lib/google/cloud/dlp/v2/credentials.rb +1 -1
- data/lib/google/cloud/dlp/v2/dlp_service_client.rb +216 -101
- data/lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb +160 -48
- data/lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/storage.rb +42 -22
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/any.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/dlp/v2/doc/google/rpc/status.rb +18 -15
- data/lib/google/cloud/dlp/v2/doc/google/type/date.rb +15 -10
- data/lib/google/cloud/dlp/v2/doc/google/type/timeofday.rb +2 -2
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +18 -0
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +4 -1
- data/lib/google/privacy/dlp/v2/storage_pb.rb +4 -0
- metadata +25 -6
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -115,12 +115,12 @@ module Google
|
|
115
115
|
# @return [Integer]
|
116
116
|
# Max number of findings that will be returned for each item scanned.
|
117
117
|
# When set within `InspectDataSourceRequest`,
|
118
|
-
# the maximum returned is
|
118
|
+
# the maximum returned is 2000 regardless if this is set higher.
|
119
119
|
# When set within `InspectContentRequest`, this field is ignored.
|
120
120
|
# @!attribute [rw] max_findings_per_request
|
121
121
|
# @return [Integer]
|
122
122
|
# Max number of findings that will be returned per request/job.
|
123
|
-
# When set within `InspectContentRequest`, the maximum returned is
|
123
|
+
# When set within `InspectContentRequest`, the maximum returned is 2000
|
124
124
|
# regardless if this is set higher.
|
125
125
|
# @!attribute [rw] max_findings_per_info_type
|
126
126
|
# @return [Array<Google::Privacy::Dlp::V2::InspectConfig::FindingLimits::InfoTypeLimit>]
|
@@ -597,6 +597,7 @@ module Google
|
|
597
597
|
# @return [Google::Privacy::Dlp::V2::InspectJobConfig]
|
598
598
|
class RequestedOptions; end
|
599
599
|
|
600
|
+
# All result fields mentioned below are updated while the job is processing.
|
600
601
|
# @!attribute [rw] processed_bytes
|
601
602
|
# @return [Integer]
|
602
603
|
# Total size in bytes that were processed.
|
@@ -620,6 +621,10 @@ module Google
|
|
620
621
|
# @!attribute [rw] supported_by
|
621
622
|
# @return [Array<Google::Privacy::Dlp::V2::InfoTypeSupportedBy>]
|
622
623
|
# Which parts of the API supports this InfoType.
|
624
|
+
# @!attribute [rw] description
|
625
|
+
# @return [String]
|
626
|
+
# Description of the infotype. Translated when language is provided in the
|
627
|
+
# request.
|
623
628
|
class InfoTypeDescription; end
|
624
629
|
|
625
630
|
# Request for the list of infoTypes.
|
@@ -1196,6 +1201,8 @@ module Google
|
|
1196
1201
|
# @return [Google::Privacy::Dlp::V2::CryptoHashConfig]
|
1197
1202
|
# @!attribute [rw] date_shift_config
|
1198
1203
|
# @return [Google::Privacy::Dlp::V2::DateShiftConfig]
|
1204
|
+
# @!attribute [rw] crypto_deterministic_config
|
1205
|
+
# @return [Google::Privacy::Dlp::V2::CryptoDeterministicConfig]
|
1199
1206
|
class PrimitiveTransformation; end
|
1200
1207
|
|
1201
1208
|
# For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
|
@@ -1229,14 +1236,72 @@ module Google
|
|
1229
1236
|
# Pseudonymization method that generates surrogates via cryptographic hashing.
|
1230
1237
|
# Uses SHA-256.
|
1231
1238
|
# The key size must be either 32 or 64 bytes.
|
1232
|
-
# Outputs a
|
1233
|
-
# (for example,
|
1239
|
+
# Outputs a base64 encoded representation of the hashed output
|
1240
|
+
# (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
|
1234
1241
|
# Currently, only string and integer values can be hashed.
|
1242
|
+
# See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
|
1235
1243
|
# @!attribute [rw] crypto_key
|
1236
1244
|
# @return [Google::Privacy::Dlp::V2::CryptoKey]
|
1237
1245
|
# The key used by the hash function.
|
1238
1246
|
class CryptoHashConfig; end
|
1239
1247
|
|
1248
|
+
# Pseudonymization method that generates deterministic encryption for the given
|
1249
|
+
# input. Outputs a base64 encoded representation of the encrypted output.
|
1250
|
+
# Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
|
1251
|
+
# @!attribute [rw] crypto_key
|
1252
|
+
# @return [Google::Privacy::Dlp::V2::CryptoKey]
|
1253
|
+
# The key used by the encryption function.
|
1254
|
+
# @!attribute [rw] surrogate_info_type
|
1255
|
+
# @return [Google::Privacy::Dlp::V2::InfoType]
|
1256
|
+
# The custom info type to annotate the surrogate with.
|
1257
|
+
# This annotation will be applied to the surrogate by prefixing it with
|
1258
|
+
# the name of the custom info type followed by the number of
|
1259
|
+
# characters comprising the surrogate. The following scheme defines the
|
1260
|
+
# format: <info type name>(<surrogate character count>):<surrogate>
|
1261
|
+
#
|
1262
|
+
# For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
|
1263
|
+
# the surrogate is 'abc', the full replacement value
|
1264
|
+
# will be: 'MY_TOKEN_INFO_TYPE(3):abc'
|
1265
|
+
#
|
1266
|
+
# This annotation identifies the surrogate when inspecting content using the
|
1267
|
+
# custom info type 'Surrogate'. This facilitates reversal of the
|
1268
|
+
# surrogate when it occurs in free text.
|
1269
|
+
#
|
1270
|
+
# In order for inspection to work properly, the name of this info type must
|
1271
|
+
# not occur naturally anywhere in your data; otherwise, inspection may either
|
1272
|
+
#
|
1273
|
+
# * reverse a surrogate that does not correspond to an actual identifier
|
1274
|
+
# * be unable to parse the surrogate and result in an error
|
1275
|
+
#
|
1276
|
+
# Therefore, choose your custom info type name carefully after considering
|
1277
|
+
# what your data looks like. One way to select a name that has a high chance
|
1278
|
+
# of yielding reliable detection is to include one or more unicode characters
|
1279
|
+
# that are highly improbable to exist in your data.
|
1280
|
+
# For example, assuming your data is entered from a regular ASCII keyboard,
|
1281
|
+
# the symbol with the hex code point 29DD might be used like so:
|
1282
|
+
# ⧝MY_TOKEN_TYPE
|
1283
|
+
# @!attribute [rw] context
|
1284
|
+
# @return [Google::Privacy::Dlp::V2::FieldId]
|
1285
|
+
# Optional. A context may be used for higher security and maintaining
|
1286
|
+
# referential integrity such that the same identifier in two different
|
1287
|
+
# contexts will be given a distinct surrogate. The context is appended to
|
1288
|
+
# plaintext value being encrypted. On decryption the provided context is
|
1289
|
+
# validated against the value used during encryption. If a context was
|
1290
|
+
# provided during encryption, same context must be provided during decryption
|
1291
|
+
# as well.
|
1292
|
+
#
|
1293
|
+
# If the context is not set, plaintext would be used as is for encryption.
|
1294
|
+
# If the context is set but:
|
1295
|
+
#
|
1296
|
+
# 1. there is no record present when transforming a given value or
|
1297
|
+
# 2. the field is not present when transforming a given value,
|
1298
|
+
#
|
1299
|
+
# plaintext would be used as is for encryption.
|
1300
|
+
#
|
1301
|
+
# Note that case (1) is expected when an `InfoTypeTransformation` is
|
1302
|
+
# applied to both structured and non-structured `ContentItem`s.
|
1303
|
+
class CryptoDeterministicConfig; end
|
1304
|
+
|
1240
1305
|
# Replace each input value with a given `Value`.
|
1241
1306
|
# @!attribute [rw] new_value
|
1242
1307
|
# @return [Google::Privacy::Dlp::V2::Value]
|
@@ -1371,16 +1436,19 @@ module Google
|
|
1371
1436
|
class Bucket; end
|
1372
1437
|
end
|
1373
1438
|
|
1374
|
-
# Replaces an identifier with a surrogate using
|
1375
|
-
# mode of operation; however when used in the
|
1376
|
-
# it serves the opposite function by reversing
|
1377
|
-
# the original identifier.
|
1378
|
-
#
|
1379
|
-
#
|
1380
|
-
#
|
1381
|
-
#
|
1382
|
-
#
|
1383
|
-
#
|
1439
|
+
# Replaces an identifier with a surrogate using Format Preserving Encryption
|
1440
|
+
# (FPE) with the FFX mode of operation; however when used in the
|
1441
|
+
# `ReidentifyContent` API method, it serves the opposite function by reversing
|
1442
|
+
# the surrogate back into the original identifier. The identifier must be
|
1443
|
+
# encoded as ASCII. For a given crypto key and context, the same identifier
|
1444
|
+
# will be replaced with the same surrogate. Identifiers must be at least two
|
1445
|
+
# characters long. In the case that the identifier is the empty string, it will
|
1446
|
+
# be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
|
1447
|
+
# more.
|
1448
|
+
#
|
1449
|
+
# Note: We recommend using CryptoDeterministicConfig for all use cases which
|
1450
|
+
# do not require preserving the input alphabet space and size, plus warrant
|
1451
|
+
# referential integrity.
|
1384
1452
|
# @!attribute [rw] crypto_key
|
1385
1453
|
# @return [Google::Privacy::Dlp::V2::CryptoKey]
|
1386
1454
|
# The key used by the encryption algorithm. [required]
|
@@ -1497,10 +1565,11 @@ module Google
|
|
1497
1565
|
# leaking the key. Choose another type of key if possible.
|
1498
1566
|
# @!attribute [rw] key
|
1499
1567
|
# @return [String]
|
1500
|
-
#
|
1568
|
+
# A 128/192/256 bit key. [required]
|
1501
1569
|
class UnwrappedCryptoKey; end
|
1502
1570
|
|
1503
1571
|
# Include to use an existing data crypto key wrapped by KMS.
|
1572
|
+
# The wrapped key must be a 128/192/256 bit key.
|
1504
1573
|
# Authorization requires the following IAM permissions when sending a request
|
1505
1574
|
# to perform a crypto transformation using a kms-wrapped crypto key:
|
1506
1575
|
# dlp.kms.encrypt
|
@@ -1611,7 +1680,8 @@ module Google
|
|
1611
1680
|
class RecordCondition
|
1612
1681
|
# The field type of `value` and `field` do not need to match to be
|
1613
1682
|
# considered equal, but not all comparisons are possible.
|
1614
|
-
#
|
1683
|
+
# EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
|
1684
|
+
# but all other comparisons are invalid with incompatible types.
|
1615
1685
|
# A `value` of type:
|
1616
1686
|
#
|
1617
1687
|
# * `string` can be compared against all other types
|
@@ -1668,12 +1738,12 @@ module Google
|
|
1668
1738
|
# Transformations applied to the dataset.
|
1669
1739
|
class TransformationOverview; end
|
1670
1740
|
|
1671
|
-
# Summary of a single
|
1741
|
+
# Summary of a single transformation.
|
1672
1742
|
# Only one of 'transformation', 'field_transformation', or 'record_suppress'
|
1673
1743
|
# will be set.
|
1674
1744
|
# @!attribute [rw] info_type
|
1675
1745
|
# @return [Google::Privacy::Dlp::V2::InfoType]
|
1676
|
-
# Set if the transformation was limited to a specific
|
1746
|
+
# Set if the transformation was limited to a specific InfoType.
|
1677
1747
|
# @!attribute [rw] field
|
1678
1748
|
# @return [Google::Privacy::Dlp::V2::FieldId]
|
1679
1749
|
# Set if the transformation was limited to a specific FieldId.
|
@@ -1867,6 +1937,10 @@ module Google
|
|
1867
1937
|
# @!attribute [rw] publish_summary_to_cscc
|
1868
1938
|
# @return [Google::Privacy::Dlp::V2::Action::PublishSummaryToCscc]
|
1869
1939
|
# Publish summary to Cloud Security Command Center (Alpha).
|
1940
|
+
# @!attribute [rw] job_notification_emails
|
1941
|
+
# @return [Google::Privacy::Dlp::V2::Action::JobNotificationEmails]
|
1942
|
+
# Enable email notification to project owners and editors on job's
|
1943
|
+
# completion/failure.
|
1870
1944
|
class Action
|
1871
1945
|
# If set, the detailed findings will be persisted to the specified
|
1872
1946
|
# OutputStorageConfig. Only a single instance of this action can be
|
@@ -1897,6 +1971,10 @@ module Google
|
|
1897
1971
|
# Only a single instance of this action can be specified.
|
1898
1972
|
# Compatible with: Inspect
|
1899
1973
|
class PublishSummaryToCscc; end
|
1974
|
+
|
1975
|
+
# Enable email notification to project owners and editors on jobs's
|
1976
|
+
# completion/failure.
|
1977
|
+
class JobNotificationEmails; end
|
1900
1978
|
end
|
1901
1979
|
|
1902
1980
|
# Request message for CreateInspectTemplate.
|
@@ -1911,7 +1989,7 @@ module Google
|
|
1911
1989
|
# @return [String]
|
1912
1990
|
# The template id can contain uppercase and lowercase letters,
|
1913
1991
|
# numbers, and hyphens; that is, it must match the regular
|
1914
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
1992
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
1915
1993
|
# characters. Can be empty to allow the system to generate one.
|
1916
1994
|
class CreateInspectTemplateRequest; end
|
1917
1995
|
|
@@ -1996,10 +2074,17 @@ module Google
|
|
1996
2074
|
# @return [String]
|
1997
2075
|
# The trigger id can contain uppercase and lowercase letters,
|
1998
2076
|
# numbers, and hyphens; that is, it must match the regular
|
1999
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
2077
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2000
2078
|
# characters. Can be empty to allow the system to generate one.
|
2001
2079
|
class CreateJobTriggerRequest; end
|
2002
2080
|
|
2081
|
+
# Request message for ActivateJobTrigger.
|
2082
|
+
# @!attribute [rw] name
|
2083
|
+
# @return [String]
|
2084
|
+
# Resource name of the trigger to activate, for example
|
2085
|
+
# `projects/dlp-test-project/jobTriggers/53234423`.
|
2086
|
+
class ActivateJobTriggerRequest; end
|
2087
|
+
|
2003
2088
|
# Request message for UpdateJobTrigger.
|
2004
2089
|
# @!attribute [rw] name
|
2005
2090
|
# @return [String]
|
@@ -2034,7 +2119,7 @@ module Google
|
|
2034
2119
|
# @return [String]
|
2035
2120
|
# The job id can contain uppercase and lowercase letters,
|
2036
2121
|
# numbers, and hyphens; that is, it must match the regular
|
2037
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
2122
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2038
2123
|
# characters. Can be empty to allow the system to generate one.
|
2039
2124
|
class CreateDlpJobRequest; end
|
2040
2125
|
|
@@ -2063,9 +2148,36 @@ module Google
|
|
2063
2148
|
#
|
2064
2149
|
# * `create_time`: corresponds to time the JobTrigger was created.
|
2065
2150
|
# * `update_time`: corresponds to time the JobTrigger was last updated.
|
2151
|
+
# * `last_run_time`: corresponds to the last time the JobTrigger ran.
|
2066
2152
|
# * `name`: corresponds to JobTrigger's name.
|
2067
2153
|
# * `display_name`: corresponds to JobTrigger's display name.
|
2068
2154
|
# * `status`: corresponds to JobTrigger's status.
|
2155
|
+
# @!attribute [rw] filter
|
2156
|
+
# @return [String]
|
2157
|
+
# Optional. Allows filtering.
|
2158
|
+
#
|
2159
|
+
# Supported syntax:
|
2160
|
+
#
|
2161
|
+
# * Filter expressions are made up of one or more restrictions.
|
2162
|
+
# * Restrictions can be combined by `AND` or `OR` logical operators. A
|
2163
|
+
# sequence of restrictions implicitly uses `AND`.
|
2164
|
+
# * A restriction has the form of `<field> <operator> <value>`.
|
2165
|
+
# * Supported fields/values for inspect jobs:
|
2166
|
+
# * `status` - HEALTHY|PAUSED|CANCELLED
|
2167
|
+
# * `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
|
2168
|
+
# * 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
|
2169
|
+
# quotation marks. Nanoseconds are ignored.
|
2170
|
+
# * 'error_count' - Number of errors that have occurred while running.
|
2171
|
+
# * The operator must be `=` or `!=` for status and inspected_storage.
|
2172
|
+
#
|
2173
|
+
# Examples:
|
2174
|
+
#
|
2175
|
+
# * inspected_storage = cloud_storage AND status = HEALTHY
|
2176
|
+
# * inspected_storage = cloud_storage OR inspected_storage = bigquery
|
2177
|
+
# * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
|
2178
|
+
# * last_run_time > \"2017-12-12T00:00:00+00:00\"
|
2179
|
+
#
|
2180
|
+
# The length of this field should be no more than 500 characters.
|
2069
2181
|
class ListJobTriggersRequest; end
|
2070
2182
|
|
2071
2183
|
# Response message for ListJobTriggers.
|
@@ -2249,7 +2361,7 @@ module Google
|
|
2249
2361
|
# @return [String]
|
2250
2362
|
# The template id can contain uppercase and lowercase letters,
|
2251
2363
|
# numbers, and hyphens; that is, it must match the regular
|
2252
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
2364
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2253
2365
|
# characters. Can be empty to allow the system to generate one.
|
2254
2366
|
class CreateDeidentifyTemplateRequest; end
|
2255
2367
|
|
@@ -2410,7 +2522,7 @@ module Google
|
|
2410
2522
|
# @return [String]
|
2411
2523
|
# The storedInfoType ID can contain uppercase and lowercase letters,
|
2412
2524
|
# numbers, and hyphens; that is, it must match the regular
|
2413
|
-
# expression: `[a-zA-Z\\d-]+`. The maximum length is 100
|
2525
|
+
# expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
|
2414
2526
|
# characters. Can be empty to allow the system to generate one.
|
2415
2527
|
class CreateStoredInfoTypeRequest; end
|
2416
2528
|
|
@@ -2499,6 +2611,28 @@ module Google
|
|
2499
2611
|
CONTENT_IMAGE = 2
|
2500
2612
|
end
|
2501
2613
|
|
2614
|
+
# An enum to represent the various type of DLP jobs.
|
2615
|
+
module DlpJobType
|
2616
|
+
DLP_JOB_TYPE_UNSPECIFIED = 0
|
2617
|
+
|
2618
|
+
# The job inspected Google Cloud for sensitive data.
|
2619
|
+
INSPECT_JOB = 1
|
2620
|
+
|
2621
|
+
# The job executed a Risk Analysis computation.
|
2622
|
+
RISK_ANALYSIS_JOB = 2
|
2623
|
+
end
|
2624
|
+
|
2625
|
+
# Parts of the APIs which use certain infoTypes.
|
2626
|
+
module InfoTypeSupportedBy
|
2627
|
+
ENUM_TYPE_UNSPECIFIED = 0
|
2628
|
+
|
2629
|
+
# Supported by the inspect operations.
|
2630
|
+
INSPECT = 1
|
2631
|
+
|
2632
|
+
# Supported by the risk analysis operations.
|
2633
|
+
RISK_ANALYSIS = 2
|
2634
|
+
end
|
2635
|
+
|
2502
2636
|
# Type of the match which can be applied to different ways of matching, like
|
2503
2637
|
# Dictionary, regular expression and intersecting with findings of another
|
2504
2638
|
# info type.
|
@@ -2528,25 +2662,14 @@ module Google
|
|
2528
2662
|
MATCHING_TYPE_INVERSE_MATCH = 3
|
2529
2663
|
end
|
2530
2664
|
|
2531
|
-
# Parts of the APIs which use certain infoTypes.
|
2532
|
-
module InfoTypeSupportedBy
|
2533
|
-
ENUM_TYPE_UNSPECIFIED = 0
|
2534
|
-
|
2535
|
-
# Supported by the inspect operations.
|
2536
|
-
INSPECT = 1
|
2537
|
-
|
2538
|
-
# Supported by the risk analysis operations.
|
2539
|
-
RISK_ANALYSIS = 2
|
2540
|
-
end
|
2541
|
-
|
2542
2665
|
# Operators available for comparing the value of fields.
|
2543
2666
|
module RelationalOperator
|
2544
2667
|
RELATIONAL_OPERATOR_UNSPECIFIED = 0
|
2545
2668
|
|
2546
|
-
# Equal.
|
2669
|
+
# Equal. Attempts to match even with incompatible types.
|
2547
2670
|
EQUAL_TO = 1
|
2548
2671
|
|
2549
|
-
# Not equal to.
|
2672
|
+
# Not equal to. Attempts to match even with incompatible types.
|
2550
2673
|
NOT_EQUAL_TO = 2
|
2551
2674
|
|
2552
2675
|
# Greater than.
|
@@ -2565,17 +2688,6 @@ module Google
|
|
2565
2688
|
EXISTS = 7
|
2566
2689
|
end
|
2567
2690
|
|
2568
|
-
# An enum to represent the various type of DLP jobs.
|
2569
|
-
module DlpJobType
|
2570
|
-
DLP_JOB_TYPE_UNSPECIFIED = 0
|
2571
|
-
|
2572
|
-
# The job inspected Google Cloud for sensitive data.
|
2573
|
-
INSPECT_JOB = 1
|
2574
|
-
|
2575
|
-
# The job executed a Risk Analysis computation.
|
2576
|
-
RISK_ANALYSIS_JOB = 2
|
2577
|
-
end
|
2578
|
-
|
2579
2691
|
# State of a StoredInfoType version.
|
2580
2692
|
module StoredInfoTypeState
|
2581
2693
|
STORED_INFO_TYPE_STATE_UNSPECIFIED = 0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -124,6 +124,10 @@ module Google
|
|
124
124
|
# Pattern defining the regular expression. Its syntax
|
125
125
|
# (https://github.com/google/re2/wiki/Syntax) can be found under the
|
126
126
|
# google/re2 repository on GitHub.
|
127
|
+
# @!attribute [rw] group_indexes
|
128
|
+
# @return [Array<Integer>]
|
129
|
+
# The index of the submatch to extract as findings. When not
|
130
|
+
# specified, the entire match is returned. No more than 3 may be included.
|
127
131
|
class Regex; end
|
128
132
|
|
129
133
|
# Message for detecting output from deidentification transformations
|
@@ -328,8 +332,15 @@ module Google
|
|
328
332
|
# @!attribute [rw] url
|
329
333
|
# @return [String]
|
330
334
|
# The Cloud Storage url of the file(s) to scan, in the format
|
331
|
-
# `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
|
332
|
-
#
|
335
|
+
# `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
|
336
|
+
#
|
337
|
+
# If the url ends in a trailing slash, the bucket or directory represented
|
338
|
+
# by the url will be scanned non-recursively (content in sub-directories
|
339
|
+
# will not be scanned). This means that `gs://mybucket/` is equivalent to
|
340
|
+
# `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
|
341
|
+
# `gs://mybucket/directory/*`.
|
342
|
+
#
|
343
|
+
# Exactly one of `url` or `regex_file_set` must be set.
|
333
344
|
# @!attribute [rw] regex_file_set
|
334
345
|
# @return [Google::Privacy::Dlp::V2::CloudStorageRegexFileSet]
|
335
346
|
# The regex-filtered set of files to scan. Exactly one of `url` or
|
@@ -394,8 +405,8 @@ module Google
|
|
394
405
|
# inspection of entire columns which you know have no findings.
|
395
406
|
class BigQueryOptions
|
396
407
|
# How to sample rows if not all rows are scanned. Meaningful only when used
|
397
|
-
# in conjunction with rows_limit. If not
|
398
|
-
# from the top.
|
408
|
+
# in conjunction with either rows_limit or rows_limit_percent. If not
|
409
|
+
# specified, scanning would start from the top.
|
399
410
|
module SampleMethod
|
400
411
|
SAMPLE_METHOD_UNSPECIFIED = 0
|
401
412
|
|
@@ -515,6 +526,10 @@ module Google
|
|
515
526
|
# @return [Google::Privacy::Dlp::V2::DatastoreKey]
|
516
527
|
# @!attribute [rw] big_query_key
|
517
528
|
# @return [Google::Privacy::Dlp::V2::BigQueryKey]
|
529
|
+
# @!attribute [rw] id_values
|
530
|
+
# @return [Array<String>]
|
531
|
+
# Values of identifying columns in the given row. Order of values matches
|
532
|
+
# the order of field identifiers specified in the scanning request.
|
518
533
|
class RecordKey; end
|
519
534
|
|
520
535
|
# Message defining the location of a BigQuery table. A table is uniquely
|
@@ -553,6 +568,28 @@ module Google
|
|
553
568
|
# Composite key indicating which field contains the entity identifier.
|
554
569
|
class EntityId; end
|
555
570
|
|
571
|
+
# Definitions of file type groups to scan.
|
572
|
+
module FileType
|
573
|
+
# Includes all files.
|
574
|
+
FILE_TYPE_UNSPECIFIED = 0
|
575
|
+
|
576
|
+
# Includes all file extensions not covered by text file types.
|
577
|
+
BINARY_FILE = 1
|
578
|
+
|
579
|
+
# Included file extensions:
|
580
|
+
# asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp,
|
581
|
+
# hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json,
|
582
|
+
# ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw,
|
583
|
+
# rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml,
|
584
|
+
# xml, xsl, xsd, yml, yaml.
|
585
|
+
TEXT_FILE = 2
|
586
|
+
|
587
|
+
# Included file extensions:
|
588
|
+
# bmp, gif, jpg, jpeg, jpe, png.
|
589
|
+
# bytes_limit_per_file has no effect on image files.
|
590
|
+
IMAGE = 3
|
591
|
+
end
|
592
|
+
|
556
593
|
# Categorization of results based on how likely they are to represent a match,
|
557
594
|
# based on the number of elements they contain which imply a match.
|
558
595
|
module Likelihood
|
@@ -572,23 +609,6 @@ module Google
|
|
572
609
|
# Many matching elements.
|
573
610
|
VERY_LIKELY = 5
|
574
611
|
end
|
575
|
-
|
576
|
-
# Definitions of file type groups to scan.
|
577
|
-
module FileType
|
578
|
-
# Includes all files.
|
579
|
-
FILE_TYPE_UNSPECIFIED = 0
|
580
|
-
|
581
|
-
# Includes all file extensions not covered by text file types.
|
582
|
-
BINARY_FILE = 1
|
583
|
-
|
584
|
-
# Included file extensions:
|
585
|
-
# asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, hpp,
|
586
|
-
# hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, json,
|
587
|
-
# ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw,
|
588
|
-
# rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml,
|
589
|
-
# xml, xsl, xsd, yml, yaml.
|
590
|
-
TEXT_FILE = 2
|
591
|
-
end
|
592
612
|
end
|
593
613
|
end
|
594
614
|
end
|