service.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.devtools.artifactregistry.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/devtools/artifactregistry/v1/apt_artifact.proto";
  19. import "google/devtools/artifactregistry/v1/artifact.proto";
  20. import "google/devtools/artifactregistry/v1/file.proto";
  21. import "google/devtools/artifactregistry/v1/package.proto";
  22. import "google/devtools/artifactregistry/v1/repository.proto";
  23. import "google/devtools/artifactregistry/v1/settings.proto";
  24. import "google/devtools/artifactregistry/v1/tag.proto";
  25. import "google/devtools/artifactregistry/v1/version.proto";
  26. import "google/devtools/artifactregistry/v1/yum_artifact.proto";
  27. import "google/iam/v1/iam_policy.proto";
  28. import "google/iam/v1/policy.proto";
  29. import "google/longrunning/operations.proto";
  30. import "google/protobuf/empty.proto";
  31. option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1";
  32. option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry";
  33. option java_multiple_files = true;
  34. option java_outer_classname = "ServiceProto";
  35. option java_package = "com.google.devtools.artifactregistry.v1";
  36. option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
  37. option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
  38. // The Artifact Registry API service.
  39. //
  40. // Artifact Registry is an artifact management system for storing artifacts
  41. // from different package management systems.
  42. //
  43. // The resources managed by this API are:
  44. //
  45. // * Repositories, which group packages and their data.
  46. // * Packages, which group versions and their tags.
  47. // * Versions, which are specific forms of a package.
  48. // * Tags, which represent alternative names for versions.
  49. // * Files, which contain content and are optionally associated with a Package
  50. // or Version.
  51. service ArtifactRegistry {
  52. option (google.api.default_host) = "artifactregistry.googleapis.com";
  53. option (google.api.oauth_scopes) =
  54. "https://www.googleapis.com/auth/cloud-platform,"
  55. "https://www.googleapis.com/auth/cloud-platform.read-only";
  56. // Lists docker images.
  57. rpc ListDockerImages(ListDockerImagesRequest) returns (ListDockerImagesResponse) {
  58. option (google.api.http) = {
  59. get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages"
  60. };
  61. option (google.api.method_signature) = "parent";
  62. }
  63. // Gets a docker image.
  64. rpc GetDockerImage(GetDockerImageRequest) returns (DockerImage) {
  65. option (google.api.http) = {
  66. get: "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}"
  67. };
  68. option (google.api.method_signature) = "name";
  69. }
  70. // Imports Apt artifacts. The returned Operation will complete once the
  71. // resources are imported. Package, Version, and File resources are created
  72. // based on the imported artifacts. Imported artifacts that conflict with
  73. // existing resources are ignored.
  74. rpc ImportAptArtifacts(ImportAptArtifactsRequest) returns (google.longrunning.Operation) {
  75. option (google.api.http) = {
  76. post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import"
  77. body: "*"
  78. };
  79. option (google.longrunning.operation_info) = {
  80. response_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse"
  81. metadata_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata"
  82. };
  83. }
  84. // Imports Yum (RPM) artifacts. The returned Operation will complete once the
  85. // resources are imported. Package, Version, and File resources are created
  86. // based on the imported artifacts. Imported artifacts that conflict with
  87. // existing resources are ignored.
  88. rpc ImportYumArtifacts(ImportYumArtifactsRequest) returns (google.longrunning.Operation) {
  89. option (google.api.http) = {
  90. post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import"
  91. body: "*"
  92. };
  93. option (google.longrunning.operation_info) = {
  94. response_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse"
  95. metadata_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata"
  96. };
  97. }
  98. // Lists repositories.
  99. rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) {
  100. option (google.api.http) = {
  101. get: "/v1/{parent=projects/*/locations/*}/repositories"
  102. };
  103. option (google.api.method_signature) = "parent";
  104. }
  105. // Gets a repository.
  106. rpc GetRepository(GetRepositoryRequest) returns (Repository) {
  107. option (google.api.http) = {
  108. get: "/v1/{name=projects/*/locations/*/repositories/*}"
  109. };
  110. option (google.api.method_signature) = "name";
  111. }
  112. // Creates a repository. The returned Operation will finish once the
  113. // repository has been created. Its response will be the created Repository.
  114. rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) {
  115. option (google.api.http) = {
  116. post: "/v1/{parent=projects/*/locations/*}/repositories"
  117. body: "repository"
  118. };
  119. option (google.api.method_signature) = "parent,repository,repository_id";
  120. option (google.longrunning.operation_info) = {
  121. response_type: "google.devtools.artifactregistry.v1.Repository"
  122. metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
  123. };
  124. }
  125. // Updates a repository.
  126. rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) {
  127. option (google.api.http) = {
  128. patch: "/v1/{repository.name=projects/*/locations/*/repositories/*}"
  129. body: "repository"
  130. };
  131. option (google.api.method_signature) = "repository,update_mask";
  132. }
  133. // Deletes a repository and all of its contents. The returned Operation will
  134. // finish once the repository has been deleted. It will not have any Operation
  135. // metadata and will return a google.protobuf.Empty response.
  136. rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) {
  137. option (google.api.http) = {
  138. delete: "/v1/{name=projects/*/locations/*/repositories/*}"
  139. };
  140. option (google.api.method_signature) = "name";
  141. option (google.longrunning.operation_info) = {
  142. response_type: "google.protobuf.Empty"
  143. metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
  144. };
  145. }
  146. // Lists packages.
  147. rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) {
  148. option (google.api.http) = {
  149. get: "/v1/{parent=projects/*/locations/*/repositories/*}/packages"
  150. };
  151. option (google.api.method_signature) = "parent";
  152. }
  153. // Gets a package.
  154. rpc GetPackage(GetPackageRequest) returns (Package) {
  155. option (google.api.http) = {
  156. get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}"
  157. };
  158. option (google.api.method_signature) = "name";
  159. }
  160. // Deletes a package and all of its versions and tags. The returned operation
  161. // will complete once the package has been deleted.
  162. rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) {
  163. option (google.api.http) = {
  164. delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}"
  165. };
  166. option (google.api.method_signature) = "name";
  167. option (google.longrunning.operation_info) = {
  168. response_type: "google.protobuf.Empty"
  169. metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
  170. };
  171. }
  172. // Lists versions.
  173. rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
  174. option (google.api.http) = {
  175. get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions"
  176. };
  177. option (google.api.method_signature) = "parent";
  178. }
  179. // Gets a version
  180. rpc GetVersion(GetVersionRequest) returns (Version) {
  181. option (google.api.http) = {
  182. get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
  183. };
  184. option (google.api.method_signature) = "name";
  185. }
  186. // Deletes a version and all of its content. The returned operation will
  187. // complete once the version has been deleted.
  188. rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) {
  189. option (google.api.http) = {
  190. delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
  191. };
  192. option (google.api.method_signature) = "name";
  193. option (google.longrunning.operation_info) = {
  194. response_type: "google.protobuf.Empty"
  195. metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata"
  196. };
  197. }
  198. // Lists files.
  199. rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) {
  200. option (google.api.http) = {
  201. get: "/v1/{parent=projects/*/locations/*/repositories/*}/files"
  202. };
  203. option (google.api.method_signature) = "parent";
  204. }
  205. // Gets a file.
  206. rpc GetFile(GetFileRequest) returns (File) {
  207. option (google.api.http) = {
  208. get: "/v1/{name=projects/*/locations/*/repositories/*/files/**}"
  209. };
  210. option (google.api.method_signature) = "name";
  211. }
  212. // Lists tags.
  213. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
  214. option (google.api.http) = {
  215. get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
  216. };
  217. option (google.api.method_signature) = "parent";
  218. }
  219. // Gets a tag.
  220. rpc GetTag(GetTagRequest) returns (Tag) {
  221. option (google.api.http) = {
  222. get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  223. };
  224. option (google.api.method_signature) = "name";
  225. }
  226. // Creates a tag.
  227. rpc CreateTag(CreateTagRequest) returns (Tag) {
  228. option (google.api.http) = {
  229. post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
  230. body: "tag"
  231. };
  232. option (google.api.method_signature) = "parent,tag,tag_id";
  233. }
  234. // Updates a tag.
  235. rpc UpdateTag(UpdateTagRequest) returns (Tag) {
  236. option (google.api.http) = {
  237. patch: "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  238. body: "tag"
  239. };
  240. option (google.api.method_signature) = "tag,update_mask";
  241. }
  242. // Deletes a tag.
  243. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
  244. option (google.api.http) = {
  245. delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
  246. };
  247. option (google.api.method_signature) = "name";
  248. }
  249. // Updates the IAM policy for a given resource.
  250. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  251. option (google.api.http) = {
  252. post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy"
  253. body: "*"
  254. };
  255. }
  256. // Gets the IAM policy for a given resource.
  257. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  258. option (google.api.http) = {
  259. get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy"
  260. };
  261. }
  262. // Tests if the caller has a list of permissions on a resource.
  263. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  264. option (google.api.http) = {
  265. post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions"
  266. body: "*"
  267. };
  268. }
  269. // Retrieves the Settings for the Project.
  270. rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) {
  271. option (google.api.http) = {
  272. get: "/v1/{name=projects/*/projectSettings}"
  273. };
  274. option (google.api.method_signature) = "name";
  275. }
  276. // Updates the Settings for the Project.
  277. rpc UpdateProjectSettings(UpdateProjectSettingsRequest) returns (ProjectSettings) {
  278. option (google.api.http) = {
  279. patch: "/v1/{project_settings.name=projects/*/projectSettings}"
  280. body: "project_settings"
  281. };
  282. option (google.api.method_signature) = "project_settings,update_mask";
  283. }
  284. }
  285. // Metadata type for longrunning-operations, currently empty.
  286. message OperationMetadata {
  287. }