google-cloud-container_analysis-v1 0.1.0 → 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/README.md +68 -0
- data/lib/google/cloud/container_analysis/v1.rb +3 -0
- data/lib/google/cloud/container_analysis/v1/container_analysis.rb +1 -0
- data/lib/google/cloud/container_analysis/v1/container_analysis/client.rb +87 -3
- data/lib/google/cloud/container_analysis/v1/container_analysis/paths.rb +47 -0
- data/lib/google/cloud/container_analysis/v1/version.rb +1 -1
- data/lib/google/devtools/containeranalysis/v1/containeranalysis_pb.rb +19 -0
- data/lib/google/devtools/containeranalysis/v1/containeranalysis_services_pb.rb +6 -5
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/devtools/containeranalysis/v1/containeranalysis.rb +68 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/grafeas/v1/common.rb +118 -0
- data/proto_docs/grafeas/v1/cvss.rb +111 -0
- data/proto_docs/grafeas/v1/package.rb +144 -0
- data/proto_docs/grafeas/v1/vulnerability.rb +245 -0
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8483de3fca01874c1fddf1d5a6ec57f1efbf340a26b670ba9053d383aeea5294
|
4
|
+
data.tar.gz: '09abc5f657d5945de1fc9a635cdc036af456214a19cb62b61ee04d11439dbb73'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2dea62796330e5dca321b2a32a5ccda690360de5575b5535e396504cb08b2d91381465b06c9547803a9fff7fd04d7709e7872f10981de05ce1e0e208d59b5da
|
7
|
+
data.tar.gz: 549129137d696880ab436834c8611a4543a23bf5faedea481b9680e26dc8438d9b8de516c94b961e2f1d5c7174f74dd627c281cbdfb2b9482bae7d97c06f7778
|
data/README.md
CHANGED
@@ -6,6 +6,12 @@ The Container Analysis API is an implementation of Grafeas. It stores, and enabl
|
|
6
6
|
|
7
7
|
https://github.com/googleapis/google-cloud-ruby
|
8
8
|
|
9
|
+
This gem is a _versioned_ client. It provides basic client classes for a
|
10
|
+
specific version of the Container Analysis V1 API. Most users should consider using
|
11
|
+
the main client gem,
|
12
|
+
[google-cloud-container_analysis](https://rubygems.org/gems/google-cloud-container_analysis).
|
13
|
+
See the section below titled *Which client should I use?* for more information.
|
14
|
+
|
9
15
|
## Installation
|
10
16
|
|
11
17
|
```
|
@@ -18,6 +24,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
24
|
|
19
25
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
26
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
27
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/containeranalysis.googleapis.com)
|
21
28
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
29
|
|
23
30
|
## Quick Start
|
@@ -33,6 +40,9 @@ response = client.set_iam_policy request
|
|
33
40
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-container_analysis-v1/latest)
|
34
41
|
for class and method documentation.
|
35
42
|
|
43
|
+
See also the [Product Documentation](https://cloud.google.com/container-registry/docs/container-analysis)
|
44
|
+
for general usage information.
|
45
|
+
|
36
46
|
## Enabling Logging
|
37
47
|
|
38
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -69,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
|
|
69
79
|
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
70
80
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
71
81
|
about the Ruby support schedule.
|
82
|
+
|
83
|
+
## Which client should I use?
|
84
|
+
|
85
|
+
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
86
|
+
client library with a name such as `google-cloud-container_analysis`,
|
87
|
+
and lower-level _versioned_ client libraries with names such as
|
88
|
+
`google-cloud-container_analysis-v1`.
|
89
|
+
_In most cases, you should install the main client._
|
90
|
+
|
91
|
+
### What's the difference between the main client and a versioned client?
|
92
|
+
|
93
|
+
A _versioned client_ provides a basic set of data types and client classes for
|
94
|
+
a _single version_ of a specific service. (That is, for a service with multiple
|
95
|
+
versions, there might be a separate versioned client for each service version.)
|
96
|
+
Most versioned clients are written and maintained by a code generator.
|
97
|
+
|
98
|
+
The _main client_ is designed to provide you with the _recommended_ client
|
99
|
+
interfaces for the service. There will be only one main client for any given
|
100
|
+
service, even a service with multiple versions. The main client includes
|
101
|
+
factory methods for constructing the client objects we recommend for most
|
102
|
+
users. In some cases, those will be classes provided by an underlying versioned
|
103
|
+
client; in other cases, they will be handwritten higher-level client objects
|
104
|
+
with additional capabilities, convenience methods, or best practices built in.
|
105
|
+
Generally, the main client will default to a recommended service version,
|
106
|
+
although in some cases you can override this if you need to talk to a specific
|
107
|
+
service version.
|
108
|
+
|
109
|
+
### Why would I want to use the main client?
|
110
|
+
|
111
|
+
We recommend that most users install the main client gem for a service. You can
|
112
|
+
identify this gem as the one _without_ a version in its name, e.g.
|
113
|
+
`google-cloud-container_analysis`.
|
114
|
+
The main client is recommended because it will embody the best practices for
|
115
|
+
accessing the service, and may also provide more convenient interfaces or
|
116
|
+
tighter integration into frameworks and third-party libraries. In addition, the
|
117
|
+
documentation and samples published by Google will generally demonstrate use of
|
118
|
+
the main client.
|
119
|
+
|
120
|
+
### Why would I want to use a versioned client?
|
121
|
+
|
122
|
+
You can use a versioned client if you are content with a possibly lower-level
|
123
|
+
class interface, you explicitly want to avoid features provided by the main
|
124
|
+
client, or you want to access a specific service version not be covered by the
|
125
|
+
main client. You can identify versioned client gems because the service version
|
126
|
+
is part of the name, e.g. `google-cloud-container_analysis-v1`.
|
127
|
+
|
128
|
+
### What about the google-apis-<name> clients?
|
129
|
+
|
130
|
+
Client library gems with names that begin with `google-apis-` are based on an
|
131
|
+
older code generation technology. They talk to a REST/JSON backend (whereas
|
132
|
+
most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
|
133
|
+
not offer the same performance, features, and ease of use provided by more
|
134
|
+
modern clients.
|
135
|
+
|
136
|
+
The `google-apis-` clients have wide coverage across Google services, so you
|
137
|
+
might need to use one if there is no modern client available for the service.
|
138
|
+
However, if a modern client is available, we generally recommend it over the
|
139
|
+
older `google-apis-` clients.
|
@@ -23,6 +23,7 @@ require "gapic/config/method"
|
|
23
23
|
require "google/cloud/container_analysis/v1/version"
|
24
24
|
|
25
25
|
require "google/cloud/container_analysis/v1/container_analysis/credentials"
|
26
|
+
require "google/cloud/container_analysis/v1/container_analysis/paths"
|
26
27
|
require "google/cloud/container_analysis/v1/container_analysis/client"
|
27
28
|
|
28
29
|
module Google
|
@@ -42,6 +42,8 @@ module Google
|
|
42
42
|
# image with the vulnerability referring to that note.
|
43
43
|
#
|
44
44
|
class Client
|
45
|
+
include Paths
|
46
|
+
|
45
47
|
# @private
|
46
48
|
attr_reader :container_analysis_stub
|
47
49
|
|
@@ -142,7 +144,13 @@ module Google
|
|
142
144
|
|
143
145
|
# Create credentials
|
144
146
|
credentials = @config.credentials
|
145
|
-
|
147
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
148
|
+
# but only if the default endpoint does not have a region prefix.
|
149
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
150
|
+
@config.endpoint == Client.configure.endpoint &&
|
151
|
+
!@config.endpoint.split(".").first.include?("-")
|
152
|
+
credentials ||= Credentials.default scope: @config.scope,
|
153
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
146
154
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
155
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
156
|
end
|
@@ -394,6 +402,75 @@ module Google
|
|
394
402
|
raise ::Google::Cloud::Error.from_error(e)
|
395
403
|
end
|
396
404
|
|
405
|
+
##
|
406
|
+
# Gets a summary of the number and severity of occurrences.
|
407
|
+
#
|
408
|
+
# @overload get_vulnerability_occurrences_summary(request, options = nil)
|
409
|
+
# Pass arguments to `get_vulnerability_occurrences_summary` via a request object, either of type
|
410
|
+
# {::Google::Cloud::ContainerAnalysis::V1::GetVulnerabilityOccurrencesSummaryRequest} or an equivalent Hash.
|
411
|
+
#
|
412
|
+
# @param request [::Google::Cloud::ContainerAnalysis::V1::GetVulnerabilityOccurrencesSummaryRequest, ::Hash]
|
413
|
+
# A request object representing the call parameters. Required. To specify no
|
414
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
415
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
416
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
417
|
+
#
|
418
|
+
# @overload get_vulnerability_occurrences_summary(parent: nil, filter: nil)
|
419
|
+
# Pass arguments to `get_vulnerability_occurrences_summary` via keyword arguments. Note that at
|
420
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
421
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
422
|
+
#
|
423
|
+
# @param parent [::String]
|
424
|
+
# The name of the project to get a vulnerability summary for in the form of
|
425
|
+
# `projects/[PROJECT_ID]`.
|
426
|
+
# @param filter [::String]
|
427
|
+
# The filter expression.
|
428
|
+
#
|
429
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
430
|
+
# @yieldparam response [::Google::Cloud::ContainerAnalysis::V1::VulnerabilityOccurrencesSummary]
|
431
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
432
|
+
#
|
433
|
+
# @return [::Google::Cloud::ContainerAnalysis::V1::VulnerabilityOccurrencesSummary]
|
434
|
+
#
|
435
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
436
|
+
#
|
437
|
+
def get_vulnerability_occurrences_summary request, options = nil
|
438
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
439
|
+
|
440
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContainerAnalysis::V1::GetVulnerabilityOccurrencesSummaryRequest
|
441
|
+
|
442
|
+
# Converts hash and nil to an options object
|
443
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
444
|
+
|
445
|
+
# Customize the options with defaults
|
446
|
+
metadata = @config.rpcs.get_vulnerability_occurrences_summary.metadata.to_h
|
447
|
+
|
448
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
449
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
450
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
451
|
+
gapic_version: ::Google::Cloud::ContainerAnalysis::V1::VERSION
|
452
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
453
|
+
|
454
|
+
header_params = {
|
455
|
+
"parent" => request.parent
|
456
|
+
}
|
457
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
458
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
459
|
+
|
460
|
+
options.apply_defaults timeout: @config.rpcs.get_vulnerability_occurrences_summary.timeout,
|
461
|
+
metadata: metadata,
|
462
|
+
retry_policy: @config.rpcs.get_vulnerability_occurrences_summary.retry_policy
|
463
|
+
options.apply_defaults metadata: @config.metadata,
|
464
|
+
retry_policy: @config.retry_policy
|
465
|
+
|
466
|
+
@container_analysis_stub.call_rpc :get_vulnerability_occurrences_summary, request, options: options do |response, operation|
|
467
|
+
yield response, operation if block_given?
|
468
|
+
return response
|
469
|
+
end
|
470
|
+
rescue ::GRPC::BadStatus => e
|
471
|
+
raise ::Google::Cloud::Error.from_error(e)
|
472
|
+
end
|
473
|
+
|
397
474
|
##
|
398
475
|
# Configuration class for the ContainerAnalysis API.
|
399
476
|
#
|
@@ -479,7 +556,7 @@ module Google
|
|
479
556
|
|
480
557
|
config_attr :endpoint, "containeranalysis.googleapis.com", ::String
|
481
558
|
config_attr :credentials, nil do |value|
|
482
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
559
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
483
560
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
484
561
|
allowed.any? { |klass| klass === value }
|
485
562
|
end
|
@@ -519,7 +596,7 @@ module Google
|
|
519
596
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
520
597
|
# the following configuration fields:
|
521
598
|
#
|
522
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
599
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
523
600
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
524
601
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
525
602
|
# include the following keys:
|
@@ -545,6 +622,11 @@ module Google
|
|
545
622
|
# @return [::Gapic::Config::Method]
|
546
623
|
#
|
547
624
|
attr_reader :test_iam_permissions
|
625
|
+
##
|
626
|
+
# RPC-specific configuration for `get_vulnerability_occurrences_summary`
|
627
|
+
# @return [::Gapic::Config::Method]
|
628
|
+
#
|
629
|
+
attr_reader :get_vulnerability_occurrences_summary
|
548
630
|
|
549
631
|
# @private
|
550
632
|
def initialize parent_rpcs = nil
|
@@ -554,6 +636,8 @@ module Google
|
|
554
636
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
555
637
|
test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
|
556
638
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
639
|
+
get_vulnerability_occurrences_summary_config = parent_rpcs&.get_vulnerability_occurrences_summary if parent_rpcs&.respond_to? :get_vulnerability_occurrences_summary
|
640
|
+
@get_vulnerability_occurrences_summary = ::Gapic::Config::Method.new get_vulnerability_occurrences_summary_config
|
557
641
|
|
558
642
|
yield self if block_given?
|
559
643
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module ContainerAnalysis
|
23
|
+
module V1
|
24
|
+
module ContainerAnalysis
|
25
|
+
# Path helper methods for the ContainerAnalysis API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Project resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
#
|
36
|
+
# @return [::String]
|
37
|
+
def project_path project:
|
38
|
+
"projects/#{project}"
|
39
|
+
end
|
40
|
+
|
41
|
+
extend self
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -5,11 +5,27 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
7
|
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
8
10
|
require 'google/iam/v1/iam_policy_pb'
|
9
11
|
require 'google/iam/v1/policy_pb'
|
10
12
|
require 'google/protobuf/timestamp_pb'
|
13
|
+
require 'grafeas/v1/vulnerability_pb'
|
11
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
15
|
add_file("google/devtools/containeranalysis/v1/containeranalysis.proto", :syntax => :proto3) do
|
16
|
+
add_message "google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest" do
|
17
|
+
optional :parent, :string, 1
|
18
|
+
optional :filter, :string, 2
|
19
|
+
end
|
20
|
+
add_message "google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary" do
|
21
|
+
repeated :counts, :message, 1, "google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest"
|
22
|
+
end
|
23
|
+
add_message "google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest" do
|
24
|
+
optional :resource_uri, :string, 1
|
25
|
+
optional :severity, :enum, 2, "grafeas.v1.Severity"
|
26
|
+
optional :fixable_count, :int64, 3
|
27
|
+
optional :total_count, :int64, 4
|
28
|
+
end
|
13
29
|
end
|
14
30
|
end
|
15
31
|
|
@@ -17,6 +33,9 @@ module Google
|
|
17
33
|
module Cloud
|
18
34
|
module ContainerAnalysis
|
19
35
|
module V1
|
36
|
+
GetVulnerabilityOccurrencesSummaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest").msgclass
|
37
|
+
VulnerabilityOccurrencesSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary").msgclass
|
38
|
+
VulnerabilityOccurrencesSummary::FixableTotalByDigest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest").msgclass
|
20
39
|
end
|
21
40
|
end
|
22
41
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/devtools/containeranalysis/v1/containeranalysis.proto for package 'Google.Cloud.ContainerAnalysis.V1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright 2019 Google LLC
|
4
|
+
# Copyright 2019 Google LLC
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,7 +15,6 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
#
|
19
18
|
|
20
19
|
require 'grpc'
|
21
20
|
require 'google/devtools/containeranalysis/v1/containeranalysis_pb'
|
@@ -54,7 +53,7 @@ module Google
|
|
54
53
|
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
55
54
|
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
56
55
|
# occurrences.
|
57
|
-
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
56
|
+
rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
|
58
57
|
# Gets the access control policy for a note or an occurrence resource.
|
59
58
|
# Requires `containeranalysis.notes.setIamPolicy` or
|
60
59
|
# `containeranalysis.occurrences.setIamPolicy` permission if the resource is
|
@@ -63,7 +62,7 @@ module Google
|
|
63
62
|
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
64
63
|
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
65
64
|
# occurrences.
|
66
|
-
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
65
|
+
rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
|
67
66
|
# Returns the permissions that a caller has on the specified note or
|
68
67
|
# occurrence. Requires list permission on the project (for example,
|
69
68
|
# `containeranalysis.notes.list`).
|
@@ -71,7 +70,9 @@ module Google
|
|
71
70
|
# The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
72
71
|
# notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
73
72
|
# occurrences.
|
74
|
-
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
73
|
+
rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
|
74
|
+
# Gets a summary of the number and severity of occurrences.
|
75
|
+
rpc :GetVulnerabilityOccurrencesSummary, ::Google::Cloud::ContainerAnalysis::V1::GetVulnerabilityOccurrencesSummaryRequest, ::Google::Cloud::ContainerAnalysis::V1::VulnerabilityOccurrencesSummary
|
75
76
|
end
|
76
77
|
|
77
78
|
Stub = Service.rpc_stub_class
|
@@ -54,6 +54,12 @@ module Google
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
55
55
|
# resource, but may not be changed thereafter.
|
56
56
|
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
57
63
|
end
|
58
64
|
end
|
59
65
|
end
|
@@ -43,12 +43,12 @@ module Google
|
|
43
43
|
#
|
44
44
|
# The ResourceDescriptor Yaml config will look like:
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
52
|
#
|
53
53
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
54
|
# live under multiple parents.
|
@@ -183,15 +183,24 @@ module Google
|
|
183
183
|
# }
|
184
184
|
# @!attribute [rw] plural
|
185
185
|
# @return [::String]
|
186
|
-
# The plural name used in the resource name, such as
|
187
|
-
# the name of 'projects/\\{project}'
|
188
|
-
#
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
189
190
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
190
194
|
# @!attribute [rw] singular
|
191
195
|
# @return [::String]
|
192
196
|
# The same concept of the `singular` field in k8s CRD spec
|
193
197
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
198
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
195
204
|
class ResourceDescriptor
|
196
205
|
include ::Google::Protobuf::MessageExts
|
197
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -211,6 +220,22 @@ module Google
|
|
211
220
|
# that from being necessary once there are multiple patterns.)
|
212
221
|
FUTURE_MULTI_PATTERN = 2
|
213
222
|
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
214
239
|
end
|
215
240
|
|
216
241
|
# Defines a proto annotation that describes a string field that refers to
|
@@ -226,6 +251,17 @@ module Google
|
|
226
251
|
# type: "pubsub.googleapis.com/Topic"
|
227
252
|
# }];
|
228
253
|
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
229
265
|
# @!attribute [rw] child_type
|
230
266
|
# @return [::String]
|
231
267
|
# The resource type of a child collection that the annotated field
|
@@ -234,11 +270,11 @@ module Google
|
|
234
270
|
#
|
235
271
|
# Example:
|
236
272
|
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
242
278
|
class ResourceReference
|
243
279
|
include ::Google::Protobuf::MessageExts
|
244
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|