google-cloud-dlp-v2 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/README.md +2 -6
- data/lib/google/cloud/dlp/v2/dlp_service/client.rb +546 -52
- data/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +1 -1
- data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +20 -1
- data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +511 -52
- data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +308 -1
- data/lib/google/cloud/dlp/v2/dlp_service/rest.rb +2 -2
- data/lib/google/cloud/dlp/v2/dlp_service.rb +2 -2
- data/lib/google/cloud/dlp/v2/rest.rb +1 -1
- data/lib/google/cloud/dlp/v2/version.rb +1 -1
- data/lib/google/cloud/dlp/v2.rb +1 -1
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +20 -1
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +48 -38
- data/lib/google/privacy/dlp/v2/storage_pb.rb +5 -1
- data/lib/google-cloud-dlp-v2.rb +1 -1
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/privacy/dlp/v2/dlp.rb +453 -141
- data/proto_docs/google/privacy/dlp/v2/storage.rb +76 -20
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/date.rb +1 -1
- data/proto_docs/google/type/dayofweek.rb +1 -1
- data/proto_docs/google/type/timeofday.rb +1 -1
- metadata +6 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -34,7 +34,7 @@ module Google
|
|
|
34
34
|
# inspection, classification, and de-identification platform that works
|
|
35
35
|
# on text, images, and Google Cloud storage repositories.
|
|
36
36
|
# To learn more about concepts and find how-to guides see
|
|
37
|
-
# https://cloud.google.com/sensitive-data-protection/docs/.
|
|
37
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/.
|
|
38
38
|
#
|
|
39
39
|
class Client
|
|
40
40
|
# @private
|
|
@@ -397,9 +397,9 @@ module Google
|
|
|
397
397
|
# be all types, but may change over time as detectors are updated.
|
|
398
398
|
#
|
|
399
399
|
# For how to guides, see
|
|
400
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-images
|
|
400
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-images
|
|
401
401
|
# and
|
|
402
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
|
|
402
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-text,
|
|
403
403
|
#
|
|
404
404
|
# @overload inspect_content(request, options = nil)
|
|
405
405
|
# Pass arguments to `inspect_content` via a request object, either of type
|
|
@@ -421,7 +421,7 @@ module Google
|
|
|
421
421
|
#
|
|
422
422
|
# The format of this value varies depending on whether you have [specified a
|
|
423
423
|
# processing
|
|
424
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
424
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
425
425
|
#
|
|
426
426
|
# + Projects scope, location specified:
|
|
427
427
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -508,7 +508,7 @@ module Google
|
|
|
508
508
|
# Redacts potentially sensitive info from an image.
|
|
509
509
|
# This method has limits on input size, processing time, and output size.
|
|
510
510
|
# See
|
|
511
|
-
# https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images
|
|
511
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images
|
|
512
512
|
# to learn more.
|
|
513
513
|
#
|
|
514
514
|
# When no InfoTypes or CustomInfoTypes are specified in this request, the
|
|
@@ -538,7 +538,7 @@ module Google
|
|
|
538
538
|
#
|
|
539
539
|
# The format of this value varies depending on whether you have [specified a
|
|
540
540
|
# processing
|
|
541
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
541
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
542
542
|
#
|
|
543
543
|
# + Projects scope, location specified:
|
|
544
544
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -640,7 +640,7 @@ module Google
|
|
|
640
640
|
# De-identifies potentially sensitive info from a ContentItem.
|
|
641
641
|
# This method has limits on input size and output size.
|
|
642
642
|
# See
|
|
643
|
-
# https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data
|
|
643
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data
|
|
644
644
|
# to learn more.
|
|
645
645
|
#
|
|
646
646
|
# When no InfoTypes or CustomInfoTypes are specified in this request, the
|
|
@@ -667,7 +667,7 @@ module Google
|
|
|
667
667
|
#
|
|
668
668
|
# The format of this value varies depending on whether you have [specified a
|
|
669
669
|
# processing
|
|
670
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
670
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
671
671
|
#
|
|
672
672
|
# + Projects scope, location specified:
|
|
673
673
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -771,7 +771,7 @@ module Google
|
|
|
771
771
|
##
|
|
772
772
|
# Re-identifies content that has been de-identified.
|
|
773
773
|
# See
|
|
774
|
-
# https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example
|
|
774
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example
|
|
775
775
|
# to learn more.
|
|
776
776
|
#
|
|
777
777
|
# @overload reidentify_content(request, options = nil)
|
|
@@ -794,7 +794,7 @@ module Google
|
|
|
794
794
|
#
|
|
795
795
|
# The format of this value varies depending on whether you have [specified a
|
|
796
796
|
# processing
|
|
797
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
797
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
798
798
|
#
|
|
799
799
|
# + Projects scope, location specified:
|
|
800
800
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -898,7 +898,7 @@ module Google
|
|
|
898
898
|
##
|
|
899
899
|
# Returns a list of the sensitive information types that the DLP API
|
|
900
900
|
# supports. See
|
|
901
|
-
# https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference
|
|
901
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/infotypes-reference
|
|
902
902
|
# to learn more.
|
|
903
903
|
#
|
|
904
904
|
# @overload list_info_types(request, options = nil)
|
|
@@ -993,7 +993,7 @@ module Google
|
|
|
993
993
|
# Creates an InspectTemplate for reusing frequently used configuration
|
|
994
994
|
# for inspecting content, images, and storage.
|
|
995
995
|
# See
|
|
996
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
996
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
997
997
|
# to learn more.
|
|
998
998
|
#
|
|
999
999
|
# @overload create_inspect_template(request, options = nil)
|
|
@@ -1016,7 +1016,7 @@ module Google
|
|
|
1016
1016
|
#
|
|
1017
1017
|
# The format of this value varies depending on the scope of the request
|
|
1018
1018
|
# (project or organization) and whether you have [specified a processing
|
|
1019
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1019
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1020
1020
|
#
|
|
1021
1021
|
# + Projects scope, location specified:
|
|
1022
1022
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -1102,7 +1102,7 @@ module Google
|
|
|
1102
1102
|
##
|
|
1103
1103
|
# Updates the InspectTemplate.
|
|
1104
1104
|
# See
|
|
1105
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1105
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1106
1106
|
# to learn more.
|
|
1107
1107
|
#
|
|
1108
1108
|
# @overload update_inspect_template(request, options = nil)
|
|
@@ -1189,7 +1189,7 @@ module Google
|
|
|
1189
1189
|
##
|
|
1190
1190
|
# Gets an InspectTemplate.
|
|
1191
1191
|
# See
|
|
1192
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1192
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1193
1193
|
# to learn more.
|
|
1194
1194
|
#
|
|
1195
1195
|
# @overload get_inspect_template(request, options = nil)
|
|
@@ -1272,7 +1272,7 @@ module Google
|
|
|
1272
1272
|
##
|
|
1273
1273
|
# Lists InspectTemplates.
|
|
1274
1274
|
# See
|
|
1275
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1275
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1276
1276
|
# to learn more.
|
|
1277
1277
|
#
|
|
1278
1278
|
# @overload list_inspect_templates(request, options = nil)
|
|
@@ -1295,7 +1295,7 @@ module Google
|
|
|
1295
1295
|
#
|
|
1296
1296
|
# The format of this value varies depending on the scope of the request
|
|
1297
1297
|
# (project or organization) and whether you have [specified a processing
|
|
1298
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1298
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1299
1299
|
#
|
|
1300
1300
|
# + Projects scope, location specified:
|
|
1301
1301
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -1400,7 +1400,7 @@ module Google
|
|
|
1400
1400
|
##
|
|
1401
1401
|
# Deletes an InspectTemplate.
|
|
1402
1402
|
# See
|
|
1403
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1403
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
|
|
1404
1404
|
# to learn more.
|
|
1405
1405
|
#
|
|
1406
1406
|
# @overload delete_inspect_template(request, options = nil)
|
|
@@ -1484,7 +1484,7 @@ module Google
|
|
|
1484
1484
|
# Creates a DeidentifyTemplate for reusing frequently used configuration
|
|
1485
1485
|
# for de-identifying content, images, and storage.
|
|
1486
1486
|
# See
|
|
1487
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1487
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1488
1488
|
# to learn more.
|
|
1489
1489
|
#
|
|
1490
1490
|
# @overload create_deidentify_template(request, options = nil)
|
|
@@ -1507,7 +1507,7 @@ module Google
|
|
|
1507
1507
|
#
|
|
1508
1508
|
# The format of this value varies depending on the scope of the request
|
|
1509
1509
|
# (project or organization) and whether you have [specified a processing
|
|
1510
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1510
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1511
1511
|
#
|
|
1512
1512
|
# + Projects scope, location specified:
|
|
1513
1513
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -1593,7 +1593,7 @@ module Google
|
|
|
1593
1593
|
##
|
|
1594
1594
|
# Updates the DeidentifyTemplate.
|
|
1595
1595
|
# See
|
|
1596
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1596
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1597
1597
|
# to learn more.
|
|
1598
1598
|
#
|
|
1599
1599
|
# @overload update_deidentify_template(request, options = nil)
|
|
@@ -1681,7 +1681,7 @@ module Google
|
|
|
1681
1681
|
##
|
|
1682
1682
|
# Gets a DeidentifyTemplate.
|
|
1683
1683
|
# See
|
|
1684
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1684
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1685
1685
|
# to learn more.
|
|
1686
1686
|
#
|
|
1687
1687
|
# @overload get_deidentify_template(request, options = nil)
|
|
@@ -1764,7 +1764,7 @@ module Google
|
|
|
1764
1764
|
##
|
|
1765
1765
|
# Lists DeidentifyTemplates.
|
|
1766
1766
|
# See
|
|
1767
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1767
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1768
1768
|
# to learn more.
|
|
1769
1769
|
#
|
|
1770
1770
|
# @overload list_deidentify_templates(request, options = nil)
|
|
@@ -1787,7 +1787,7 @@ module Google
|
|
|
1787
1787
|
#
|
|
1788
1788
|
# The format of this value varies depending on the scope of the request
|
|
1789
1789
|
# (project or organization) and whether you have [specified a processing
|
|
1790
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1790
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
1791
1791
|
#
|
|
1792
1792
|
# + Projects scope, location specified:
|
|
1793
1793
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -1892,7 +1892,7 @@ module Google
|
|
|
1892
1892
|
##
|
|
1893
1893
|
# Deletes a DeidentifyTemplate.
|
|
1894
1894
|
# See
|
|
1895
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1895
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
|
|
1896
1896
|
# to learn more.
|
|
1897
1897
|
#
|
|
1898
1898
|
# @overload delete_deidentify_template(request, options = nil)
|
|
@@ -1977,7 +1977,7 @@ module Google
|
|
|
1977
1977
|
# Creates a job trigger to run DLP actions such as scanning storage for
|
|
1978
1978
|
# sensitive information on a set schedule.
|
|
1979
1979
|
# See
|
|
1980
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
1980
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
1981
1981
|
# to learn more.
|
|
1982
1982
|
#
|
|
1983
1983
|
# @overload create_job_trigger(request, options = nil)
|
|
@@ -2000,7 +2000,7 @@ module Google
|
|
|
2000
2000
|
#
|
|
2001
2001
|
# The format of this value varies depending on whether you have [specified a
|
|
2002
2002
|
# processing
|
|
2003
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
2003
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
2004
2004
|
#
|
|
2005
2005
|
# + Projects scope, location specified:
|
|
2006
2006
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -2082,7 +2082,7 @@ module Google
|
|
|
2082
2082
|
##
|
|
2083
2083
|
# Updates a job trigger.
|
|
2084
2084
|
# See
|
|
2085
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2085
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2086
2086
|
# to learn more.
|
|
2087
2087
|
#
|
|
2088
2088
|
# @overload update_job_trigger(request, options = nil)
|
|
@@ -2251,7 +2251,7 @@ module Google
|
|
|
2251
2251
|
##
|
|
2252
2252
|
# Gets a job trigger.
|
|
2253
2253
|
# See
|
|
2254
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2254
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2255
2255
|
# to learn more.
|
|
2256
2256
|
#
|
|
2257
2257
|
# @overload get_job_trigger(request, options = nil)
|
|
@@ -2333,7 +2333,7 @@ module Google
|
|
|
2333
2333
|
##
|
|
2334
2334
|
# Lists job triggers.
|
|
2335
2335
|
# See
|
|
2336
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2336
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2337
2337
|
# to learn more.
|
|
2338
2338
|
#
|
|
2339
2339
|
# @overload list_job_triggers(request, options = nil)
|
|
@@ -2356,7 +2356,7 @@ module Google
|
|
|
2356
2356
|
#
|
|
2357
2357
|
# The format of this value varies depending on whether you have [specified a
|
|
2358
2358
|
# processing
|
|
2359
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
2359
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
2360
2360
|
#
|
|
2361
2361
|
# + Projects scope, location specified:
|
|
2362
2362
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -2488,7 +2488,7 @@ module Google
|
|
|
2488
2488
|
##
|
|
2489
2489
|
# Deletes a job trigger.
|
|
2490
2490
|
# See
|
|
2491
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2491
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
|
|
2492
2492
|
# to learn more.
|
|
2493
2493
|
#
|
|
2494
2494
|
# @overload delete_job_trigger(request, options = nil)
|
|
@@ -3102,9 +3102,9 @@ module Google
|
|
|
3102
3102
|
##
|
|
3103
3103
|
# Creates a new job to inspect storage or calculate risk metrics.
|
|
3104
3104
|
# See
|
|
3105
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3105
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3106
3106
|
# and
|
|
3107
|
-
# https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3107
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3108
3108
|
# to learn more.
|
|
3109
3109
|
#
|
|
3110
3110
|
# When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
|
|
@@ -3131,7 +3131,7 @@ module Google
|
|
|
3131
3131
|
#
|
|
3132
3132
|
# The format of this value varies depending on whether you have [specified a
|
|
3133
3133
|
# processing
|
|
3134
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3134
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3135
3135
|
#
|
|
3136
3136
|
# + Projects scope, location specified:
|
|
3137
3137
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -3220,9 +3220,9 @@ module Google
|
|
|
3220
3220
|
##
|
|
3221
3221
|
# Lists DlpJobs that match the specified filter in the request.
|
|
3222
3222
|
# See
|
|
3223
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3223
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3224
3224
|
# and
|
|
3225
|
-
# https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3225
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3226
3226
|
# to learn more.
|
|
3227
3227
|
#
|
|
3228
3228
|
# @overload list_dlp_jobs(request, options = nil)
|
|
@@ -3245,7 +3245,7 @@ module Google
|
|
|
3245
3245
|
#
|
|
3246
3246
|
# The format of this value varies depending on whether you have [specified a
|
|
3247
3247
|
# processing
|
|
3248
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3248
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3249
3249
|
#
|
|
3250
3250
|
# + Projects scope, location specified:
|
|
3251
3251
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -3377,9 +3377,9 @@ module Google
|
|
|
3377
3377
|
##
|
|
3378
3378
|
# Gets the latest state of a long-running DlpJob.
|
|
3379
3379
|
# See
|
|
3380
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3380
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3381
3381
|
# and
|
|
3382
|
-
# https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3382
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3383
3383
|
# to learn more.
|
|
3384
3384
|
#
|
|
3385
3385
|
# @overload get_dlp_job(request, options = nil)
|
|
@@ -3462,9 +3462,9 @@ module Google
|
|
|
3462
3462
|
# no longer interested in the DlpJob result. The job will be canceled if
|
|
3463
3463
|
# possible.
|
|
3464
3464
|
# See
|
|
3465
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3465
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3466
3466
|
# and
|
|
3467
|
-
# https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3467
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3468
3468
|
# to learn more.
|
|
3469
3469
|
#
|
|
3470
3470
|
# @overload delete_dlp_job(request, options = nil)
|
|
@@ -3547,9 +3547,9 @@ module Google
|
|
|
3547
3547
|
# makes a best effort to cancel the DlpJob, but success is not
|
|
3548
3548
|
# guaranteed.
|
|
3549
3549
|
# See
|
|
3550
|
-
# https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3550
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
|
|
3551
3551
|
# and
|
|
3552
|
-
# https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3552
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
|
|
3553
3553
|
# to learn more.
|
|
3554
3554
|
#
|
|
3555
3555
|
# @overload cancel_dlp_job(request, options = nil)
|
|
@@ -3630,7 +3630,7 @@ module Google
|
|
|
3630
3630
|
##
|
|
3631
3631
|
# Creates a pre-built stored infoType to be used for inspection.
|
|
3632
3632
|
# See
|
|
3633
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3633
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3634
3634
|
# to learn more.
|
|
3635
3635
|
#
|
|
3636
3636
|
# @overload create_stored_info_type(request, options = nil)
|
|
@@ -3653,7 +3653,7 @@ module Google
|
|
|
3653
3653
|
#
|
|
3654
3654
|
# The format of this value varies depending on the scope of the request
|
|
3655
3655
|
# (project or organization) and whether you have [specified a processing
|
|
3656
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3656
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3657
3657
|
#
|
|
3658
3658
|
# + Projects scope, location specified:
|
|
3659
3659
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -3740,7 +3740,7 @@ module Google
|
|
|
3740
3740
|
# Updates the stored infoType by creating a new version. The existing version
|
|
3741
3741
|
# will continue to be used until the new version is ready.
|
|
3742
3742
|
# See
|
|
3743
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3743
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3744
3744
|
# to learn more.
|
|
3745
3745
|
#
|
|
3746
3746
|
# @overload update_stored_info_type(request, options = nil)
|
|
@@ -3829,7 +3829,7 @@ module Google
|
|
|
3829
3829
|
##
|
|
3830
3830
|
# Gets a stored infoType.
|
|
3831
3831
|
# See
|
|
3832
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3832
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3833
3833
|
# to learn more.
|
|
3834
3834
|
#
|
|
3835
3835
|
# @overload get_stored_info_type(request, options = nil)
|
|
@@ -3912,7 +3912,7 @@ module Google
|
|
|
3912
3912
|
##
|
|
3913
3913
|
# Lists stored infoTypes.
|
|
3914
3914
|
# See
|
|
3915
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3915
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
3916
3916
|
# to learn more.
|
|
3917
3917
|
#
|
|
3918
3918
|
# @overload list_stored_info_types(request, options = nil)
|
|
@@ -3935,7 +3935,7 @@ module Google
|
|
|
3935
3935
|
#
|
|
3936
3936
|
# The format of this value varies depending on the scope of the request
|
|
3937
3937
|
# (project or organization) and whether you have [specified a processing
|
|
3938
|
-
# location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3938
|
+
# location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
|
|
3939
3939
|
#
|
|
3940
3940
|
# + Projects scope, location specified:
|
|
3941
3941
|
# `projects/{project_id}/locations/{location_id}`
|
|
@@ -4037,7 +4037,7 @@ module Google
|
|
|
4037
4037
|
##
|
|
4038
4038
|
# Deletes a stored infoType.
|
|
4039
4039
|
# See
|
|
4040
|
-
# https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
4040
|
+
# https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
|
|
4041
4041
|
# to learn more.
|
|
4042
4042
|
#
|
|
4043
4043
|
# @overload delete_stored_info_type(request, options = nil)
|
|
@@ -5858,6 +5858,430 @@ module Google
|
|
|
5858
5858
|
raise ::Google::Cloud::Error.from_error(e)
|
|
5859
5859
|
end
|
|
5860
5860
|
|
|
5861
|
+
##
|
|
5862
|
+
# Create a ContentPolicy.
|
|
5863
|
+
#
|
|
5864
|
+
# @overload create_content_policy(request, options = nil)
|
|
5865
|
+
# Pass arguments to `create_content_policy` via a request object, either of type
|
|
5866
|
+
# {::Google::Cloud::Dlp::V2::CreateContentPolicyRequest} or an equivalent Hash.
|
|
5867
|
+
#
|
|
5868
|
+
# @param request [::Google::Cloud::Dlp::V2::CreateContentPolicyRequest, ::Hash]
|
|
5869
|
+
# A request object representing the call parameters. Required. To specify no
|
|
5870
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
5871
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
5872
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
5873
|
+
#
|
|
5874
|
+
# @overload create_content_policy(parent: nil, content_policy: nil, content_policy_id: nil)
|
|
5875
|
+
# Pass arguments to `create_content_policy` via keyword arguments. Note that at
|
|
5876
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
5877
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
5878
|
+
#
|
|
5879
|
+
# @param parent [::String]
|
|
5880
|
+
# Required. Parent resource name.
|
|
5881
|
+
#
|
|
5882
|
+
# The format of this value varies depending on the scope of the request
|
|
5883
|
+
# (project):
|
|
5884
|
+
#
|
|
5885
|
+
# + Projects scope:
|
|
5886
|
+
# `projects/{project_id}/locations/{location_id}`
|
|
5887
|
+
# @param content_policy [::Google::Cloud::Dlp::V2::ContentPolicy, ::Hash]
|
|
5888
|
+
# Required. The content_policy resource.
|
|
5889
|
+
# @param content_policy_id [::String]
|
|
5890
|
+
# Optional. The content policy ID can contain uppercase and lowercase
|
|
5891
|
+
# letters, numbers, and hyphens; that is, it must match the regular
|
|
5892
|
+
# expression:
|
|
5893
|
+
# `[a-zA-Z\d-_]+`.
|
|
5894
|
+
# The maximum length is 100 characters. If empty, the system will generate
|
|
5895
|
+
# a random id.
|
|
5896
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
5897
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
5898
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
5899
|
+
#
|
|
5900
|
+
# @return [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
5901
|
+
#
|
|
5902
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
5903
|
+
#
|
|
5904
|
+
# @example Basic example
|
|
5905
|
+
# require "google/cloud/dlp/v2"
|
|
5906
|
+
#
|
|
5907
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
5908
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new
|
|
5909
|
+
#
|
|
5910
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
5911
|
+
# request = Google::Cloud::Dlp::V2::CreateContentPolicyRequest.new
|
|
5912
|
+
#
|
|
5913
|
+
# # Call the create_content_policy method.
|
|
5914
|
+
# result = client.create_content_policy request
|
|
5915
|
+
#
|
|
5916
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
|
|
5917
|
+
# p result
|
|
5918
|
+
#
|
|
5919
|
+
def create_content_policy request, options = nil
|
|
5920
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
5921
|
+
|
|
5922
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateContentPolicyRequest
|
|
5923
|
+
|
|
5924
|
+
# Converts hash and nil to an options object
|
|
5925
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
5926
|
+
|
|
5927
|
+
# Customize the options with defaults
|
|
5928
|
+
call_metadata = @config.rpcs.create_content_policy.metadata.to_h
|
|
5929
|
+
|
|
5930
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
5931
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
5932
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
5933
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION,
|
|
5934
|
+
transports_version_send: [:rest]
|
|
5935
|
+
|
|
5936
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
5937
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
5938
|
+
|
|
5939
|
+
options.apply_defaults timeout: @config.rpcs.create_content_policy.timeout,
|
|
5940
|
+
metadata: call_metadata,
|
|
5941
|
+
retry_policy: @config.rpcs.create_content_policy.retry_policy
|
|
5942
|
+
|
|
5943
|
+
options.apply_defaults timeout: @config.timeout,
|
|
5944
|
+
metadata: @config.metadata,
|
|
5945
|
+
retry_policy: @config.retry_policy
|
|
5946
|
+
|
|
5947
|
+
@dlp_service_stub.create_content_policy request, options do |result, operation|
|
|
5948
|
+
yield result, operation if block_given?
|
|
5949
|
+
end
|
|
5950
|
+
rescue ::Gapic::Rest::Error => e
|
|
5951
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
5952
|
+
end
|
|
5953
|
+
|
|
5954
|
+
##
|
|
5955
|
+
# Update a ContentPolicy.
|
|
5956
|
+
#
|
|
5957
|
+
# @overload update_content_policy(request, options = nil)
|
|
5958
|
+
# Pass arguments to `update_content_policy` via a request object, either of type
|
|
5959
|
+
# {::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest} or an equivalent Hash.
|
|
5960
|
+
#
|
|
5961
|
+
# @param request [::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest, ::Hash]
|
|
5962
|
+
# A request object representing the call parameters. Required. To specify no
|
|
5963
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
5964
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
5965
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
5966
|
+
#
|
|
5967
|
+
# @overload update_content_policy(name: nil, content_policy: nil, update_mask: nil)
|
|
5968
|
+
# Pass arguments to `update_content_policy` via keyword arguments. Note that at
|
|
5969
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
5970
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
5971
|
+
#
|
|
5972
|
+
# @param name [::String]
|
|
5973
|
+
# Required. Resource name in the format:
|
|
5974
|
+
# `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
|
|
5975
|
+
# @param content_policy [::Google::Cloud::Dlp::V2::ContentPolicy, ::Hash]
|
|
5976
|
+
# Required. The content_policy with new values for the relevant fields.
|
|
5977
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
5978
|
+
# Optional. Mask to control which fields get updated.
|
|
5979
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
5980
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
5981
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
5982
|
+
#
|
|
5983
|
+
# @return [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
5984
|
+
#
|
|
5985
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
5986
|
+
#
|
|
5987
|
+
# @example Basic example
|
|
5988
|
+
# require "google/cloud/dlp/v2"
|
|
5989
|
+
#
|
|
5990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
5991
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new
|
|
5992
|
+
#
|
|
5993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
5994
|
+
# request = Google::Cloud::Dlp::V2::UpdateContentPolicyRequest.new
|
|
5995
|
+
#
|
|
5996
|
+
# # Call the update_content_policy method.
|
|
5997
|
+
# result = client.update_content_policy request
|
|
5998
|
+
#
|
|
5999
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
|
|
6000
|
+
# p result
|
|
6001
|
+
#
|
|
6002
|
+
def update_content_policy request, options = nil
|
|
6003
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6004
|
+
|
|
6005
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest
|
|
6006
|
+
|
|
6007
|
+
# Converts hash and nil to an options object
|
|
6008
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6009
|
+
|
|
6010
|
+
# Customize the options with defaults
|
|
6011
|
+
call_metadata = @config.rpcs.update_content_policy.metadata.to_h
|
|
6012
|
+
|
|
6013
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6014
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6015
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6016
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION,
|
|
6017
|
+
transports_version_send: [:rest]
|
|
6018
|
+
|
|
6019
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6020
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6021
|
+
|
|
6022
|
+
options.apply_defaults timeout: @config.rpcs.update_content_policy.timeout,
|
|
6023
|
+
metadata: call_metadata,
|
|
6024
|
+
retry_policy: @config.rpcs.update_content_policy.retry_policy
|
|
6025
|
+
|
|
6026
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6027
|
+
metadata: @config.metadata,
|
|
6028
|
+
retry_policy: @config.retry_policy
|
|
6029
|
+
|
|
6030
|
+
@dlp_service_stub.update_content_policy request, options do |result, operation|
|
|
6031
|
+
yield result, operation if block_given?
|
|
6032
|
+
end
|
|
6033
|
+
rescue ::Gapic::Rest::Error => e
|
|
6034
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6035
|
+
end
|
|
6036
|
+
|
|
6037
|
+
##
|
|
6038
|
+
# Get a ContentPolicy.
|
|
6039
|
+
#
|
|
6040
|
+
# @overload get_content_policy(request, options = nil)
|
|
6041
|
+
# Pass arguments to `get_content_policy` via a request object, either of type
|
|
6042
|
+
# {::Google::Cloud::Dlp::V2::GetContentPolicyRequest} or an equivalent Hash.
|
|
6043
|
+
#
|
|
6044
|
+
# @param request [::Google::Cloud::Dlp::V2::GetContentPolicyRequest, ::Hash]
|
|
6045
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6046
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6047
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6048
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6049
|
+
#
|
|
6050
|
+
# @overload get_content_policy(name: nil)
|
|
6051
|
+
# Pass arguments to `get_content_policy` via keyword arguments. Note that at
|
|
6052
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6053
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6054
|
+
#
|
|
6055
|
+
# @param name [::String]
|
|
6056
|
+
# Required. Resource name in the format:
|
|
6057
|
+
# `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
|
|
6058
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6059
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
6060
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6061
|
+
#
|
|
6062
|
+
# @return [::Google::Cloud::Dlp::V2::ContentPolicy]
|
|
6063
|
+
#
|
|
6064
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6065
|
+
#
|
|
6066
|
+
# @example Basic example
|
|
6067
|
+
# require "google/cloud/dlp/v2"
|
|
6068
|
+
#
|
|
6069
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6070
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new
|
|
6071
|
+
#
|
|
6072
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6073
|
+
# request = Google::Cloud::Dlp::V2::GetContentPolicyRequest.new
|
|
6074
|
+
#
|
|
6075
|
+
# # Call the get_content_policy method.
|
|
6076
|
+
# result = client.get_content_policy request
|
|
6077
|
+
#
|
|
6078
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
|
|
6079
|
+
# p result
|
|
6080
|
+
#
|
|
6081
|
+
def get_content_policy request, options = nil
|
|
6082
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6083
|
+
|
|
6084
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetContentPolicyRequest
|
|
6085
|
+
|
|
6086
|
+
# Converts hash and nil to an options object
|
|
6087
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6088
|
+
|
|
6089
|
+
# Customize the options with defaults
|
|
6090
|
+
call_metadata = @config.rpcs.get_content_policy.metadata.to_h
|
|
6091
|
+
|
|
6092
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6093
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6094
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6095
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION,
|
|
6096
|
+
transports_version_send: [:rest]
|
|
6097
|
+
|
|
6098
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6099
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6100
|
+
|
|
6101
|
+
options.apply_defaults timeout: @config.rpcs.get_content_policy.timeout,
|
|
6102
|
+
metadata: call_metadata,
|
|
6103
|
+
retry_policy: @config.rpcs.get_content_policy.retry_policy
|
|
6104
|
+
|
|
6105
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6106
|
+
metadata: @config.metadata,
|
|
6107
|
+
retry_policy: @config.retry_policy
|
|
6108
|
+
|
|
6109
|
+
@dlp_service_stub.get_content_policy request, options do |result, operation|
|
|
6110
|
+
yield result, operation if block_given?
|
|
6111
|
+
end
|
|
6112
|
+
rescue ::Gapic::Rest::Error => e
|
|
6113
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6114
|
+
end
|
|
6115
|
+
|
|
6116
|
+
##
|
|
6117
|
+
# Lists ContentPolicies in a parent.
|
|
6118
|
+
#
|
|
6119
|
+
# @overload list_content_policies(request, options = nil)
|
|
6120
|
+
# Pass arguments to `list_content_policies` via a request object, either of type
|
|
6121
|
+
# {::Google::Cloud::Dlp::V2::ListContentPoliciesRequest} or an equivalent Hash.
|
|
6122
|
+
#
|
|
6123
|
+
# @param request [::Google::Cloud::Dlp::V2::ListContentPoliciesRequest, ::Hash]
|
|
6124
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6125
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6126
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6127
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6128
|
+
#
|
|
6129
|
+
# @overload list_content_policies(parent: nil, page_size: nil, page_token: nil)
|
|
6130
|
+
# Pass arguments to `list_content_policies` via keyword arguments. Note that at
|
|
6131
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6132
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6133
|
+
#
|
|
6134
|
+
# @param parent [::String]
|
|
6135
|
+
# Required. Resource name of the project,
|
|
6136
|
+
# for example, `projects/project-id/locations/asia`.
|
|
6137
|
+
# @param page_size [::Integer]
|
|
6138
|
+
# Optional. Number of results per page, max 1000.
|
|
6139
|
+
# @param page_token [::String]
|
|
6140
|
+
# Optional. Page token from a previous page to return the next set of
|
|
6141
|
+
# results. If set, all other request fields must match the original request.
|
|
6142
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6143
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ContentPolicy>]
|
|
6144
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6145
|
+
#
|
|
6146
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dlp::V2::ContentPolicy>]
|
|
6147
|
+
#
|
|
6148
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6149
|
+
#
|
|
6150
|
+
# @example Basic example
|
|
6151
|
+
# require "google/cloud/dlp/v2"
|
|
6152
|
+
#
|
|
6153
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6154
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new
|
|
6155
|
+
#
|
|
6156
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6157
|
+
# request = Google::Cloud::Dlp::V2::ListContentPoliciesRequest.new
|
|
6158
|
+
#
|
|
6159
|
+
# # Call the list_content_policies method.
|
|
6160
|
+
# result = client.list_content_policies request
|
|
6161
|
+
#
|
|
6162
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
6163
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
6164
|
+
# result.each do |item|
|
|
6165
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::ContentPolicy.
|
|
6166
|
+
# p item
|
|
6167
|
+
# end
|
|
6168
|
+
#
|
|
6169
|
+
def list_content_policies request, options = nil
|
|
6170
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6171
|
+
|
|
6172
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListContentPoliciesRequest
|
|
6173
|
+
|
|
6174
|
+
# Converts hash and nil to an options object
|
|
6175
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6176
|
+
|
|
6177
|
+
# Customize the options with defaults
|
|
6178
|
+
call_metadata = @config.rpcs.list_content_policies.metadata.to_h
|
|
6179
|
+
|
|
6180
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6181
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6182
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6183
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION,
|
|
6184
|
+
transports_version_send: [:rest]
|
|
6185
|
+
|
|
6186
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6187
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6188
|
+
|
|
6189
|
+
options.apply_defaults timeout: @config.rpcs.list_content_policies.timeout,
|
|
6190
|
+
metadata: call_metadata,
|
|
6191
|
+
retry_policy: @config.rpcs.list_content_policies.retry_policy
|
|
6192
|
+
|
|
6193
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6194
|
+
metadata: @config.metadata,
|
|
6195
|
+
retry_policy: @config.retry_policy
|
|
6196
|
+
|
|
6197
|
+
@dlp_service_stub.list_content_policies request, options do |result, operation|
|
|
6198
|
+
result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_content_policies, "content_policies", request, result, options
|
|
6199
|
+
yield result, operation if block_given?
|
|
6200
|
+
throw :response, result
|
|
6201
|
+
end
|
|
6202
|
+
rescue ::Gapic::Rest::Error => e
|
|
6203
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6204
|
+
end
|
|
6205
|
+
|
|
6206
|
+
##
|
|
6207
|
+
# Delete a ContentPolicy.
|
|
6208
|
+
#
|
|
6209
|
+
# @overload delete_content_policy(request, options = nil)
|
|
6210
|
+
# Pass arguments to `delete_content_policy` via a request object, either of type
|
|
6211
|
+
# {::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest} or an equivalent Hash.
|
|
6212
|
+
#
|
|
6213
|
+
# @param request [::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest, ::Hash]
|
|
6214
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6215
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6216
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6217
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
6218
|
+
#
|
|
6219
|
+
# @overload delete_content_policy(name: nil)
|
|
6220
|
+
# Pass arguments to `delete_content_policy` via keyword arguments. Note that at
|
|
6221
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6222
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6223
|
+
#
|
|
6224
|
+
# @param name [::String]
|
|
6225
|
+
# Required. Resource name of the ContentPolicy to be deleted, in the format:
|
|
6226
|
+
# `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
|
|
6227
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
6228
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
6229
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
6230
|
+
#
|
|
6231
|
+
# @return [::Google::Protobuf::Empty]
|
|
6232
|
+
#
|
|
6233
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
6234
|
+
#
|
|
6235
|
+
# @example Basic example
|
|
6236
|
+
# require "google/cloud/dlp/v2"
|
|
6237
|
+
#
|
|
6238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6239
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Rest::Client.new
|
|
6240
|
+
#
|
|
6241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6242
|
+
# request = Google::Cloud::Dlp::V2::DeleteContentPolicyRequest.new
|
|
6243
|
+
#
|
|
6244
|
+
# # Call the delete_content_policy method.
|
|
6245
|
+
# result = client.delete_content_policy request
|
|
6246
|
+
#
|
|
6247
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
6248
|
+
# p result
|
|
6249
|
+
#
|
|
6250
|
+
def delete_content_policy request, options = nil
|
|
6251
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6252
|
+
|
|
6253
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest
|
|
6254
|
+
|
|
6255
|
+
# Converts hash and nil to an options object
|
|
6256
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6257
|
+
|
|
6258
|
+
# Customize the options with defaults
|
|
6259
|
+
call_metadata = @config.rpcs.delete_content_policy.metadata.to_h
|
|
6260
|
+
|
|
6261
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6262
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6263
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6264
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION,
|
|
6265
|
+
transports_version_send: [:rest]
|
|
6266
|
+
|
|
6267
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6268
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6269
|
+
|
|
6270
|
+
options.apply_defaults timeout: @config.rpcs.delete_content_policy.timeout,
|
|
6271
|
+
metadata: call_metadata,
|
|
6272
|
+
retry_policy: @config.rpcs.delete_content_policy.retry_policy
|
|
6273
|
+
|
|
6274
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6275
|
+
metadata: @config.metadata,
|
|
6276
|
+
retry_policy: @config.retry_policy
|
|
6277
|
+
|
|
6278
|
+
@dlp_service_stub.delete_content_policy request, options do |result, operation|
|
|
6279
|
+
yield result, operation if block_given?
|
|
6280
|
+
end
|
|
6281
|
+
rescue ::Gapic::Rest::Error => e
|
|
6282
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6283
|
+
end
|
|
6284
|
+
|
|
5861
6285
|
##
|
|
5862
6286
|
# Configuration class for the DlpService REST API.
|
|
5863
6287
|
#
|
|
@@ -6281,6 +6705,31 @@ module Google
|
|
|
6281
6705
|
# @return [::Gapic::Config::Method]
|
|
6282
6706
|
#
|
|
6283
6707
|
attr_reader :update_connection
|
|
6708
|
+
##
|
|
6709
|
+
# RPC-specific configuration for `create_content_policy`
|
|
6710
|
+
# @return [::Gapic::Config::Method]
|
|
6711
|
+
#
|
|
6712
|
+
attr_reader :create_content_policy
|
|
6713
|
+
##
|
|
6714
|
+
# RPC-specific configuration for `update_content_policy`
|
|
6715
|
+
# @return [::Gapic::Config::Method]
|
|
6716
|
+
#
|
|
6717
|
+
attr_reader :update_content_policy
|
|
6718
|
+
##
|
|
6719
|
+
# RPC-specific configuration for `get_content_policy`
|
|
6720
|
+
# @return [::Gapic::Config::Method]
|
|
6721
|
+
#
|
|
6722
|
+
attr_reader :get_content_policy
|
|
6723
|
+
##
|
|
6724
|
+
# RPC-specific configuration for `list_content_policies`
|
|
6725
|
+
# @return [::Gapic::Config::Method]
|
|
6726
|
+
#
|
|
6727
|
+
attr_reader :list_content_policies
|
|
6728
|
+
##
|
|
6729
|
+
# RPC-specific configuration for `delete_content_policy`
|
|
6730
|
+
# @return [::Gapic::Config::Method]
|
|
6731
|
+
#
|
|
6732
|
+
attr_reader :delete_content_policy
|
|
6284
6733
|
|
|
6285
6734
|
# @private
|
|
6286
6735
|
def initialize parent_rpcs = nil
|
|
@@ -6394,6 +6843,16 @@ module Google
|
|
|
6394
6843
|
@delete_connection = ::Gapic::Config::Method.new delete_connection_config
|
|
6395
6844
|
update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection
|
|
6396
6845
|
@update_connection = ::Gapic::Config::Method.new update_connection_config
|
|
6846
|
+
create_content_policy_config = parent_rpcs.create_content_policy if parent_rpcs.respond_to? :create_content_policy
|
|
6847
|
+
@create_content_policy = ::Gapic::Config::Method.new create_content_policy_config
|
|
6848
|
+
update_content_policy_config = parent_rpcs.update_content_policy if parent_rpcs.respond_to? :update_content_policy
|
|
6849
|
+
@update_content_policy = ::Gapic::Config::Method.new update_content_policy_config
|
|
6850
|
+
get_content_policy_config = parent_rpcs.get_content_policy if parent_rpcs.respond_to? :get_content_policy
|
|
6851
|
+
@get_content_policy = ::Gapic::Config::Method.new get_content_policy_config
|
|
6852
|
+
list_content_policies_config = parent_rpcs.list_content_policies if parent_rpcs.respond_to? :list_content_policies
|
|
6853
|
+
@list_content_policies = ::Gapic::Config::Method.new list_content_policies_config
|
|
6854
|
+
delete_content_policy_config = parent_rpcs.delete_content_policy if parent_rpcs.respond_to? :delete_content_policy
|
|
6855
|
+
@delete_content_policy = ::Gapic::Config::Method.new delete_content_policy_config
|
|
6397
6856
|
|
|
6398
6857
|
yield self if block_given?
|
|
6399
6858
|
end
|