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/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/field_mask.proto"; 22 23option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; 24option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; 25option java_multiple_files = true; 26option java_outer_classname = "VPCSCConfigProto"; 27option java_package = "com.google.devtools.artifactregistry.v1"; 28option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; 29option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; 30 31// The Artifact Registry VPC SC config that apply to a Project. 32message VPCSCConfig { 33 option (google.api.resource) = { 34 type: "artifactregistry.googleapis.com/VpcscConfig" 35 pattern: "projects/{project}/locations/{location}/vpcscConfig" 36 }; 37 38 // VPCSCPolicy is the VPC SC policy for project and location. 39 enum VPCSCPolicy { 40 // VPCSC_POLICY_UNSPECIFIED - the VPS SC policy is not defined. 41 // When VPS SC policy is not defined - the Service will use the default 42 // behavior (VPCSC_DENY). 43 VPCSC_POLICY_UNSPECIFIED = 0; 44 45 // VPCSC_DENY - repository will block the requests to the Upstreams for the 46 // Remote Repositories if the resource is in the perimeter. 47 DENY = 1; 48 49 // VPCSC_ALLOW - repository will allow the requests to the Upstreams for the 50 // Remote Repositories if the resource is in the perimeter. 51 ALLOW = 2; 52 } 53 54 // The name of the project's VPC SC Config. 55 // 56 // Always of the form: 57 // projects/{projectID}/locations/{location}/vpcscConfig 58 // 59 // In update request: never set 60 // In response: always set 61 string name = 1; 62 63 // The project per location VPC SC policy that defines the VPC SC behavior for 64 // the Remote Repository (Allow/Deny). 65 VPCSCPolicy vpcsc_policy = 2; 66} 67 68// Gets the VPC SC config for a project. 69message GetVPCSCConfigRequest { 70 // Required. The name of the VPCSCConfig resource. 71 string name = 1 [ 72 (google.api.field_behavior) = REQUIRED, 73 (google.api.resource_reference) = { 74 type: "artifactregistry.googleapis.com/VpcscConfig" 75 } 76 ]; 77} 78 79// Sets the VPCSC config of the project. 80message UpdateVPCSCConfigRequest { 81 // The project config. 82 VPCSCConfig vpcsc_config = 1; 83 84 // Field mask to support partial updates. 85 google.protobuf.FieldMask update_mask = 2; 86} 87