google-cloud-security_center 0.10.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -2
- data/AUTHENTICATION.md +51 -54
- data/LICENSE.md +203 -0
- data/MIGRATING.md +279 -0
- data/README.md +36 -25
- data/lib/{google/cloud/security_center/v1/doc/google/protobuf/empty.rb → google-cloud-security_center.rb} +4 -14
- data/lib/google/cloud/security_center.rb +81 -117
- data/lib/google/cloud/security_center/version.rb +6 -2
- metadata +89 -111
- data/LICENSE +0 -201
- data/lib/google/cloud/security_center/v1.rb +0 -149
- data/lib/google/cloud/security_center/v1/asset_pb.rb +0 -41
- data/lib/google/cloud/security_center/v1/credentials.rb +0 -41
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/asset.rb +0 -105
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/finding.rb +0 -97
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/notification_config.rb +0 -75
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/organization_settings.rb +0 -72
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/security_marks.rb +0 -45
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/securitycenter_service.rb +0 -912
- data/lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/source.rb +0 -50
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/iam_policy.rb +0 -64
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/options.rb +0 -33
- data/lib/google/cloud/security_center/v1/doc/google/iam/v1/policy.rb +0 -151
- data/lib/google/cloud/security_center/v1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/security_center/v1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/security_center/v1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/security_center/v1/doc/google/type/expr.rb +0 -45
- data/lib/google/cloud/security_center/v1/finding_pb.rb +0 -36
- data/lib/google/cloud/security_center/v1/helpers.rb +0 -96
- data/lib/google/cloud/security_center/v1/notification_config_pb.rb +0 -28
- data/lib/google/cloud/security_center/v1/notification_message_pb.rb +0 -20
- data/lib/google/cloud/security_center/v1/organization_settings_pb.rb +0 -30
- data/lib/google/cloud/security_center/v1/run_asset_discovery_response_pb.rb +0 -25
- data/lib/google/cloud/security_center/v1/security_center_client.rb +0 -2135
- data/lib/google/cloud/security_center/v1/security_center_client_config.json +0 -141
- data/lib/google/cloud/security_center/v1/security_marks_pb.rb +0 -18
- data/lib/google/cloud/security_center/v1/securitycenter_service_pb.rb +0 -230
- data/lib/google/cloud/security_center/v1/securitycenter_service_services_pb.rb +0 -100
- data/lib/google/cloud/security_center/v1/source_pb.rb +0 -19
- data/lib/google/cloud/security_center/v1p1beta1.rb +0 -149
- data/lib/google/cloud/security_center/v1p1beta1/asset_pb.rb +0 -41
- data/lib/google/cloud/security_center/v1p1beta1/credentials.rb +0 -41
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/asset.rb +0 -105
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/finding.rb +0 -96
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/notification_config.rb +0 -87
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/organization_settings.rb +0 -72
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/security_marks.rb +0 -45
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb +0 -923
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/source.rb +0 -49
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/iam_policy.rb +0 -64
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/options.rb +0 -33
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/policy.rb +0 -151
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/security_center/v1p1beta1/doc/google/type/expr.rb +0 -45
- data/lib/google/cloud/security_center/v1p1beta1/finding_pb.rb +0 -36
- data/lib/google/cloud/security_center/v1p1beta1/helpers.rb +0 -79
- data/lib/google/cloud/security_center/v1p1beta1/notification_config_pb.rb +0 -34
- data/lib/google/cloud/security_center/v1p1beta1/notification_message_pb.rb +0 -21
- data/lib/google/cloud/security_center/v1p1beta1/organization_settings_pb.rb +0 -30
- data/lib/google/cloud/security_center/v1p1beta1/run_asset_discovery_response_pb.rb +0 -25
- data/lib/google/cloud/security_center/v1p1beta1/security_center_client.rb +0 -2110
- data/lib/google/cloud/security_center/v1p1beta1/security_center_client_config.json +0 -141
- data/lib/google/cloud/security_center/v1p1beta1/security_marks_pb.rb +0 -18
- data/lib/google/cloud/security_center/v1p1beta1/securitycenter_service_pb.rb +0 -234
- data/lib/google/cloud/security_center/v1p1beta1/securitycenter_service_services_pb.rb +0 -103
- data/lib/google/cloud/security_center/v1p1beta1/source_pb.rb +0 -19
data/README.md
CHANGED
@@ -1,42 +1,53 @@
|
|
1
|
-
# Ruby Client for
|
1
|
+
# Ruby Client for the Security Command Center API
|
2
2
|
|
3
|
-
|
4
|
-
Cloud Security Command Center API provides access to temporal views of
|
5
|
-
assets and findings within an organization.
|
6
|
-
- [Client Library Documentation][]
|
7
|
-
- [Product Documentation][]
|
3
|
+
API Client library for the Security Command Center API
|
8
4
|
|
9
|
-
|
10
|
-
In order to use this library, you first need to go through the following
|
11
|
-
steps:
|
5
|
+
Security Command Center API provides access to temporal views of assets and findings within an organization.
|
12
6
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
Actual client classes for the various versions of this API are defined in
|
8
|
+
_versioned_ client gems, with names of the form `google-cloud-security_center-v*`.
|
9
|
+
The gem `google-cloud-security_center` is a convenience wrapper library that brings the
|
10
|
+
verisoned gems in as dependencies, and provides high-level methods for
|
11
|
+
constructing clients.
|
12
|
+
|
13
|
+
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-security_center/latest)
|
14
|
+
for this library, google-cloud-security_center, to see the convenience methods for
|
15
|
+
constructing client objects. Reference documentation for the client objects
|
16
|
+
themselves can be found in the client library documentation for the versioned
|
17
|
+
client gems:
|
18
|
+
[google-cloud-security_center-v1](https://googleapis.dev/ruby/google-cloud-security_center-v1/latest),
|
19
|
+
[google-cloud-security_center-v1p1beta1](https://googleapis.dev/ruby/google-cloud-security_center-v1p1beta1/latest).
|
20
|
+
|
21
|
+
See also the [Product Documentation](https://cloud.google.com/security-command-center)
|
22
|
+
for more usage information.
|
23
|
+
|
24
|
+
## Quick Start
|
17
25
|
|
18
|
-
### Installation
|
19
26
|
```
|
20
27
|
$ gem install google-cloud-security_center
|
21
28
|
```
|
22
29
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
+
In order to use this library, you first need to go through the following steps:
|
31
|
+
|
32
|
+
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
33
|
+
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
34
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com)
|
35
|
+
1. {file:AUTHENTICATION.md Set up authentication.}
|
36
|
+
|
37
|
+
## Migrating from 0.x versions
|
30
38
|
|
31
|
-
|
32
|
-
[
|
39
|
+
The 1.0 release of the google-cloud-security_center client is a significant upgrade
|
40
|
+
based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
|
41
|
+
and includes substantial interface changes. Existing code written for earlier
|
42
|
+
versions of this library will likely require updates to use this version.
|
43
|
+
See the {file:MIGRATING.md MIGRATING.md} document for more information.
|
33
44
|
|
34
45
|
## Enabling Logging
|
35
46
|
|
36
47
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
37
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib
|
48
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
|
38
49
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
39
|
-
that will write logs to [
|
50
|
+
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
40
51
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
41
52
|
|
42
53
|
Configuring a Ruby stdlib logger:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2020 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,18 +14,6 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
15
18
|
|
16
|
-
|
17
|
-
module Protobuf
|
18
|
-
# A generic empty message that you can re-use to avoid defining duplicated
|
19
|
-
# empty messages in your APIs. A typical example is to use it as the request
|
20
|
-
# or the response type of an API method. For instance:
|
21
|
-
#
|
22
|
-
# service Foo {
|
23
|
-
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
24
|
-
# }
|
25
|
-
#
|
26
|
-
# The JSON representation for `Empty` is empty JSON object `{}`.
|
27
|
-
class Empty; end
|
28
|
-
end
|
29
|
-
end
|
19
|
+
require "google/cloud/security_center" unless defined? Google::Cloud::SecurityCenter::VERSION
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2020 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,133 +14,95 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# Require this file early so that the version constant gets defined before
|
20
|
+
# requiring "google/cloud". This is because google-cloud-core will load the
|
21
|
+
# entrypoint (gem name) file, which in turn re-requires this file (hence
|
22
|
+
# causing a require cycle) unless the version constant is already defined.
|
23
|
+
require "google/cloud/security_center/version"
|
15
24
|
|
16
|
-
require "
|
17
|
-
|
25
|
+
require "googleauth"
|
26
|
+
gem "google-cloud-core"
|
27
|
+
require "google/cloud" unless defined? ::Google::Cloud.new
|
28
|
+
require "google/cloud/config"
|
29
|
+
|
30
|
+
# Set the default configuration
|
31
|
+
::Google::Cloud.configure.add_config! :security_center do |config|
|
32
|
+
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
|
33
|
+
config.add_field! :lib_name, nil, match: ::String
|
34
|
+
config.add_field! :lib_version, nil, match: ::String
|
35
|
+
config.add_field! :interceptors, nil, match: ::Array
|
36
|
+
config.add_field! :timeout, nil, match: ::Numeric
|
37
|
+
config.add_field! :metadata, nil, match: ::Hash
|
38
|
+
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
|
39
|
+
end
|
18
40
|
|
19
41
|
module Google
|
20
42
|
module Cloud
|
21
|
-
# rubocop:disable LineLength
|
22
|
-
|
23
|
-
##
|
24
|
-
# # Ruby Client for Cloud Security Command Center API
|
25
|
-
#
|
26
|
-
# [Cloud Security Command Center API][Product Documentation]:
|
27
|
-
# Cloud Security Command Center API provides access to temporal views of
|
28
|
-
# assets and findings within an organization.
|
29
|
-
# - [Product Documentation][]
|
30
|
-
#
|
31
|
-
# ## Quick Start
|
32
|
-
# In order to use this library, you first need to go through the following
|
33
|
-
# steps:
|
34
|
-
#
|
35
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
36
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
-
# 3. [Enable the Cloud Security Command Center API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com)
|
38
|
-
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-security_center/latest/file.AUTHENTICATION.html)
|
39
|
-
#
|
40
|
-
# ### Installation
|
41
|
-
# ```
|
42
|
-
# $ gem install google-cloud-security_center
|
43
|
-
# ```
|
44
|
-
#
|
45
|
-
# ### Next Steps
|
46
|
-
# - Read the [Cloud Security Command Center API Product documentation][Product Documentation]
|
47
|
-
# to learn more about the product and see How-to Guides.
|
48
|
-
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
49
|
-
# to see the full list of Cloud APIs that we cover.
|
50
|
-
#
|
51
|
-
# [Product Documentation]: https://cloud.google.com/security-command-center/
|
52
|
-
#
|
53
|
-
# ## Enabling Logging
|
54
|
-
#
|
55
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
56
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
57
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
58
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
59
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
60
|
-
#
|
61
|
-
# Configuring a Ruby stdlib logger:
|
62
|
-
#
|
63
|
-
# ```ruby
|
64
|
-
# require "logger"
|
65
|
-
#
|
66
|
-
# module MyLogger
|
67
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
68
|
-
# def logger
|
69
|
-
# LOGGER
|
70
|
-
# end
|
71
|
-
# end
|
72
|
-
#
|
73
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
74
|
-
# module GRPC
|
75
|
-
# extend MyLogger
|
76
|
-
# end
|
77
|
-
# ```
|
78
|
-
#
|
79
43
|
module SecurityCenter
|
80
|
-
|
81
|
-
|
82
|
-
|
44
|
+
##
|
45
|
+
# Create a new client object for SecurityCenter.
|
46
|
+
#
|
47
|
+
# By default, this returns an instance of
|
48
|
+
# [Google::Cloud::SecurityCenter::V1::SecurityCenter::Client](https://googleapis.dev/ruby/google-cloud-security_center-v1/latest/Google/Cloud/SecurityCenter/V1/SecurityCenter/Client.html)
|
49
|
+
# for version V1 of the API.
|
50
|
+
# However, you can specify specify a different API version by passing it in the
|
51
|
+
# `version` parameter. If the SecurityCenter service is
|
52
|
+
# supported by that API version, and the corresponding gem is available, the
|
53
|
+
# appropriate versioned client will be returned.
|
54
|
+
#
|
55
|
+
# ## About SecurityCenter
|
56
|
+
#
|
57
|
+
# V1 APIs for Security Center service.
|
58
|
+
#
|
59
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
60
|
+
# Defaults to `:v1`.
|
61
|
+
# @return [SecurityCenter::Client] A client object for the specified version.
|
62
|
+
#
|
63
|
+
def self.security_center version: :v1, &block
|
64
|
+
require "google/cloud/security_center/#{version.to_s.downcase}"
|
83
65
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
66
|
+
package_name = Google::Cloud::SecurityCenter
|
67
|
+
.constants
|
68
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
69
|
+
.first
|
70
|
+
package_module = Google::Cloud::SecurityCenter.const_get package_name
|
71
|
+
package_module.const_get(:SecurityCenter).const_get(:Client).new(&block)
|
72
|
+
end
|
89
73
|
|
90
74
|
##
|
91
|
-
#
|
75
|
+
# Configure the google-cloud-security_center library.
|
76
|
+
#
|
77
|
+
# The following configuration parameters are supported:
|
78
|
+
#
|
79
|
+
# * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
|
80
|
+
# The path to the keyfile as a String, the contents of the keyfile as a
|
81
|
+
# Hash, or a Google::Auth::Credentials object.
|
82
|
+
# * `lib_name` (*type:* `String`) -
|
83
|
+
# The library name as recorded in instrumentation and logging.
|
84
|
+
# * `lib_version` (*type:* `String`) -
|
85
|
+
# The library version as recorded in instrumentation and logging.
|
86
|
+
# * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
|
87
|
+
# An array of interceptors that are run before calls are executed.
|
88
|
+
# * `timeout` (*type:* `Integer`) -
|
89
|
+
# Default timeout in milliseconds.
|
90
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
91
|
+
# Additional gRPC headers to be sent with the call.
|
92
|
+
# * `retry_policy` (*type:* `Hash`) -
|
93
|
+
# The retry policy. The value is a hash with the following keys:
|
94
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
95
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
96
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
97
|
+
# * `:retry_codes` (*type:* `Array<String>`) -
|
98
|
+
# The error codes that should trigger a retry.
|
99
|
+
#
|
100
|
+
# @return [::Google::Cloud::Config] The default configuration used by this library
|
92
101
|
#
|
93
|
-
|
94
|
-
|
95
|
-
# is used.
|
96
|
-
# @overload new(version:, credentials:, scopes:, client_config:, timeout:)
|
97
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
98
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
99
|
-
# be many types.
|
100
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
101
|
-
# authenticating requests made by this client.
|
102
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
103
|
-
# credentials for this client.
|
104
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
105
|
-
# credentials for this client.
|
106
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
107
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
108
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
109
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
110
|
-
# metadata for requests, generally, to give OAuth credentials.
|
111
|
-
# @param scopes [Array<String>]
|
112
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
113
|
-
# an updater_proc is supplied.
|
114
|
-
# @param client_config [Hash]
|
115
|
-
# A Hash for call options for each method. See
|
116
|
-
# Google::Gax#construct_settings for the structure of
|
117
|
-
# this data. Falls back to the default config if not specified
|
118
|
-
# or the specified config is missing data points.
|
119
|
-
# @param timeout [Numeric]
|
120
|
-
# The default timeout, in seconds, for calls made through this client.
|
121
|
-
# @param metadata [Hash]
|
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.
|
127
|
-
# @param exception_transformer [Proc]
|
128
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
129
|
-
# custom error handling.
|
130
|
-
def self.new(*args, version: :v1, **kwargs)
|
131
|
-
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
132
|
-
raise "The version: #{version} is not available. The available versions " \
|
133
|
-
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
|
134
|
-
end
|
102
|
+
def self.configure
|
103
|
+
yield ::Google::Cloud.configure.security_center if block_given?
|
135
104
|
|
136
|
-
|
137
|
-
version_module = Google::Cloud::SecurityCenter
|
138
|
-
.constants
|
139
|
-
.select {|sym| sym.to_s.downcase == version.to_s.downcase}
|
140
|
-
.first
|
141
|
-
Google::Cloud::SecurityCenter.const_get(version_module).new(*args, **kwargs)
|
105
|
+
::Google::Cloud.configure.security_center
|
142
106
|
end
|
143
107
|
end
|
144
108
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
6
|
# you may not use this file except in compliance with the License.
|
@@ -12,11 +14,13 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
15
19
|
|
16
20
|
module Google
|
17
21
|
module Cloud
|
18
22
|
module SecurityCenter
|
19
|
-
VERSION = "0.
|
23
|
+
VERSION = "1.0.0"
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
metadata
CHANGED
@@ -1,125 +1,169 @@
|
|
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: 1.0.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: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: google-
|
14
|
+
name: google-cloud-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
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.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: google-cloud-security_center-v1
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.3.9
|
34
|
-
- - "<"
|
31
|
+
- - "~>"
|
35
32
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
33
|
+
version: '0.0'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- - "
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.3.9
|
44
|
-
- - "<"
|
38
|
+
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
40
|
+
version: '0.0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
42
|
+
name: google-cloud-security_center-v1p1beta1
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
|
-
- - "
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 1.0.4
|
54
|
-
- - "<"
|
45
|
+
- - "~>"
|
55
46
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
47
|
+
version: '0.0'
|
57
48
|
type: :runtime
|
58
49
|
prerelease: false
|
59
50
|
version_requirements: !ruby/object:Gem::Requirement
|
60
51
|
requirements:
|
61
|
-
- - "
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: autotest-suffix
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
62
60
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
64
|
-
|
61
|
+
version: '1.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
65
67
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
68
|
+
version: '1.1'
|
67
69
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
70
|
+
name: google-style
|
69
71
|
requirement: !ruby/object:Gem::Requirement
|
70
72
|
requirements:
|
71
73
|
- - "~>"
|
72
74
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
74
|
-
type: :
|
75
|
+
version: 1.24.0
|
76
|
+
type: :development
|
75
77
|
prerelease: false
|
76
78
|
version_requirements: !ruby/object:Gem::Requirement
|
77
79
|
requirements:
|
78
80
|
- - "~>"
|
79
81
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
82
|
+
version: 1.24.0
|
81
83
|
- !ruby/object:Gem::Dependency
|
82
84
|
name: minitest
|
83
85
|
requirement: !ruby/object:Gem::Requirement
|
84
86
|
requirements:
|
85
87
|
- - "~>"
|
86
88
|
- !ruby/object:Gem::Version
|
87
|
-
version: '5.
|
89
|
+
version: '5.14'
|
88
90
|
type: :development
|
89
91
|
prerelease: false
|
90
92
|
version_requirements: !ruby/object:Gem::Requirement
|
91
93
|
requirements:
|
92
94
|
- - "~>"
|
93
95
|
- !ruby/object:Gem::Version
|
94
|
-
version: '5.
|
96
|
+
version: '5.14'
|
95
97
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
98
|
+
name: minitest-autotest
|
97
99
|
requirement: !ruby/object:Gem::Requirement
|
98
100
|
requirements:
|
99
101
|
- - "~>"
|
100
102
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
103
|
+
version: '1.0'
|
102
104
|
type: :development
|
103
105
|
prerelease: false
|
104
106
|
version_requirements: !ruby/object:Gem::Requirement
|
105
107
|
requirements:
|
106
108
|
- - "~>"
|
107
109
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
110
|
+
version: '1.0'
|
109
111
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
112
|
+
name: minitest-focus
|
111
113
|
requirement: !ruby/object:Gem::Requirement
|
112
114
|
requirements:
|
113
115
|
- - "~>"
|
114
116
|
- !ruby/object:Gem::Version
|
115
|
-
version: 1.
|
117
|
+
version: '1.1'
|
116
118
|
type: :development
|
117
119
|
prerelease: false
|
118
120
|
version_requirements: !ruby/object:Gem::Requirement
|
119
121
|
requirements:
|
120
122
|
- - "~>"
|
121
123
|
- !ruby/object:Gem::Version
|
122
|
-
version: 1.
|
124
|
+
version: '1.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: minitest-rg
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '5.2'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '5.2'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '12.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '12.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: redcarpet
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.0'
|
123
167
|
- !ruby/object:Gem::Dependency
|
124
168
|
name: simplecov
|
125
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,8 +192,8 @@ dependencies:
|
|
148
192
|
- - "~>"
|
149
193
|
- !ruby/object:Gem::Version
|
150
194
|
version: '0.9'
|
151
|
-
description:
|
152
|
-
|
195
|
+
description: Security Command Center API provides access to temporal views of assets
|
196
|
+
and findings within an organization.
|
153
197
|
email: googleapis-packages@google.com
|
154
198
|
executables: []
|
155
199
|
extensions: []
|
@@ -157,79 +201,13 @@ extra_rdoc_files: []
|
|
157
201
|
files:
|
158
202
|
- ".yardopts"
|
159
203
|
- AUTHENTICATION.md
|
160
|
-
- LICENSE
|
204
|
+
- LICENSE.md
|
205
|
+
- MIGRATING.md
|
161
206
|
- README.md
|
207
|
+
- lib/google-cloud-security_center.rb
|
162
208
|
- lib/google/cloud/security_center.rb
|
163
|
-
- lib/google/cloud/security_center/v1.rb
|
164
|
-
- lib/google/cloud/security_center/v1/asset_pb.rb
|
165
|
-
- lib/google/cloud/security_center/v1/credentials.rb
|
166
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/asset.rb
|
167
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/finding.rb
|
168
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/notification_config.rb
|
169
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/organization_settings.rb
|
170
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/security_marks.rb
|
171
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/securitycenter_service.rb
|
172
|
-
- lib/google/cloud/security_center/v1/doc/google/cloud/securitycenter/v1/source.rb
|
173
|
-
- lib/google/cloud/security_center/v1/doc/google/iam/v1/iam_policy.rb
|
174
|
-
- lib/google/cloud/security_center/v1/doc/google/iam/v1/options.rb
|
175
|
-
- lib/google/cloud/security_center/v1/doc/google/iam/v1/policy.rb
|
176
|
-
- lib/google/cloud/security_center/v1/doc/google/longrunning/operations.rb
|
177
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/any.rb
|
178
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/duration.rb
|
179
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/empty.rb
|
180
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/field_mask.rb
|
181
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/struct.rb
|
182
|
-
- lib/google/cloud/security_center/v1/doc/google/protobuf/timestamp.rb
|
183
|
-
- lib/google/cloud/security_center/v1/doc/google/rpc/status.rb
|
184
|
-
- lib/google/cloud/security_center/v1/doc/google/type/expr.rb
|
185
|
-
- lib/google/cloud/security_center/v1/finding_pb.rb
|
186
|
-
- lib/google/cloud/security_center/v1/helpers.rb
|
187
|
-
- lib/google/cloud/security_center/v1/notification_config_pb.rb
|
188
|
-
- lib/google/cloud/security_center/v1/notification_message_pb.rb
|
189
|
-
- lib/google/cloud/security_center/v1/organization_settings_pb.rb
|
190
|
-
- lib/google/cloud/security_center/v1/run_asset_discovery_response_pb.rb
|
191
|
-
- lib/google/cloud/security_center/v1/security_center_client.rb
|
192
|
-
- lib/google/cloud/security_center/v1/security_center_client_config.json
|
193
|
-
- lib/google/cloud/security_center/v1/security_marks_pb.rb
|
194
|
-
- lib/google/cloud/security_center/v1/securitycenter_service_pb.rb
|
195
|
-
- lib/google/cloud/security_center/v1/securitycenter_service_services_pb.rb
|
196
|
-
- lib/google/cloud/security_center/v1/source_pb.rb
|
197
|
-
- lib/google/cloud/security_center/v1p1beta1.rb
|
198
|
-
- lib/google/cloud/security_center/v1p1beta1/asset_pb.rb
|
199
|
-
- lib/google/cloud/security_center/v1p1beta1/credentials.rb
|
200
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/asset.rb
|
201
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/finding.rb
|
202
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/notification_config.rb
|
203
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/organization_settings.rb
|
204
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/security_marks.rb
|
205
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb
|
206
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/cloud/securitycenter/v1p1beta1/source.rb
|
207
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/iam_policy.rb
|
208
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/options.rb
|
209
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/iam/v1/policy.rb
|
210
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/longrunning/operations.rb
|
211
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/any.rb
|
212
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/duration.rb
|
213
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/empty.rb
|
214
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/field_mask.rb
|
215
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/struct.rb
|
216
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/protobuf/timestamp.rb
|
217
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/rpc/status.rb
|
218
|
-
- lib/google/cloud/security_center/v1p1beta1/doc/google/type/expr.rb
|
219
|
-
- lib/google/cloud/security_center/v1p1beta1/finding_pb.rb
|
220
|
-
- lib/google/cloud/security_center/v1p1beta1/helpers.rb
|
221
|
-
- lib/google/cloud/security_center/v1p1beta1/notification_config_pb.rb
|
222
|
-
- lib/google/cloud/security_center/v1p1beta1/notification_message_pb.rb
|
223
|
-
- lib/google/cloud/security_center/v1p1beta1/organization_settings_pb.rb
|
224
|
-
- lib/google/cloud/security_center/v1p1beta1/run_asset_discovery_response_pb.rb
|
225
|
-
- lib/google/cloud/security_center/v1p1beta1/security_center_client.rb
|
226
|
-
- lib/google/cloud/security_center/v1p1beta1/security_center_client_config.json
|
227
|
-
- lib/google/cloud/security_center/v1p1beta1/security_marks_pb.rb
|
228
|
-
- lib/google/cloud/security_center/v1p1beta1/securitycenter_service_pb.rb
|
229
|
-
- lib/google/cloud/security_center/v1p1beta1/securitycenter_service_services_pb.rb
|
230
|
-
- lib/google/cloud/security_center/v1p1beta1/source_pb.rb
|
231
209
|
- lib/google/cloud/security_center/version.rb
|
232
|
-
homepage: https://github.com/googleapis/
|
210
|
+
homepage: https://github.com/googleapis/google-cloud-ruby
|
233
211
|
licenses:
|
234
212
|
- Apache-2.0
|
235
213
|
metadata: {}
|
@@ -251,5 +229,5 @@ requirements: []
|
|
251
229
|
rubygems_version: 3.0.6
|
252
230
|
signing_key:
|
253
231
|
specification_version: 4
|
254
|
-
summary: API Client library for
|
232
|
+
summary: API Client library for the Security Command Center API
|
255
233
|
test_files: []
|