To add metadata for key "example-key" for a virtual machine instance named "example-instance" in project "example-project", run:
gdcloud compute instances add-metadata example-instance --project example-project --metadata=example-key="example value"
To add metadata under key "important-data" to an instance named "example-instance" using file "example-file"
gdcloud compute instances add-metadata example-instance --project example-project \
--metadata-from-file=important-data=example-file.txt
선택적 플래그
--metadata stringToString List of comma-separated key-value pair metadata to add to the virtual machine instance.
For example, --metadata=key1="val1",key2="val2". At least one of the flags --metadata or --metadata-from-file is required. (default [])
--metadata-from-file stringToString List of comma-separated KEY=LOCAL_FILE_PATH metadata to add to the virtual machine instance. The value of the key is read from the file provided.
For example, --metadata-from-file=key1=filepath1,key2=filepath2. At least one of the flags --metadata or --metadata-from-file is required. (default [])
GDCLOUD 전체 플래그
이러한 플래그는 모든 명령어에서 사용할 수 있습니다(--configuration, --format, --help, --project, --quiet).
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# gdcloud compute instances add-metadata\n\nNAME\n----\n\ngdcloud compute instances add-metadata - Add metadata for a virtual machine instance.\n\nSYNOPSIS\n--------\n\n gdcloud compute instances add-metadata INSTANCE_NAME [flags]\n\n### EXAMPLES\n\n To add metadata for key \"example-key\" for a virtual machine instance named \"example-instance\" in project \"example-project\", run:\n\n gdcloud compute instances add-metadata example-instance --project example-project --metadata=example-key=\"example value\"\n\n To add metadata under key \"important-data\" to an instance named \"example-instance\" using file \"example-file\"\n gdcloud compute instances add-metadata example-instance --project example-project \\\n --metadata-from-file=important-data=example-file.txt\n\n### OPTIONAL FLAGS\n\n --metadata stringToString List of comma-separated key-value pair metadata to add to the virtual machine instance.\n For example, --metadata=key1=\"val1\",key2=\"val2\". At least one of the flags --metadata or --metadata-from-file is required. (default [])\n --metadata-from-file stringToString List of comma-separated KEY=LOCAL_FILE_PATH metadata to add to the virtual machine instance. The value of the key is read from the file provided.\n For example, --metadata-from-file=key1=filepath1,key2=filepath2. At least one of the flags --metadata or --metadata-from-file is required. (default [])\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-reference/gdcloud) page."]]