gdcloud compute instances add-metadata

이름

gdcloud compute instances add-metadata - 가상 머신 인스턴스의 메타데이터를 추가합니다.

개요

gdcloud compute instances add-metadata INSTANCE_NAME [flags]

EXAMPLES

To add metadata for key "example-key" for a virtual machine instance named "example-instance" in project "example-project in non multi zone environment", run:

    gdcloud compute instances add-metadata example-instance --project example-project --metadata=example-key="example value"

To add metadata for key "example-key" for a virtual machine instance named "example-instance" in project "example-project in multi zone environment", run:

    gdcloud compute instances add-metadata example-instance --project example-project --metadata=example-key="example value --zone=zone1"

To add metadata under key "important-data" to an instance named "example-instance" using file "example-file in non multi zone environment", run:

    gdcloud compute instances add-metadata example-instance --project example-project --metadata-from-file=important-data=example-file.txt

To add metadata under key "important-data" to an instance named "example-instance" using file "example-file in multi zone environment", run:

    gdcloud compute instances add-metadata example-instance --project example-project --metadata-from-file=important-data=example-file.txt --zone=zone1

선택적 플래그

      --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 [])
      --zone string                         Zone to use for this invocation. To preset the zone flag for all commands that require it, run: "gdcloud config set core/zone ZONE". The zone flag is available only in multi-zone environments.

GDCLOUD 전체 플래그

이러한 플래그는 모든 명령어에서 사용할 수 있습니다. --configuration, --format, --help, --project, --quiet

자세한 내용은 gdcloud CLI 참조 개요 페이지를 참고하세요.