google-cloud-security_center 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIGRATING.md +49 -1
- data/lib/google/cloud/security_center/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6be9013daf77a2cf07b7fec80efed60a56528c8647c7bc1be09d8ea4639b934
|
4
|
+
data.tar.gz: 9718ea76efa8cca0f1fa5d69e09e056be36872f8f47e0db8c24b7fcea7ff2615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5e56c9bbe467710f51026ec1073aea74f102d92049fb8c6d5744d6a8589b754c385a42d85ec1d3fe59c7264d5dcb4a87a1118ccf5174fecd175f3cb6326a0df
|
7
|
+
data.tar.gz: aafa8038a0349bc981347c4eeffa79699ace3ccb03ba51c308d1a7a61dc3bc376ad7a476b98e8435191cfc849b9e7260ed980d7dc184a4327fdbeef669bd07aa
|
data/MIGRATING.md
CHANGED
@@ -30,6 +30,10 @@ To summarize:
|
|
30
30
|
resource paths. These methods now take keyword rather than positional
|
31
31
|
arguments, and are also available in a separate paths module. See
|
32
32
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
33
|
+
* Previously, clients reported RPC errors by raising instances of
|
34
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
35
|
+
`Google::Cloud::Error` and its subclasses. See
|
36
|
+
[Handling Errors](#handling-errors) for more info.
|
33
37
|
* Some classes have moved into different namespaces. See
|
34
38
|
[Class Namespaces](#class-namespaces) for more info.
|
35
39
|
|
@@ -245,7 +249,7 @@ In the 1.0 client, you can also use the paths module as a convenience module.
|
|
245
249
|
|
246
250
|
New:
|
247
251
|
```
|
248
|
-
# Bring the
|
252
|
+
# Bring the path helper methods into the current class
|
249
253
|
include Google::Cloud::SecurityCenter::V1::SecurityCenterService::Paths
|
250
254
|
|
251
255
|
def foo
|
@@ -260,6 +264,50 @@ def foo
|
|
260
264
|
end
|
261
265
|
```
|
262
266
|
|
267
|
+
### Handling Errors
|
268
|
+
|
269
|
+
The client reports standard
|
270
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
271
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
272
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
273
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
274
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
275
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
276
|
+
|
277
|
+
The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
278
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
279
|
+
exceptions have the same name as their counterparts from older releases, but
|
280
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
281
|
+
namespace.
|
282
|
+
|
283
|
+
Old:
|
284
|
+
```
|
285
|
+
client = Google::Cloud::SecurityCenter.new
|
286
|
+
|
287
|
+
parent = "organizations/my-org/sources/-"
|
288
|
+
ordering = "name"
|
289
|
+
|
290
|
+
begin
|
291
|
+
response = client.list_findings parent, order_by: ordering
|
292
|
+
rescue Google::Gax::Error => e
|
293
|
+
# Handle exceptions that subclass Google::Gax::Error
|
294
|
+
end
|
295
|
+
```
|
296
|
+
|
297
|
+
New:
|
298
|
+
```
|
299
|
+
client = Google::Cloud::SecurityCenter.security_center
|
300
|
+
|
301
|
+
parent = "organizations/my-org/sources/-"
|
302
|
+
ordering = "name"
|
303
|
+
|
304
|
+
begin
|
305
|
+
response = client.list_findings parent: parent, order_by: ordering
|
306
|
+
rescue Google::Cloud::Error => e
|
307
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
308
|
+
end
|
309
|
+
```
|
310
|
+
|
263
311
|
### Class Namespaces
|
264
312
|
|
265
313
|
In older releases, the client object was of class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-security_center
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|