service.proto 12 KB

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