xref: /aosp_15_r20/external/googleapis/google/devtools/artifactregistry/v1/service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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//     http://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
15syntax = "proto3";
16
17package google.devtools.artifactregistry.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/devtools/artifactregistry/v1/apt_artifact.proto";
22import "google/devtools/artifactregistry/v1/artifact.proto";
23import "google/devtools/artifactregistry/v1/file.proto";
24import "google/devtools/artifactregistry/v1/package.proto";
25import "google/devtools/artifactregistry/v1/repository.proto";
26import "google/devtools/artifactregistry/v1/settings.proto";
27import "google/devtools/artifactregistry/v1/tag.proto";
28import "google/devtools/artifactregistry/v1/version.proto";
29import "google/devtools/artifactregistry/v1/vpcsc_config.proto";
30import "google/devtools/artifactregistry/v1/yum_artifact.proto";
31import "google/iam/v1/iam_policy.proto";
32import "google/iam/v1/policy.proto";
33import "google/longrunning/operations.proto";
34import "google/protobuf/empty.proto";
35
36option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1";
37option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb";
38option java_multiple_files = true;
39option java_outer_classname = "ServiceProto";
40option java_package = "com.google.devtools.artifactregistry.v1";
41option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
42option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
43
44// The Artifact Registry API service.
45//
46// Artifact Registry is an artifact management system for storing artifacts
47// from different package management systems.
48//
49// The resources managed by this API are:
50//
51// * Repositories, which group packages and their data.
52// * Packages, which group versions and their tags.
53// * Versions, which are specific forms of a package.
54// * Tags, which represent alternative names for versions.
55// * Files, which contain content and are optionally associated with a Package
56//   or Version.
57service ArtifactRegistry {
58  option (google.api.default_host) = "artifactregistry.googleapis.com";
59  option (google.api.oauth_scopes) =
60      "https://www.googleapis.com/auth/cloud-platform,"
61      "https://www.googleapis.com/auth/cloud-platform.read-only";
62
63  // Lists docker images.
64  rpc ListDockerImages(ListDockerImagesRequest)
65      returns (ListDockerImagesResponse) {
66    option (google.api.http) = {
67      get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages"
68    };
69    option (google.api.method_signature) = "parent";
70  }
71
72  // Gets a docker image.
73  rpc GetDockerImage(GetDockerImageRequest) returns (DockerImage) {
74    option (google.api.http) = {
75      get: "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}"
76    };
77    option (google.api.method_signature) = "name";
78  }
79
80  // Lists maven artifacts.
81  rpc ListMavenArtifacts(ListMavenArtifactsRequest)
82      returns (ListMavenArtifactsResponse) {
83    option (google.api.http) = {
84      get: "/v1/{parent=projects/*/locations/*/repositories/*}/mavenArtifacts"
85    };
86    option (google.api.method_signature) = "parent";
87  }
88
89  // Gets a maven artifact.
90  rpc GetMavenArtifact(GetMavenArtifactRequest) returns (MavenArtifact) {
91    option (google.api.http) = {
92      get: "/v1/{name=projects/*/locations/*/repositories/*/mavenArtifacts/*}"
93    };
94    option (google.api.method_signature) = "name";
95  }
96
97  // Lists npm packages.
98  rpc ListNpmPackages(ListNpmPackagesRequest)
99      returns (ListNpmPackagesResponse) {
100    option (google.api.http) = {
101      get: "/v1/{parent=projects/*/locations/*/repositories/*}/npmPackages"
102    };
103    option (google.api.method_signature) = "parent";
104  }
105
106  // Gets a npm package.
107  rpc GetNpmPackage(GetNpmPackageRequest) returns (NpmPackage) {
108    option (google.api.http) = {
109      get: "/v1/{name=projects/*/locations/*/repositories/*/npmPackages/*}"
110    };
111    option (google.api.method_signature) = "name";
112  }
113
114  // Lists python packages.
115  rpc ListPythonPackages(ListPythonPackagesRequest)
116      returns (ListPythonPackagesResponse) {
117    option (google.api.http) = {
118      get: "/v1/{parent=projects/*/locations/*/repositories/*}/pythonPackages"
119    };
120    option (google.api.method_signature) = "parent";
121  }
122
123  // Gets a python package.
124  rpc GetPythonPackage(GetPythonPackageRequest) returns (PythonPackage) {
125    option (google.api.http) = {
126      get: "/v1/{name=projects/*/locations/*/repositories/*/pythonPackages/*}"
127    };
128    option (google.api.method_signature) = "name";
129  }
130
131  // Imports Apt artifacts. The returned Operation will complete once the
132  // resources are imported. Package, Version, and File resources are created
133  // based on the imported artifacts. Imported artifacts that conflict with
134  // existing resources are ignored.
135  rpc ImportAptArtifacts(ImportAptArtifactsRequest)
136      returns (google.longrunning.Operation) {
137    option (google.api.http) = {
138      post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import"
139      body: "*"
140    };
141    option (google.longrunning.operation_info) = {
142      response_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse"
143      metadata_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata"
144    };
145  }
146
147  // Imports Yum (RPM) artifacts. The returned Operation will complete once the
148  // resources are imported. Package, Version, and File resources are created
149  // based on the imported artifacts. Imported artifacts that conflict with
150  // existing resources are ignored.
151  rpc ImportYumArtifacts(ImportYumArtifactsRequest)
152      returns (google.longrunning.Operation) {
153    option (google.api.http) = {
154      post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import"
155      body: "*"
156    };
157    option (google.longrunning.operation_info) = {
158      response_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse"
159      metadata_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata"
160    };
161  }
162
163  // Lists repositories.
164  rpc ListRepositories(ListRepositoriesRequest)
165      returns (ListRepositoriesResponse) {
166    option (google.api.http) = {
167      get: "/v1/{parent=projects/*/locations/*}/repositories"
168    };
169    option (google.api.method_signature) = "parent";
170  }
171
172  // Gets a repository.
173  rpc GetRepository(GetRepositoryRequest) returns (Repository) {
174    option (google.api.http) = {
175      get: "/v1/{name=projects/*/locations/*/repositories/*}"
176    };
177    option (google.api.method_signature) = "name";
178  }
179
180  // Creates a repository. The returned Operation will finish once the
181  // repository has been created. Its response will be the created Repository.
182  rpc CreateRepository(CreateRepositoryRequest)
183      returns (google.longrunning.Operation) {
184    option (google.api.http) = {
185      post: "/v1/{parent=projects/*/locations/*}/repositories"
186      body: "repository"
187    };
188    option (google.api.method_signature) = "parent,repository,repository_id";
189    option (google.longrunning.operation_info) = {
190      response_type: "google.devtools.artifactregistry.v1.Repository"
191      metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
192    };
193  }
194
195  // Updates a repository.
196  rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) {
197    option (google.api.http) = {
198      patch: "/v1/{repository.name=projects/*/locations/*/repositories/*}"
199      body: "repository"
200    };
201    option (google.api.method_signature) = "repository,update_mask";
202  }
203
204  // Deletes a repository and all of its contents. The returned Operation will
205  // finish once the repository has been deleted. It will not have any Operation
206  // metadata and will return a google.protobuf.Empty response.
207  rpc DeleteRepository(DeleteRepositoryRequest)
208      returns (google.longrunning.Operation) {
209    option (google.api.http) = {
210      delete: "/v1/{name=projects/*/locations/*/repositories/*}"
211    };
212    option (google.api.method_signature) = "name";
213    option (google.longrunning.operation_info) = {
214      response_type: "google.protobuf.Empty"
215      metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
216    };
217  }
218
219  // Lists packages.
220  rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) {
221    option (google.api.http) = {
222      get: "/v1/{parent=projects/*/locations/*/repositories/*}/packages"
223    };
224    option (google.api.method_signature) = "parent";
225  }
226
227  // Gets a package.
228  rpc GetPackage(GetPackageRequest) returns (Package) {
229    option (google.api.http) = {
230      get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}"
231    };
232    option (google.api.method_signature) = "name";
233  }
234
235  // Deletes a package and all of its versions and tags. The returned operation
236  // will complete once the package has been deleted.
237  rpc DeletePackage(DeletePackageRequest)
238      returns (google.longrunning.Operation) {
239    option (google.api.http) = {
240      delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}"
241    };
242    option (google.api.method_signature) = "name";
243    option (google.longrunning.operation_info) = {
244      response_type: "google.protobuf.Empty"
245      metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
246    };
247  }
248
249  // Lists versions.
250  rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
251    option (google.api.http) = {
252      get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions"
253    };
254    option (google.api.method_signature) = "parent";
255  }
256
257  // Gets a version
258  rpc GetVersion(GetVersionRequest) returns (Version) {
259    option (google.api.http) = {
260      get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
261    };
262    option (google.api.method_signature) = "name";
263  }
264
265  // Deletes a version and all of its content. The returned operation will
266  // complete once the version has been deleted.
267  rpc DeleteVersion(DeleteVersionRequest)
268      returns (google.longrunning.Operation) {
269    option (google.api.http) = {
270      delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
271    };
272    option (google.api.method_signature) = "name";
273    option (google.longrunning.operation_info) = {
274      response_type: "google.protobuf.Empty"
275      metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
276    };
277  }
278
279  // Deletes multiple versions across a repository. The returned operation will
280  // complete once the versions have been deleted.
281  rpc BatchDeleteVersions(BatchDeleteVersionsRequest)
282      returns (google.longrunning.Operation) {
283    option (google.api.http) = {
284      post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete"
285      body: "*"
286    };
287    option (google.api.method_signature) = "parent,names";
288    option (google.longrunning.operation_info) = {
289      response_type: "google.protobuf.Empty"
290      metadata_type: "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata"
291    };
292  }
293
294  // Lists files.
295  rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) {
296    option (google.api.http) = {
297      get: "/v1/{parent=projects/*/locations/*/repositories/*}/files"
298    };
299    option (google.api.method_signature) = "parent";
300  }
301
302  // Gets a file.
303  rpc GetFile(GetFileRequest) returns (File) {
304    option (google.api.http) = {
305      get: "/v1/{name=projects/*/locations/*/repositories/*/files/**}"
306    };
307    option (google.api.method_signature) = "name";
308  }
309
310  // Lists tags.
311  rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
312    option (google.api.http) = {
313      get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
314    };
315    option (google.api.method_signature) = "parent";
316  }
317
318  // Gets a tag.
319  rpc GetTag(GetTagRequest) returns (Tag) {
320    option (google.api.http) = {
321      get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
322    };
323    option (google.api.method_signature) = "name";
324  }
325
326  // Creates a tag.
327  rpc CreateTag(CreateTagRequest) returns (Tag) {
328    option (google.api.http) = {
329      post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
330      body: "tag"
331    };
332    option (google.api.method_signature) = "parent,tag,tag_id";
333  }
334
335  // Updates a tag.
336  rpc UpdateTag(UpdateTagRequest) returns (Tag) {
337    option (google.api.http) = {
338      patch: "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
339      body: "tag"
340    };
341    option (google.api.method_signature) = "tag,update_mask";
342  }
343
344  // Deletes a tag.
345  rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
346    option (google.api.http) = {
347      delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
348    };
349    option (google.api.method_signature) = "name";
350  }
351
352  // Updates the IAM policy for a given resource.
353  rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
354      returns (google.iam.v1.Policy) {
355    option (google.api.http) = {
356      post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy"
357      body: "*"
358    };
359  }
360
361  // Gets the IAM policy for a given resource.
362  rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
363      returns (google.iam.v1.Policy) {
364    option (google.api.http) = {
365      get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy"
366    };
367  }
368
369  // Tests if the caller has a list of permissions on a resource.
370  rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
371      returns (google.iam.v1.TestIamPermissionsResponse) {
372    option (google.api.http) = {
373      post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions"
374      body: "*"
375    };
376  }
377
378  // Retrieves the Settings for the Project.
379  rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) {
380    option (google.api.http) = {
381      get: "/v1/{name=projects/*/projectSettings}"
382    };
383    option (google.api.method_signature) = "name";
384  }
385
386  // Updates the Settings for the Project.
387  rpc UpdateProjectSettings(UpdateProjectSettingsRequest)
388      returns (ProjectSettings) {
389    option (google.api.http) = {
390      patch: "/v1/{project_settings.name=projects/*/projectSettings}"
391      body: "project_settings"
392    };
393    option (google.api.method_signature) = "project_settings,update_mask";
394  }
395
396  // Retrieves the VPCSC Config for the Project.
397  rpc GetVPCSCConfig(GetVPCSCConfigRequest) returns (VPCSCConfig) {
398    option (google.api.http) = {
399      get: "/v1/{name=projects/*/locations/*/vpcscConfig}"
400    };
401    option (google.api.method_signature) = "name";
402  }
403
404  // Updates the VPCSC Config for the Project.
405  rpc UpdateVPCSCConfig(UpdateVPCSCConfigRequest) returns (VPCSCConfig) {
406    option (google.api.http) = {
407      patch: "/v1/{vpcsc_config.name=projects/*/locations/*/vpcscConfig}"
408      body: "vpcsc_config"
409    };
410    option (google.api.method_signature) = "vpcsc_config,update_mask";
411  }
412}
413
414// Metadata type for longrunning-operations, currently empty.
415message OperationMetadata {}
416