Agent #
Package : spaceone.api.identity.v2
Agent #
Create Agent with service account , Currently only Kubernetes service account is supported for OpenCost
Agent Methods:
create #
POST /identity/v2/agent/create
service_account_id (string)
Required
options (Struct)
Required
{
"service_account_id": "sa-a120f6d21c4e",
"options": {
"cluster_name": "k8s-prd-cluster",
"kube_state_metrics": "false",
"prometheus_node_exporter": "false"
}
}
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
enable #
POST /identity/v2/agent/enable
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
disable #
POST /identity/v2/agent/disable
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
regenerate #
POST /identity/v2/agent/regenerate
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
delete #
POST /identity/v2/agent/delete
get #
POST /identity/v2/agent/get
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
list #
POST /identity/v2/agent/list
query (Query)
agent_id (string)
service_account_id (string)
state (State)
{
"query": {
"page": {
"start":1,
"limit": 10
}
}
}
results (AgentInfo)
Repeated
Required
total_count (int32)
Required
{
"results": [
{
"agent_id": "agent-5cb52dc61c70",
"options": {
"kube_state_metrics": false,
"cluster_name": "k8s-prd-cluster",
"prometheus_node_exporter": false
},
"client_secret": "client_secret_from_app",
"state": "ENABLED",
"is_managed": true,
"role_type": "WORKSPACE_OWNER",
"domain_id": "domain-116226a1516a",
"workspace_id": "workspace-7a0aebcf4eb2",
"project_id": "project-441975c8dfd8",
"service_account_id": "sa-a120f6d21c4e",
"app_id": "app-aa7bf47c98ea",
"role_id": "managed-workspace-owner",
"client_id": "client-36e1034b3512",
"created_at": "2024-11-13T00:34:09.125Z",
"expired_at": "2025-11-13T00:34:09.000Z"
}
],
"total_count": 1
}
Message #
AgentInfo #
agent_id (string)
Required
options (Struct)
Required
client_secret (string)
Required
state (State)
Required
is_managed (bool)
Required
role_type (RoleType)
Required
domain_id (string)
Required
workspace_id (string)
Required
project_id (string)
Required
service_account_id (string)
Required
app_id (string)
Required
role_id (string)
Required
client_id (string)
Required
created_at (string)
Required
expired_at (string)
Required
last_accessed_at (string)
Required
AgentRequest #
service_account_id (string)
Required
AgentSearchQuery #
query (Query)
agent_id (string)
service_account_id (string)
state (State)
AgentsInfo #
results (AgentInfo)
Repeated
Required
total_count (int32)
Required
CreateAgentRequest #
service_account_id (string)
Required
options (Struct)
Required