Skip to content

Commit b6a8a4f

Browse files
Google APIscopybara-github
authored andcommitted
feat!: remove the unimplemented ScanConfig API method and resources
PiperOrigin-RevId: 516567935
1 parent 40a03de commit b6a8a4f

2 files changed

Lines changed: 10 additions & 126 deletions

File tree

Lines changed: 10 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -20,10 +19,8 @@ package google.devtools.containeranalysis.v1beta1;
2019
import "google/api/annotations.proto";
2120
import "google/api/client.proto";
2221
import "google/api/field_behavior.proto";
23-
import "google/api/resource.proto";
2422
import "google/iam/v1/iam_policy.proto";
2523
import "google/iam/v1/policy.proto";
26-
import "google/protobuf/timestamp.proto";
2724

2825
option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1;containeranalysis";
2926
option java_multiple_files = true;
@@ -32,7 +29,7 @@ option objc_class_prefix = "GCA";
3229

3330
// Retrieves analysis results of Cloud components such as Docker container
3431
// images. The Container Analysis API is an implementation of the
35-
// [Grafeas](grafeas.io) API.
32+
// [Grafeas](https://grafeas.io) API.
3633
//
3734
// Analysis results are stored as a series of occurrences. An `Occurrence`
3835
// contains information about a specific analysis instance on a resource. An
@@ -45,7 +42,8 @@ option objc_class_prefix = "GCA";
4542
// image with the vulnerability referring to that note.
4643
service ContainerAnalysisV1Beta1 {
4744
option (google.api.default_host) = "containeranalysis.googleapis.com";
48-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
45+
option (google.api.oauth_scopes) =
46+
"https://www.googleapis.com/auth/cloud-platform";
4947

5048
// Sets the access control policy on the specified note or occurrence.
5149
// Requires `containeranalysis.notes.setIamPolicy` or
@@ -55,7 +53,8 @@ service ContainerAnalysisV1Beta1 {
5553
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
5654
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
5755
// occurrences.
58-
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
56+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
57+
returns (google.iam.v1.Policy) {
5958
option (google.api.http) = {
6059
post: "/v1beta1/{resource=projects/*/notes/*}:setIamPolicy"
6160
body: "*"
@@ -75,7 +74,8 @@ service ContainerAnalysisV1Beta1 {
7574
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
7675
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
7776
// occurrences.
78-
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
77+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
78+
returns (google.iam.v1.Policy) {
7979
option (google.api.http) = {
8080
post: "/v1beta1/{resource=projects/*/notes/*}:getIamPolicy"
8181
body: "*"
@@ -94,7 +94,8 @@ service ContainerAnalysisV1Beta1 {
9494
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
9595
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
9696
// occurrences.
97-
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
97+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
98+
returns (google.iam.v1.TestIamPermissionsResponse) {
9899
option (google.api.http) = {
99100
post: "/v1beta1/{resource=projects/*/notes/*}:testIamPermissions"
100101
body: "*"
@@ -105,115 +106,4 @@ service ContainerAnalysisV1Beta1 {
105106
};
106107
option (google.api.method_signature) = "resource,permissions";
107108
}
108-
109-
// Gets the specified scan configuration.
110-
rpc GetScanConfig(GetScanConfigRequest) returns (ScanConfig) {
111-
option (google.api.http) = {
112-
get: "/v1beta1/{name=projects/*/scanConfigs/*}"
113-
};
114-
option (google.api.method_signature) = "name";
115-
}
116-
117-
// Lists scan configurations for the specified project.
118-
rpc ListScanConfigs(ListScanConfigsRequest) returns (ListScanConfigsResponse) {
119-
option (google.api.http) = {
120-
get: "/v1beta1/{parent=projects/*}/scanConfigs"
121-
};
122-
option (google.api.method_signature) = "parent,filter";
123-
}
124-
125-
// Updates the specified scan configuration.
126-
rpc UpdateScanConfig(UpdateScanConfigRequest) returns (ScanConfig) {
127-
option (google.api.http) = {
128-
put: "/v1beta1/{name=projects/*/scanConfigs/*}"
129-
body: "scan_config"
130-
};
131-
option (google.api.method_signature) = "name,scan_config";
132-
}
133-
}
134-
135-
// A scan configuration specifies whether Cloud components in a project have a
136-
// particular type of analysis being run. For example, it can configure whether
137-
// vulnerability scanning is being done on Docker images or not.
138-
message ScanConfig {
139-
option (google.api.resource) = {
140-
type: "containeranalysis.googleapis.com/ScanConfig"
141-
pattern: "projects/{project}/scanConfigs/{scan_config}"
142-
};
143-
144-
// Output only. The name of the scan configuration in the form of
145-
// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
146-
string name = 1;
147-
148-
// Output only. A human-readable description of what the scan configuration
149-
// does.
150-
string description = 2;
151-
152-
// Whether the scan is enabled.
153-
bool enabled = 3;
154-
155-
// Output only. The time this scan config was created.
156-
google.protobuf.Timestamp create_time = 4;
157-
158-
// Output only. The time this scan config was last updated.
159-
google.protobuf.Timestamp update_time = 5;
160-
}
161-
162-
// Request to get a scan configuration.
163-
message GetScanConfigRequest {
164-
// Required. The name of the scan configuration in the form of
165-
// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
166-
string name = 1 [
167-
(google.api.field_behavior) = REQUIRED,
168-
(google.api.resource_reference) = {
169-
type: "containeranalysis.googleapis.com/ScanConfig"
170-
}
171-
];
172-
}
173-
174-
// Request to list scan configurations.
175-
message ListScanConfigsRequest {
176-
// Required. The name of the project to list scan configurations for in the form of
177-
// `projects/[PROJECT_ID]`.
178-
string parent = 1 [
179-
(google.api.field_behavior) = REQUIRED,
180-
(google.api.resource_reference) = {
181-
type: "cloudresourcemanager.googleapis.com/Project"
182-
}
183-
];
184-
185-
// Required. The filter expression.
186-
string filter = 2 [(google.api.field_behavior) = REQUIRED];
187-
188-
// The number of scan configs to return in the list.
189-
int32 page_size = 3;
190-
191-
// Token to provide to skip to a particular spot in the list.
192-
string page_token = 4;
193-
}
194-
195-
// Response for listing scan configurations.
196-
message ListScanConfigsResponse {
197-
// The scan configurations requested.
198-
repeated ScanConfig scan_configs = 1;
199-
200-
// The next pagination token in the list response. It should be used as
201-
// `page_token` for the following request. An empty value means no more
202-
// results.
203-
string next_page_token = 2;
204-
}
205-
206-
// A request to update a scan configuration.
207-
message UpdateScanConfigRequest {
208-
// Required. The name of the scan configuration in the form of
209-
// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.
210-
string name = 1 [
211-
(google.api.field_behavior) = REQUIRED,
212-
(google.api.resource_reference) = {
213-
type: "containeranalysis.googleapis.com/ScanConfig"
214-
}
215-
];
216-
217-
// Required. The updated scan configuration.
218-
ScanConfig scan_config = 2 [(google.api.field_behavior) = REQUIRED];
219109
}

google/devtools/containeranalysis/v1beta1/containeranalysis_v1beta1.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,10 @@ backend:
1818
rules:
1919
- selector: 'google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.*'
2020
deadline: 30.0
21-
- selector: 'google.longrunning.Operations.*'
22-
deadline: 30.0
2321

2422
authentication:
2523
rules:
2624
- selector: 'google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.*'
2725
oauth:
2826
canonical_scopes: |-
2927
https://www.googleapis.com/auth/cloud-platform
30-
- selector: 'google.longrunning.Operations.*'
31-
oauth:
32-
canonical_scopes: |-
33-
https://www.googleapis.com/auth/cloud-platform

0 commit comments

Comments
 (0)