@@ -10,7 +10,7 @@ import "google/api/annotations.proto";
10
10
import "spaceone/api/core/v2/query.proto" ;
11
11
import "spaceone/api/identity/v2/app.proto" ;
12
12
13
-
13
+ // Create Agent with service account , Currently only Kubernetes service account is supported for OpenCost
14
14
service Agent {
15
15
rpc create (CreateAgentRequest ) returns (AgentInfo ) {
16
16
option (google.api.http ) = {
@@ -62,15 +62,48 @@ service Agent {
62
62
}
63
63
}
64
64
65
+
66
+ //{
67
+ // "service_account_id": "sa-a120f6d21c4e",
68
+ // "options": {
69
+ // "cluster_name": "k8s-prd-cluster",
70
+ // "kube_state_metrics": "false",
71
+ // "prometheus_node_exporter": "false"
72
+ // }
73
+ //}
65
74
message CreateAgentRequest {
66
75
string service_account_id = 1 ;
67
76
google.protobuf.Struct options = 2 ;
68
77
}
69
78
79
+ //{
80
+ // "service_account_id": "sa-a120f6d21c4e"
81
+ //}
70
82
message AgentRequest {
71
83
string service_account_id = 1 ;
72
84
}
73
85
86
+ //{
87
+ // "agent_id": "agent-5cb52dc61c70",
88
+ // "options": {
89
+ // "kube_state_metrics": false,
90
+ // "cluster_name": "k8s-prd-cluster",
91
+ // "prometheus_node_exporter": false
92
+ // },
93
+ // "client_secret": "client_secret_from_app",
94
+ // "state": "ENABLED",
95
+ // "is_managed": true,
96
+ // "role_type": "WORKSPACE_OWNER",
97
+ // "domain_id": "domain-116226a1516a",
98
+ // "workspace_id": "workspace-7a0aebcf4eb2",
99
+ // "project_id": "project-441975c8dfd8",
100
+ // "service_account_id": "sa-a120f6d21c4e",
101
+ // "app_id": "app-aa7bf47c98ea",
102
+ // "role_id": "managed-workspace-owner",
103
+ // "client_id": "client-36e1034b3512",
104
+ // "created_at": "2024-11-13T00:34:09.125Z",
105
+ // "expired_at": "2025-11-13T00:34:09.000Z"
106
+ //}
74
107
message AgentInfo {
75
108
enum State {
76
109
STATE_NONE = 0 ;
@@ -107,6 +140,14 @@ message AgentInfo {
107
140
string last_accessed_at = 33 ;
108
141
}
109
142
143
+ //{
144
+ // "query": {
145
+ // "page": {
146
+ // "start":1,
147
+ // "limit": 10
148
+ // }
149
+ // }
150
+ //}
110
151
message AgentSearchQuery {
111
152
enum State {
112
153
STATE_NONE = 0 ;
@@ -126,6 +167,32 @@ message AgentSearchQuery {
126
167
127
168
}
128
169
170
+ //{
171
+ // "results": [
172
+ // {
173
+ // "agent_id": "agent-5cb52dc61c70",
174
+ // "options": {
175
+ // "kube_state_metrics": false,
176
+ // "cluster_name": "k8s-prd-cluster",
177
+ // "prometheus_node_exporter": false
178
+ // },
179
+ // "client_secret": "client_secret_from_app",
180
+ // "state": "ENABLED",
181
+ // "is_managed": true,
182
+ // "role_type": "WORKSPACE_OWNER",
183
+ // "domain_id": "domain-116226a1516a",
184
+ // "workspace_id": "workspace-7a0aebcf4eb2",
185
+ // "project_id": "project-441975c8dfd8",
186
+ // "service_account_id": "sa-a120f6d21c4e",
187
+ // "app_id": "app-aa7bf47c98ea",
188
+ // "role_id": "managed-workspace-owner",
189
+ // "client_id": "client-36e1034b3512",
190
+ // "created_at": "2024-11-13T00:34:09.125Z",
191
+ // "expired_at": "2025-11-13T00:34:09.000Z"
192
+ // }
193
+ // ],
194
+ // "total_count": 1
195
+ //}
129
196
message AgentsInfo {
130
197
repeated AgentInfo results = 1 ;
131
198
int32 total_count = 2 ;
0 commit comments