-
Notifications
You must be signed in to change notification settings - Fork 51
Tag Management Guide
ByoungSeob Kim edited this page Mar 19, 2026
·
1 revision
- CB-Spider provides Tag functionality for managed cloud resources across connected CSPs.
- Users can use Tags to group and identify resources, enabling automation of large-scale resource management, cost management, and more.
- A Tag consists of a string Key and a string Value pair. The Key is required, but the Value is optional and can be omitted.
- Users can add Tags to resources in two ways:
-
Setting Tags at resource creation: Include a
TagListin the resource creation request to add multiple Tags at once - Using the Tag Management API on existing resources: Add, retrieve, and delete Tags via the Tag Management REST API
-
Setting Tags at resource creation: Include a
- The Tag Management API provides 4 APIs:
AddTag,ListTag,GetTag,RemoveTag. - Supported resource types: VPC, SUBNET, SG, KEY(keypair), VM, NLB, DISK, MYIMAGE, CLUSTER
┌──────────────────────────────────────────────────────────────────┐
│ CB-Spider Tag Management │
│ │
│ ConnectionName (CSP + Region) │
│ │ │
│ ├── AddTag(ResourceType, ResourceName, Tag) │
│ │ └── Add Tag(Key, Value) │
│ │ │
│ ├── ListTag(ResourceType, ResourceName) │
│ │ └── List all Tags of the resource │
│ │ │
│ ├── GetTag(ResourceType, ResourceName, Key) │
│ │ └── Get a specific Tag (by Key) │
│ │ │
│ └── RemoveTag(ResourceType, ResourceName, Key) │
│ └── Remove a specific Tag (by Key) │
│ │
│ Supported Resource Types │
│ VPC, SUBNET, SG, KEY(keypair), VM, NLB, │
│ DISK, MYIMAGE, CLUSTER │
└──────────────────────────────────────────────────────────────────┘
-
The Tag support status per CSP and resource type is as follows:
Provider VPC Subnet SecurityGroup VM KeyPair VM Disk MyImage NLB Cluster AWS O O O O O O O O O Azure O - O O O O O O O GCP - - - - O O - - O Alibaba △ △ O O O O O O - Tencent O O O O O O O O O IBM O O O O O O O O O OpenStack O O O - O - - O - KT Classic - - - - O O O - - ※ △: Tagging is only supported at resource creation time ※ - : The CSP does not provide Tagging for this resource ※ NHN, NCP, KT VPC: Tagging is not supported - Tag API calls return the following error message: "nhn-config does not support TagHandler"※ Handling Tag API calls for unsupported resources: (1) Tag setting at resource creation: The resource is created, but Tags are not added (no log output) (2) Adding Tags to an existing resource: Returns a common error message (Error Log output) • format: "[TAG_NOT_SUPPORTED] Tagging is not supported for the resource: {CSP}-{RESOURCE}" • example: "[TAG_NOT_SUPPORTED] Tagging is not supported for the resource: GCP-keypair"
- The target CSP Connection must be properly registered.
- The target resource (VPC, VM, etc.) to add/retrieve Tags for must already be created.
- Users can retrieve Tag information in JSON format using the following CB-Spider REST API.
# Add a Tag
POST /spider/tag - Add Tag
# List all Tags
GET /spider/tag - List Tags
# Get a specific Tag
GET /spider/tag/{Key} - Get Tag
# Remove a Tag
DELETE /spider/tag/{Key} - Remove Tag
AddTag (POST /spider/tag)
| Parameter | Description | Example |
|---|---|---|
| ConnectionName | Target Connection name | aws-seoul-config |
| ReqInfo.ResourceType | Resource type |
VPC, VM, SG, etc. |
| ReqInfo.ResourceName | Resource name |
vpc-01, my-vm
|
| ReqInfo.Tag | Tag to add (Key, Value pair) | {"Key": "env", "Value": "prod"} |
ListTag (GET /spider/tag)
| Parameter | Description | Example |
|---|---|---|
| ConnectionName | Target Connection name | aws-seoul-config |
| ResourceType | Resource type |
VPC, VM, etc. |
| ResourceName | Resource name | vpc-01 |
GetTag (GET /spider/tag/{Key})
| Parameter | Description | Example |
|---|---|---|
| ConnectionName | Target Connection name | aws-seoul-config |
| ResourceType | Resource type |
VPC, VM, etc. |
| ResourceName | Resource name | vpc-01 |
| Key | Key of the Tag to retrieve | env |
RemoveTag (DELETE /spider/tag/{Key})
| Parameter | Description | Example |
|---|---|---|
| ConnectionName | Target Connection name | aws-seoul-config |
| ReqInfo.ResourceType | Resource type |
VPC, VM, etc. |
| ReqInfo.ResourceName | Resource name | vpc-01 |
| Key | Key of the Tag to remove | env |
| Resource Type | Value | Description |
|---|---|---|
| VPC | VPC |
Virtual Private Cloud |
| Subnet | SUBNET |
Subnet |
| Security Group | SG |
Security Group |
| KeyPair | KEY |
VM SSH KeyPair |
| VM | VM |
Virtual Machine |
| NLB | NLB |
Network Load Balancer |
| Disk | DISK |
Disk (Volume) |
| MyImage | MYIMAGE |
VM Snapshot Image |
| Cluster | CLUSTER |
Kubernetes Cluster |
Tag Information (KeyValue)
| Field | Description | Example |
|---|---|---|
| Key | Tag key |
env, team, project
|
| Value | Tag value |
production, backend, spider
|
ListTag Response Format
| Field | Description |
|---|---|
| tag | List of Tags (KeyValue array) |
| resourceType | Human-readable name of the resource type |
curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX POST 'http://localhost:1024/spider/tag' \
-H 'Content-Type: application/json' \
-d '{
"ConnectionName": "aws-seoul-config",
"ReqInfo": {
"ResourceType": "VPC",
"ResourceName": "vpc-01",
"Tag": {
"Key": "env",
"Value": "production"
}
}
}' | jqResponse Example:
{
"Key": "env",
"Value": "production"
}curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX GET \
'http://localhost:1024/spider/tag?ConnectionName=aws-seoul-config&ResourceType=VPC&ResourceName=vpc-01' | jqResponse Example:
{
"tag": [
{
"Key": "env",
"Value": "production"
},
{
"Key": "team",
"Value": "backend"
},
{
"Key": "Name",
"Value": "vpc-01"
}
],
"resourceType": "VPC"
}curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX GET \
'http://localhost:1024/spider/tag/env?ConnectionName=aws-seoul-config&ResourceType=VPC&ResourceName=vpc-01' | jqResponse Example:
{
"Key": "env",
"Value": "production"
}curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX DELETE 'http://localhost:1024/spider/tag/env' \
-H 'Content-Type: application/json' \
-d '{
"ConnectionName": "aws-seoul-config",
"ReqInfo": {
"ResourceType": "VPC",
"ResourceName": "vpc-01"
}
}' | jqResponse Example:
{
"Result": "true"
}Tags can be added at creation time by including a TagList in the request body of a resource creation API.
curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX POST 'http://localhost:1024/spider/vpc' \
-H 'Content-Type: application/json' \
-d '{
"ConnectionName": "aws-seoul-config",
"ReqInfo": {
"Name": "vpc-01",
"IPv4_CIDR": "10.0.0.0/16",
"SubnetInfoList": [
{
"Name": "subnet-01",
"IPv4_CIDR": "10.0.1.0/24"
}
],
"TagList": [
{"Key": "env", "Value": "production"},
{"Key": "team", "Value": "backend"}
]
}
}' | jq- The resource types that support Tags differ by CSP (refer to Section 2: Tag Support Status by CSP).
- Some CSPs (e.g., Alibaba) only allow Tag settings at resource creation time for certain resources, and Tags cannot be added via the Tag Management API afterward (marked with △).
-
NHN, NCP, KT VPC do not support Tagging. Tag API calls return the following error message:
"<csp>-config does not support TagHandler"
- Handling Tag API calls for unsupported resources:
- Tag setting at resource creation: The resource is created normally, but Tags are not added (no log output)
-
Adding Tags to an existing resource: Returns a common error message (Error log output)
- format:
[TAG_NOT_SUPPORTED] Tagging is not supported for the resource: {CSP}-{RESOURCE} - example:
[TAG_NOT_SUPPORTED] Tagging is not supported for the resource: GCP-keypair
- format:
- Duplicate Keys with the same name cannot be added to the same resource.
- Calling
AddTagwith an already existing Key returns an error.
- If some Tags in the
TagListfail during resource creation:- The created resource is preserved.
- Successfully created Tags are set in the
TagListof the returned information. - Failed Tags return an error message in the following format:
"TaggingError: {Key01, Value01}, {Key05, Value05}: CSP error message"
- The Key value in
GetTagandRemoveTagAPIs must match exactly (partial matching is not supported).
| HTTP Status | Description |
|---|---|
| 200 OK | Request successful |
| 400 Bad Request | Invalid request (missing required parameters, invalid resource type, etc.) |
| 404 Not Found | Target resource not found |
| 500 Internal Server Error | Server internal error or CSP API error |
-
Install & Start Guide
-
Usage Guide
- Usage Overview
- Connection Management
- Region/Zone Info
- Quota Info
- VM Price Info
- VM Image Info
- VM Spec Info
- VPC/Subnet Management
- Security Group Management
- KeyPair Management
- VM Management
- Disk Management
- Network Load Balancer(NLB) Management
- Kubernetes Cluster Management
- Object Storage(S3) Management
- Tag Management
- Cloud Driver Capability Info
- Function Menu
- MetaDB Auto Backup
- How to get CSP Credentials
- Tutorials
- Developer Guide
- Cloud Driver Developer Guide
- Cloud Driver Developer Guide-WIP
- VM SSH Key Development Guide-WIP
- VM User Development Guide
- What is the CSP SDK API Version of drivers
- Region Zone Info and Driver API
- (StartVM TerminateVM) API Call Counts and Waiting
- StartVM and TerminateVM Main Flow of drivers
- VM Root Disk Configuration Guide
- Security Group Rules and Driver API
- Network Load Balancer and Driver API
- VM Snapshot, MyImage and Disk Overview
- Kubernetes and Driver API(PMKS, K8S)
- Tag and Cloud Driver API
- AnyCall API Extension Guide
- How to ...
- How to Use AWS S3 with Credentials
- How to Use Alibaba ECS i1.* Instance Types
- How to provision GPU VMs
- How to test CB Spider with Mock Driver
- How to install CB Spider on WSL2 under 공유기/사설망
- How to install CB Spider on macOS
- How to run CB Spider Container on macOS
- How to get Azure available Regions
- How to profile memory usage in Golang
- [For Cloud-Migrator]