google-cloud-security_center 0.2.1 → 0.3.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/lib/google/cloud/security_center.rb +4 -0
- data/lib/google/cloud/security_center/v1.rb +8 -0
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/iam_policy.rb +4 -0
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/options.rb +29 -0
- data/lib/google/cloud/security_center/v1/security_center_client.rb +20 -3
- data/lib/google/cloud/security_center/v1/securitycenter_service_pb.rb +1 -0
- data/lib/google/cloud/security_center/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad9a52519c684faf333391789e2720fc3cd27b6ce7845280f62debfa4b05fb74
|
4
|
+
data.tar.gz: 37e81ab633b6e374859018cd8539580e52738a75d737c86647757a51be6d1d8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ee072c52f296d66f2c3c7b935b8ae628231c9f07051003bd49c2efb91b7aca40e3f7f389532e27b3242ec8118587243c37e480bd9d70d13c6ca42046f81e70d
|
7
|
+
data.tar.gz: c8e26a5ba291141cb06ab57e6b5e9fd1eccf15f2ab827f6ee911b3a5cd25cb03f278b4513f0e287f9e3253acee5f10924742c3ecfa459839d2141cb70c24b1c4
|
@@ -120,6 +120,10 @@ module Google
|
|
120
120
|
# The default timeout, in seconds, for calls made through this client.
|
121
121
|
# @param metadata [Hash]
|
122
122
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
123
|
+
# @param service_address [String]
|
124
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
125
|
+
# @param service_port [Integer]
|
126
|
+
# Override for the service port, or `nil` to leave as the default.
|
123
127
|
# @param exception_transformer [Proc]
|
124
128
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
125
129
|
# custom error handling.
|
@@ -110,6 +110,10 @@ module Google
|
|
110
110
|
# The default timeout, in seconds, for calls made through this client.
|
111
111
|
# @param metadata [Hash]
|
112
112
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
113
|
+
# @param service_address [String]
|
114
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
115
|
+
# @param service_port [Integer]
|
116
|
+
# Override for the service port, or `nil` to leave as the default.
|
113
117
|
# @param exception_transformer [Proc]
|
114
118
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
115
119
|
# custom error handling.
|
@@ -119,6 +123,8 @@ module Google
|
|
119
123
|
client_config: nil,
|
120
124
|
timeout: nil,
|
121
125
|
metadata: nil,
|
126
|
+
service_address: nil,
|
127
|
+
service_port: nil,
|
122
128
|
exception_transformer: nil,
|
123
129
|
lib_name: nil,
|
124
130
|
lib_version: nil
|
@@ -130,6 +136,8 @@ module Google
|
|
130
136
|
metadata: metadata,
|
131
137
|
exception_transformer: exception_transformer,
|
132
138
|
lib_name: lib_name,
|
139
|
+
service_address: service_address,
|
140
|
+
service_port: service_port,
|
133
141
|
lib_version: lib_version
|
134
142
|
}.select { |_, v| v != nil }
|
135
143
|
Google::Cloud::SecurityCenter::V1::SecurityCenterClient.new(**kwargs)
|
@@ -34,6 +34,10 @@ module Google
|
|
34
34
|
# @return [String]
|
35
35
|
# REQUIRED: The resource for which the policy is being requested.
|
36
36
|
# See the operation documentation for the appropriate value for this field.
|
37
|
+
# @!attribute [rw] options
|
38
|
+
# @return [Google::Iam::V1::GetPolicyOptions]
|
39
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
40
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
37
41
|
class GetIamPolicyRequest; end
|
38
42
|
|
39
43
|
# Request message for `TestIamPermissions` method.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Iam
|
18
|
+
module V1
|
19
|
+
# Encapsulates settings provided to GetIamPolicy.
|
20
|
+
# @!attribute [rw] requested_policy_version
|
21
|
+
# @return [Integer]
|
22
|
+
# Optional. The policy format version to be returned.
|
23
|
+
# Acceptable values are 0 and 1.
|
24
|
+
# If the value is 0, or the field is omitted, policy format version 1 will be
|
25
|
+
# returned.
|
26
|
+
class GetPolicyOptions; end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -28,6 +28,7 @@ require "google/gax/operation"
|
|
28
28
|
require "google/longrunning/operations_client"
|
29
29
|
|
30
30
|
require "google/cloud/security_center/v1/securitycenter_service_pb"
|
31
|
+
require "google/cloud/security_center/v1/run_asset_discovery_response_pb"
|
31
32
|
require "google/cloud/security_center/v1/credentials"
|
32
33
|
require "google/cloud/security_center/version"
|
33
34
|
|
@@ -250,6 +251,10 @@ module Google
|
|
250
251
|
# The default timeout, in seconds, for calls made through this client.
|
251
252
|
# @param metadata [Hash]
|
252
253
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
254
|
+
# @param service_address [String]
|
255
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
256
|
+
# @param service_port [Integer]
|
257
|
+
# Override for the service port, or `nil` to leave as the default.
|
253
258
|
# @param exception_transformer [Proc]
|
254
259
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
255
260
|
# custom error handling.
|
@@ -259,6 +264,8 @@ module Google
|
|
259
264
|
client_config: {},
|
260
265
|
timeout: DEFAULT_TIMEOUT,
|
261
266
|
metadata: nil,
|
267
|
+
service_address: nil,
|
268
|
+
service_port: nil,
|
262
269
|
exception_transformer: nil,
|
263
270
|
lib_name: nil,
|
264
271
|
lib_version: ""
|
@@ -276,7 +283,10 @@ module Google
|
|
276
283
|
client_config: client_config,
|
277
284
|
timeout: timeout,
|
278
285
|
lib_name: lib_name,
|
286
|
+
service_address: service_address,
|
287
|
+
service_port: service_port,
|
279
288
|
lib_version: lib_version,
|
289
|
+
metadata: metadata,
|
280
290
|
)
|
281
291
|
|
282
292
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
@@ -322,8 +332,8 @@ module Google
|
|
322
332
|
end
|
323
333
|
|
324
334
|
# Allow overriding the service path/port in subclasses.
|
325
|
-
service_path = self.class::SERVICE_ADDRESS
|
326
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
335
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
336
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
327
337
|
interceptors = self.class::GRPC_INTERCEPTORS
|
328
338
|
@security_center_stub = Google::Gax::Grpc.create_stub(
|
329
339
|
service_path,
|
@@ -581,6 +591,11 @@ module Google
|
|
581
591
|
# @param resource [String]
|
582
592
|
# REQUIRED: The resource for which the policy is being requested.
|
583
593
|
# See the operation documentation for the appropriate value for this field.
|
594
|
+
# @param options_ [Google::Iam::V1::GetPolicyOptions | Hash]
|
595
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
596
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
597
|
+
# A hash of the same form as `Google::Iam::V1::GetPolicyOptions`
|
598
|
+
# can also be provided.
|
584
599
|
# @param options [Google::Gax::CallOptions]
|
585
600
|
# Overrides the default settings for this call, e.g, timeout,
|
586
601
|
# retries, etc.
|
@@ -598,10 +613,12 @@ module Google
|
|
598
613
|
|
599
614
|
def get_iam_policy \
|
600
615
|
resource,
|
616
|
+
options_: nil,
|
601
617
|
options: nil,
|
602
618
|
&block
|
603
619
|
req = {
|
604
|
-
resource: resource
|
620
|
+
resource: resource,
|
621
|
+
options: options_
|
605
622
|
}.delete_if { |_, v| v.nil? }
|
606
623
|
req = Google::Gax::to_proto(req, Google::Iam::V1::GetIamPolicyRequest)
|
607
624
|
@get_iam_policy.call(req, options, &block)
|
@@ -8,6 +8,7 @@ require 'google/api/annotations_pb'
|
|
8
8
|
require 'google/cloud/security_center/v1/asset_pb'
|
9
9
|
require 'google/cloud/security_center/v1/finding_pb'
|
10
10
|
require 'google/cloud/security_center/v1/organization_settings_pb'
|
11
|
+
require 'google/cloud/security_center/v1/run_asset_discovery_response_pb'
|
11
12
|
require 'google/cloud/security_center/v1/security_marks_pb'
|
12
13
|
require 'google/cloud/security_center/v1/source_pb'
|
13
14
|
require 'google/iam/v1/iam_policy_pb'
|
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: 0.
|
4
|
+
version: 0.3.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: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: grpc-google-iam-v1
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/securitycenter_service.rb
|
131
131
|
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/source.rb
|
132
132
|
- lib/google/cloud/security_center/v1/doc/google/iam/v1/iam_policy.rb
|
133
|
+
- lib/google/cloud/security_center/v1/doc/google/iam/v1/options.rb
|
133
134
|
- lib/google/cloud/security_center/v1/doc/google/iam/v1/policy.rb
|
134
135
|
- lib/google/cloud/security_center/v1/doc/google/longrunning/operations.rb
|
135
136
|
- lib/google/cloud/security_center/v1/doc/google/protobuf/any.rb
|