github.com/argoproj/argo-cd/v2@v2.10.9/server/cluster/cluster.proto (about) 1 syntax = "proto3"; 2 option go_package = "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"; 3 4 // Cluster Service 5 // 6 // Cluster Service API performs CRUD actions against cluster resources 7 package cluster; 8 9 import "google/api/annotations.proto"; 10 import "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto"; 11 12 // ClusterID holds a cluster server URL or cluster name 13 message ClusterID { 14 // type is the type of the specified cluster identifier ( "server" - default, "name" ) 15 string type = 1; 16 // value holds the cluster server URL or cluster name 17 string value = 2; 18 } 19 20 // ClusterQuery is a query for cluster resources 21 message ClusterQuery { 22 string server = 1; 23 string name = 2; 24 ClusterID id = 3; 25 } 26 27 message ClusterResponse {} 28 29 message ClusterCreateRequest { 30 github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster cluster = 1; 31 bool upsert = 2; 32 } 33 34 message ClusterUpdateRequest { 35 github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster cluster = 1; 36 repeated string updatedFields = 2; 37 ClusterID id = 3; 38 } 39 40 // ClusterService 41 service ClusterService { 42 43 // List returns list of clusters 44 rpc List(ClusterQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.ClusterList) { 45 option (google.api.http).get = "/api/v1/clusters"; 46 } 47 48 // Create creates a cluster 49 rpc Create(ClusterCreateRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster) { 50 option (google.api.http) = { 51 post: "/api/v1/clusters" 52 body: "cluster" 53 }; 54 } 55 56 // Get returns a cluster by server address 57 rpc Get(ClusterQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster) { 58 option (google.api.http).get = "/api/v1/clusters/{id.value}"; 59 } 60 61 // Update updates a cluster 62 rpc Update(ClusterUpdateRequest) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster) { 63 option (google.api.http) = { 64 put: "/api/v1/clusters/{id.value}" 65 body: "cluster" 66 }; 67 } 68 69 // Delete deletes a cluster 70 rpc Delete(ClusterQuery) returns (ClusterResponse) { 71 option (google.api.http).delete = "/api/v1/clusters/{id.value}"; 72 } 73 74 // RotateAuth rotates the bearer token used for a cluster 75 rpc RotateAuth(ClusterQuery) returns (ClusterResponse) { 76 option (google.api.http).post = "/api/v1/clusters/{id.value}/rotate-auth"; 77 } 78 79 // InvalidateCache invalidates cluster cache 80 rpc InvalidateCache(ClusterQuery) returns (github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Cluster) { 81 option (google.api.http).post = "/api/v1/clusters/{id.value}/invalidate-cache"; 82 } 83 84 }