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