google-cloud-org_policy-v2 1.1.0 → 1.2.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/README.md +30 -20
- data/lib/google/cloud/org_policy/v2/org_policy/client.rb +30 -13
- data/lib/google/cloud/org_policy/v2/org_policy/rest/client.rb +30 -13
- data/lib/google/cloud/org_policy/v2/org_policy/rest/service_stub.rb +110 -74
- data/lib/google/cloud/org_policy/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8ac1afe6dbbbf5abee8f24e9838b926ba8dde9a084ab2888baf33b51ca0aebb
|
4
|
+
data.tar.gz: 5cb9ce3b24637737ddf15f331e558008ac4f08e222942706f3f5c0baec1d9c7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31968787b5a67257c9edf692fb252e2846e6db613ae0303e1ee4f50f3c3c356e0a2e7fed850d7bc94eba3fd197fbd99d3afad552e985556423f38e8b78772874
|
7
|
+
data.tar.gz: 5d20948ca6ae5d4dfe9881b8bae1bc16f3aa65279112cd19ce06076f6b424280aed8801cc2c4cd1e73e0036c9ec3549adc9a21a7940bad99d48dd23fc709280e
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/resource-manager/docs/organization-policy/overview)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/org_policy/v2"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -236,8 +236,28 @@ module Google
|
|
236
236
|
universe_domain: @config.universe_domain,
|
237
237
|
channel_args: @config.channel_args,
|
238
238
|
interceptors: @config.interceptors,
|
239
|
-
channel_pool_config: @config.channel_pool
|
239
|
+
channel_pool_config: @config.channel_pool,
|
240
|
+
logger: @config.logger
|
240
241
|
)
|
242
|
+
|
243
|
+
@org_policy_stub.stub_logger&.info do |entry|
|
244
|
+
entry.set_system_name
|
245
|
+
entry.set_service
|
246
|
+
entry.message = "Created client for #{entry.service}"
|
247
|
+
entry.set_credentials_fields credentials
|
248
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
249
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
250
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# The logger used for request/response debug logging.
|
256
|
+
#
|
257
|
+
# @return [Logger]
|
258
|
+
#
|
259
|
+
def logger
|
260
|
+
@org_policy_stub.logger
|
241
261
|
end
|
242
262
|
|
243
263
|
# Service calls
|
@@ -340,7 +360,7 @@ module Google
|
|
340
360
|
@org_policy_stub.call_rpc :list_constraints, request, options: options do |response, operation|
|
341
361
|
response = ::Gapic::PagedEnumerable.new @org_policy_stub, :list_constraints, request, response, operation, options
|
342
362
|
yield response, operation if block_given?
|
343
|
-
|
363
|
+
throw :response, response
|
344
364
|
end
|
345
365
|
rescue ::GRPC::BadStatus => e
|
346
366
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -445,7 +465,7 @@ module Google
|
|
445
465
|
@org_policy_stub.call_rpc :list_policies, request, options: options do |response, operation|
|
446
466
|
response = ::Gapic::PagedEnumerable.new @org_policy_stub, :list_policies, request, response, operation, options
|
447
467
|
yield response, operation if block_given?
|
448
|
-
|
468
|
+
throw :response, response
|
449
469
|
end
|
450
470
|
rescue ::GRPC::BadStatus => e
|
451
471
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -536,7 +556,6 @@ module Google
|
|
536
556
|
|
537
557
|
@org_policy_stub.call_rpc :get_policy, request, options: options do |response, operation|
|
538
558
|
yield response, operation if block_given?
|
539
|
-
return response
|
540
559
|
end
|
541
560
|
rescue ::GRPC::BadStatus => e
|
542
561
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -628,7 +647,6 @@ module Google
|
|
628
647
|
|
629
648
|
@org_policy_stub.call_rpc :get_effective_policy, request, options: options do |response, operation|
|
630
649
|
yield response, operation if block_given?
|
631
|
-
return response
|
632
650
|
end
|
633
651
|
rescue ::GRPC::BadStatus => e
|
634
652
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -727,7 +745,6 @@ module Google
|
|
727
745
|
|
728
746
|
@org_policy_stub.call_rpc :create_policy, request, options: options do |response, operation|
|
729
747
|
yield response, operation if block_given?
|
730
|
-
return response
|
731
748
|
end
|
732
749
|
rescue ::GRPC::BadStatus => e
|
733
750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -825,7 +842,6 @@ module Google
|
|
825
842
|
|
826
843
|
@org_policy_stub.call_rpc :update_policy, request, options: options do |response, operation|
|
827
844
|
yield response, operation if block_given?
|
828
|
-
return response
|
829
845
|
end
|
830
846
|
rescue ::GRPC::BadStatus => e
|
831
847
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -919,7 +935,6 @@ module Google
|
|
919
935
|
|
920
936
|
@org_policy_stub.call_rpc :delete_policy, request, options: options do |response, operation|
|
921
937
|
yield response, operation if block_given?
|
922
|
-
return response
|
923
938
|
end
|
924
939
|
rescue ::GRPC::BadStatus => e
|
925
940
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1014,7 +1029,6 @@ module Google
|
|
1014
1029
|
|
1015
1030
|
@org_policy_stub.call_rpc :create_custom_constraint, request, options: options do |response, operation|
|
1016
1031
|
yield response, operation if block_given?
|
1017
|
-
return response
|
1018
1032
|
end
|
1019
1033
|
rescue ::GRPC::BadStatus => e
|
1020
1034
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1106,7 +1120,6 @@ module Google
|
|
1106
1120
|
|
1107
1121
|
@org_policy_stub.call_rpc :update_custom_constraint, request, options: options do |response, operation|
|
1108
1122
|
yield response, operation if block_given?
|
1109
|
-
return response
|
1110
1123
|
end
|
1111
1124
|
rescue ::GRPC::BadStatus => e
|
1112
1125
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1196,7 +1209,6 @@ module Google
|
|
1196
1209
|
|
1197
1210
|
@org_policy_stub.call_rpc :get_custom_constraint, request, options: options do |response, operation|
|
1198
1211
|
yield response, operation if block_given?
|
1199
|
-
return response
|
1200
1212
|
end
|
1201
1213
|
rescue ::GRPC::BadStatus => e
|
1202
1214
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1299,7 +1311,7 @@ module Google
|
|
1299
1311
|
@org_policy_stub.call_rpc :list_custom_constraints, request, options: options do |response, operation|
|
1300
1312
|
response = ::Gapic::PagedEnumerable.new @org_policy_stub, :list_custom_constraints, request, response, operation, options
|
1301
1313
|
yield response, operation if block_given?
|
1302
|
-
|
1314
|
+
throw :response, response
|
1303
1315
|
end
|
1304
1316
|
rescue ::GRPC::BadStatus => e
|
1305
1317
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1389,7 +1401,6 @@ module Google
|
|
1389
1401
|
|
1390
1402
|
@org_policy_stub.call_rpc :delete_custom_constraint, request, options: options do |response, operation|
|
1391
1403
|
yield response, operation if block_given?
|
1392
|
-
return response
|
1393
1404
|
end
|
1394
1405
|
rescue ::GRPC::BadStatus => e
|
1395
1406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1478,6 +1489,11 @@ module Google
|
|
1478
1489
|
# default endpoint URL. The default value of nil uses the environment
|
1479
1490
|
# universe (usually the default "googleapis.com" universe).
|
1480
1491
|
# @return [::String,nil]
|
1492
|
+
# @!attribute [rw] logger
|
1493
|
+
# A custom logger to use for request/response debug logging, or the value
|
1494
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1495
|
+
# explicitly disable logging.
|
1496
|
+
# @return [::Logger,:default,nil]
|
1481
1497
|
#
|
1482
1498
|
class Configuration
|
1483
1499
|
extend ::Gapic::Config
|
@@ -1502,6 +1518,7 @@ module Google
|
|
1502
1518
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1503
1519
|
config_attr :quota_project, nil, ::String, nil
|
1504
1520
|
config_attr :universe_domain, nil, ::String, nil
|
1521
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1505
1522
|
|
1506
1523
|
# @private
|
1507
1524
|
def initialize parent_config = nil
|
@@ -229,8 +229,28 @@ module Google
|
|
229
229
|
endpoint: @config.endpoint,
|
230
230
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
231
231
|
universe_domain: @config.universe_domain,
|
232
|
-
credentials: credentials
|
232
|
+
credentials: credentials,
|
233
|
+
logger: @config.logger
|
233
234
|
)
|
235
|
+
|
236
|
+
@org_policy_stub.logger(stub: true)&.info do |entry|
|
237
|
+
entry.set_system_name
|
238
|
+
entry.set_service
|
239
|
+
entry.message = "Created client for #{entry.service}"
|
240
|
+
entry.set_credentials_fields credentials
|
241
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
242
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
243
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
##
|
248
|
+
# The logger used for request/response debug logging.
|
249
|
+
#
|
250
|
+
# @return [Logger]
|
251
|
+
#
|
252
|
+
def logger
|
253
|
+
@org_policy_stub.logger
|
234
254
|
end
|
235
255
|
|
236
256
|
# Service calls
|
@@ -326,7 +346,7 @@ module Google
|
|
326
346
|
@org_policy_stub.list_constraints request, options do |result, operation|
|
327
347
|
result = ::Gapic::Rest::PagedEnumerable.new @org_policy_stub, :list_constraints, "constraints", request, result, options
|
328
348
|
yield result, operation if block_given?
|
329
|
-
|
349
|
+
throw :response, result
|
330
350
|
end
|
331
351
|
rescue ::Gapic::Rest::Error => e
|
332
352
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -424,7 +444,7 @@ module Google
|
|
424
444
|
@org_policy_stub.list_policies request, options do |result, operation|
|
425
445
|
result = ::Gapic::Rest::PagedEnumerable.new @org_policy_stub, :list_policies, "policies", request, result, options
|
426
446
|
yield result, operation if block_given?
|
427
|
-
|
447
|
+
throw :response, result
|
428
448
|
end
|
429
449
|
rescue ::Gapic::Rest::Error => e
|
430
450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -508,7 +528,6 @@ module Google
|
|
508
528
|
|
509
529
|
@org_policy_stub.get_policy request, options do |result, operation|
|
510
530
|
yield result, operation if block_given?
|
511
|
-
return result
|
512
531
|
end
|
513
532
|
rescue ::Gapic::Rest::Error => e
|
514
533
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -593,7 +612,6 @@ module Google
|
|
593
612
|
|
594
613
|
@org_policy_stub.get_effective_policy request, options do |result, operation|
|
595
614
|
yield result, operation if block_given?
|
596
|
-
return result
|
597
615
|
end
|
598
616
|
rescue ::Gapic::Rest::Error => e
|
599
617
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -685,7 +703,6 @@ module Google
|
|
685
703
|
|
686
704
|
@org_policy_stub.create_policy request, options do |result, operation|
|
687
705
|
yield result, operation if block_given?
|
688
|
-
return result
|
689
706
|
end
|
690
707
|
rescue ::Gapic::Rest::Error => e
|
691
708
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -776,7 +793,6 @@ module Google
|
|
776
793
|
|
777
794
|
@org_policy_stub.update_policy request, options do |result, operation|
|
778
795
|
yield result, operation if block_given?
|
779
|
-
return result
|
780
796
|
end
|
781
797
|
rescue ::Gapic::Rest::Error => e
|
782
798
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -863,7 +879,6 @@ module Google
|
|
863
879
|
|
864
880
|
@org_policy_stub.delete_policy request, options do |result, operation|
|
865
881
|
yield result, operation if block_given?
|
866
|
-
return result
|
867
882
|
end
|
868
883
|
rescue ::Gapic::Rest::Error => e
|
869
884
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -951,7 +966,6 @@ module Google
|
|
951
966
|
|
952
967
|
@org_policy_stub.create_custom_constraint request, options do |result, operation|
|
953
968
|
yield result, operation if block_given?
|
954
|
-
return result
|
955
969
|
end
|
956
970
|
rescue ::Gapic::Rest::Error => e
|
957
971
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1036,7 +1050,6 @@ module Google
|
|
1036
1050
|
|
1037
1051
|
@org_policy_stub.update_custom_constraint request, options do |result, operation|
|
1038
1052
|
yield result, operation if block_given?
|
1039
|
-
return result
|
1040
1053
|
end
|
1041
1054
|
rescue ::Gapic::Rest::Error => e
|
1042
1055
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1119,7 +1132,6 @@ module Google
|
|
1119
1132
|
|
1120
1133
|
@org_policy_stub.get_custom_constraint request, options do |result, operation|
|
1121
1134
|
yield result, operation if block_given?
|
1122
|
-
return result
|
1123
1135
|
end
|
1124
1136
|
rescue ::Gapic::Rest::Error => e
|
1125
1137
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1215,7 +1227,7 @@ module Google
|
|
1215
1227
|
@org_policy_stub.list_custom_constraints request, options do |result, operation|
|
1216
1228
|
result = ::Gapic::Rest::PagedEnumerable.new @org_policy_stub, :list_custom_constraints, "custom_constraints", request, result, options
|
1217
1229
|
yield result, operation if block_given?
|
1218
|
-
|
1230
|
+
throw :response, result
|
1219
1231
|
end
|
1220
1232
|
rescue ::Gapic::Rest::Error => e
|
1221
1233
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1298,7 +1310,6 @@ module Google
|
|
1298
1310
|
|
1299
1311
|
@org_policy_stub.delete_custom_constraint request, options do |result, operation|
|
1300
1312
|
yield result, operation if block_given?
|
1301
|
-
return result
|
1302
1313
|
end
|
1303
1314
|
rescue ::Gapic::Rest::Error => e
|
1304
1315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1378,6 +1389,11 @@ module Google
|
|
1378
1389
|
# default endpoint URL. The default value of nil uses the environment
|
1379
1390
|
# universe (usually the default "googleapis.com" universe).
|
1380
1391
|
# @return [::String,nil]
|
1392
|
+
# @!attribute [rw] logger
|
1393
|
+
# A custom logger to use for request/response debug logging, or the value
|
1394
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1395
|
+
# explicitly disable logging.
|
1396
|
+
# @return [::Logger,:default,nil]
|
1381
1397
|
#
|
1382
1398
|
class Configuration
|
1383
1399
|
extend ::Gapic::Config
|
@@ -1399,6 +1415,7 @@ module Google
|
|
1399
1415
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1400
1416
|
config_attr :quota_project, nil, ::String, nil
|
1401
1417
|
config_attr :universe_domain, nil, ::String, nil
|
1418
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1402
1419
|
|
1403
1420
|
# @private
|
1404
1421
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the list_constraints REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_constraints",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::OrgPolicy::V2::ListConstraintsResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "list_policies",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::OrgPolicy::V2::ListPoliciesResponse.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "get_policy",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::OrgPolicy::V2::Policy.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "get_effective_policy",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::OrgPolicy::V2::Policy.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "create_policy",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Cloud::OrgPolicy::V2::Policy.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "update_policy",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::OrgPolicy::V2::Policy.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "delete_policy",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "create_custom_constraint",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|
@@ -391,16 +419,18 @@ module Google
|
|
391
419
|
|
392
420
|
response = @client_stub.make_http_request(
|
393
421
|
verb,
|
394
|
-
uri:
|
395
|
-
body:
|
396
|
-
params:
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "update_custom_constraint",
|
397
426
|
options: options
|
398
427
|
)
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
400
429
|
result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
404
434
|
end
|
405
435
|
|
406
436
|
##
|
@@ -429,16 +459,18 @@ module Google
|
|
429
459
|
|
430
460
|
response = @client_stub.make_http_request(
|
431
461
|
verb,
|
432
|
-
uri:
|
433
|
-
body:
|
434
|
-
params:
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "get_custom_constraint",
|
435
466
|
options: options
|
436
467
|
)
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
438
469
|
result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
|
439
|
-
|
440
|
-
|
441
|
-
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
442
474
|
end
|
443
475
|
|
444
476
|
##
|
@@ -467,16 +499,18 @@ module Google
|
|
467
499
|
|
468
500
|
response = @client_stub.make_http_request(
|
469
501
|
verb,
|
470
|
-
uri:
|
471
|
-
body:
|
472
|
-
params:
|
502
|
+
uri: uri,
|
503
|
+
body: body || "",
|
504
|
+
params: query_string_params,
|
505
|
+
method_name: "list_custom_constraints",
|
473
506
|
options: options
|
474
507
|
)
|
475
508
|
operation = ::Gapic::Rest::TransportOperation.new response
|
476
509
|
result = ::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse.decode_json response.body, ignore_unknown_fields: true
|
477
|
-
|
478
|
-
|
479
|
-
|
510
|
+
catch :response do
|
511
|
+
yield result, operation if block_given?
|
512
|
+
result
|
513
|
+
end
|
480
514
|
end
|
481
515
|
|
482
516
|
##
|
@@ -505,16 +539,18 @@ module Google
|
|
505
539
|
|
506
540
|
response = @client_stub.make_http_request(
|
507
541
|
verb,
|
508
|
-
uri:
|
509
|
-
body:
|
510
|
-
params:
|
542
|
+
uri: uri,
|
543
|
+
body: body || "",
|
544
|
+
params: query_string_params,
|
545
|
+
method_name: "delete_custom_constraint",
|
511
546
|
options: options
|
512
547
|
)
|
513
548
|
operation = ::Gapic::Rest::TransportOperation.new response
|
514
549
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
515
|
-
|
516
|
-
|
517
|
-
|
550
|
+
catch :response do
|
551
|
+
yield result, operation if block_given?
|
552
|
+
result
|
553
|
+
end
|
518
554
|
end
|
519
555
|
|
520
556
|
##
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
217
|
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-org_policy-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.5.
|
106
|
+
rubygems_version: 3.5.23
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: The Organization Policy API allows users to configure governance rules on
|