Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To get started, use a query to retrieve all of your VMs from the cloud and select the desired VM. Here we are filtering the VMs using the "hasvmlabel" parameter to select the one that has a text string (in this case "ABQ_2fademetadata") as part of the name, which is an easy way to find a VM that you have located in the UI.

Code Block
titleGET all virtual machines in the cloud, filtering by name
curl -X GET https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?hasvmlabel=ABQ_2fade metadata \
	-H "Accept: application/vnd.abiquo.virtualmachines+json; version=4.27" \ 
	-u user:password --verbose | pjson

...

Expand
titleClick here to show or hide the API response example

Success status code: 200

Response:

Code Block
{
    "totalSize": 1,
    "links": [
        {
            "rel": "first",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?vmlabel=metadata&limit=25&has=ABQ_2fade&by=name&asc=true"
        },
        {
            "rel": "last",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualmachines?vmlabel=metadata&startwith=0&limit=25&has=ABQ_2fade&by=name&asc=true"
        }
    ],
    "collection": [
        {
            "id": 243,
            "uuid": "2fade39ad0876a63-fe594238-44b44182-be3f9d10-b96b63b481535f4f363101b9",
            "namedescription": "ABQ_2fade39a-fe59-44b4-be3f-b96b63b48153root : abiquo",
            "labelcoresPerSocket": "VM_metadata"1,
            "descriptionidState": "A virtual machine"1,
            "cpuidType": 10,
            "ramtype": 48"MANAGED",
            "vdrpEnabledhighDisponibility": true0,
            "vdrpPortmonitored": 0false,
            "idStateprotected": 1false,
            "statevariables": "NOT_ALLOCATED"{},
            "idTypebackuppolicies": 0[],
            "typegenerateGuestInitialPassword": "MANAGED"false,
            "highDisponibilitynatrules": 0[],
            "passwordvdrpEnabled": "uMvMpfyD"true,
            "metadatavdrpPort": null0,
            "monitoredpassword": false"MLiRXdmv",
            "protecteddeallocated": false,
            "variablesname": {}"ABQ_d0876a63-4238-4182-9d10-5f4f363101b9",
            "creationTimestamplabel": 1520865331000"metadatavm",
            "backuppoliciesram": []64,
            "generateGuestInitialPasswordcpu": false1,
            "natrulesstate": []"NOT_ALLOCATED",
            "linkscreationTimestamp": [1583494480000,
                {
"iconUrl": "http://rs.bcn.abiquo.com:9000/public/icons/tinycore.png",
            "links": [
                {
                    "title": "ABQ_2fade39a-fe59-44b4-be3f-b96b63b48153Abiquo",
                    "rel": "editenterprise",
                    "type": "application/vnd.abiquo.virtualmachineenterprise+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloudadmin/virtualdatacenters/2/virtualappliances/2/virtualmachines/24enterprises/1"
                },
                {
                    "title": "AbiquoABQ_d0876a63-4238-4182-9d10-5f4f363101b9",
                    "rel": "enterpriseedit",
                    "type": "application/vnd.abiquo.enterprisevirtualmachine+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admincloud/enterprisesvirtualdatacenters/1"
/virtualappliances/1/virtualmachines/3"
                },
                {
                    "title": "Cloudsend Administratormail",
                    "rel": "usersendmail",
                    "type": "application/vnd.abiquo.usermail+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/publiccloudregions/1/enterprises/1/virtualmachines/3/usersaction/1sendmail"
                },
                {
                    "title": "MJ_backupCloud Administrator",
                    "rel": "virtualdatacenteruser",
                    "type": "application/vnd.abiquo.virtualdatacenteruser+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2admin/enterprises/1/users/1"
                },
                {
                    "title": "vapp_backupbcdc_vdc_01_01_01",
                    "rel": "virtualappliancevirtualdatacenter",
                    "type": "application/vnd.abiquo.virtualappliancevirtualdatacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/21"
                },
                {
                    "title": "metadatabcdc_vapp_aa_aa_aa",
                    "rel": "metadatavirtualappliance",
                    "type": "application/vnd.abiquo.metadatavirtualappliance+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/2/virtualmachines/24/metadata1"
                },
                {
                    "title": "vlan network configurationsmetadata",
                    "rel": "configurationsmetadata",
                    "type": "application/vnd.abiquo.virtualmachinenetworkconfigurationsmetadata+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/network/configurationsmetadata"
                },
                {
                    "title": "nicsvlan network configurations",
                    "rel": "nicsconfigurations",
                    "type": "application/vnd.abiquo.nicsvirtualmachinenetworkconfigurations+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/network/nicsconfigurations"
                },
                {
                    "title": "disksnics",
                    "rel": "harddisksnics",
                    "type": "application/vnd.abiquo.harddisksnics+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/storagenetwork/disksnics"
                },
                {
                    "title": "NOT_ALLOCATEDdisks",
                    "rel": "stateharddisks",
                    "type": "application/vnd.abiquo.virtualmachinestateharddisks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/storage/statedisks"
                },
                {
                    "title": "virtual machine undeployNOT_ALLOCATED",
                    "rel": "undeploystate",
                    "type": "application/vnd.abiquo.acceptedrequestvirtualmachinestate+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/undeploystate"
                },
                {
                    "title": "virtual machine deployundeploy",
                    "rel": "deployundeploy",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/deployundeploy"
                },
                {
                    "title": "virtual machine resetdeploy",
                    "rel": "resetdeploy",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/resetdeploy"
                },
                {
                    "title": "virtual machine snapshotreset",
                    "rel": "instancereset",
                    "type": "application/vnd.abiquo.acceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/instancereset"
                },
                {
                    "title": "remotevirtual machine accesssnapshot",
                    "rel": "rdpaccessinstance",
                    "type": "application/vnd.abiquo.virtualmachineconsoleacceptedrequest+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/configaction/rdpaccessinstance"
                },
                {
                    "title": "tasksremote access",
                    "rel": "tasksrdpaccess",
                    "type": "application/vnd.abiquo.tasksvirtualmachineconsole+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/3/24config/tasksrdpaccess"
                },
                {
                    "title": "firewallstasks",
                    "rel": "firewallstasks",
                    "type": "application/vnd.abiquo.linkstasks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/firewallstasks"
                },
                {
                    "title": "load balancersfirewalls",
                    "rel": "loadbalancersfirewalls",
                    "type": "application/vnd.abiquo.loadbalancerslinks+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/loadbalancersfirewalls"
                },
                {
                    "title": "request on demand backupload balancers",
                    "rel": "requestbackuploadbalancers",
                    "type": "application/vnd.abiquo.ondemandbackuploadbalancers+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/24/backup/action/request3/loadbalancers"
                },
                {
                    "title": "request aon restore ofdemand a backup",
                    "rel": "requestrestorerequestbackup",
                    "type": "application/vnd.abiquo.restoreondemandbackup+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/backup/action/restorerequest"
                },
                {
                    "title": "volumesrequest a restore of a backup",
                    "rel": "volumesrequestrestore",
                    "type": "application/vnd.abiquo.volumesrestore+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/backup/storageaction/volumesrestore"
                },
                {
                    "diskControllerTypetitle": "IDE",move VM to a                  "diskLabel": "Hard disk 1virtual appliance",
                    "lengthrel": "64vappmove",
                    "titletype": "d5c3c598-5086-497f-8ed1-58d9d4138902application/vnd.abiquo.links+json",
                    "relhref": "disk0",
                    "type": "application/vnd.abiquo.harddisk+json",
                    "href": "https://mjsabiquo.bcn.https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/disks/25/1/virtualappliances/1/virtualmachines/3/action/vappmove"
                },
                {
                    "title": "Default Tiermove VM to another virtual datacenter",
                    "rel": "datastoretier0move",
                    "type": "application/vnd.abiquo.datastoretiermovevm+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locationsvirtualdatacenters/1/datastoretiersvirtualappliances/1/virtualmachines/3/action/move"
                },
                {
                    "title": "protectvolumes",
                    "rel": "protectvolumes",
                    "type": "text/plainapplication/vnd.abiquo.volumes+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/actionstorage/protectvolumes"
                },
                {
                    "titlediskController": "unprotectlsilogic",
                    "reldiskControllerType": "unprotectSCSI",
                    "typediskLabel": "text/plainHd",
                    "hreflength": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/24/action/unprotect"100",
                },    "title": "f9693188-5e49-430c-bb38-fc70916dcfb4",
           {                     "title"rel": "metricsmetadatadisk0",
                    "rel": "metricsmetadata",
                    "type": "application/vnd.abiquo.metricsmetadataharddisk+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/2/virtualmachines/24/metricsdisks/5"
                },
                {
                    "title": "enablemonitoringDefault Tier",
                    "rel": "enablemonitoringdatastoretier0",
                    "type": "application/vnd.abiquo.datastoretier+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenterslocations/21/virtualappliances/2/virtualmachines/24/enablemonitoringdatastoretiers/1"
                },
                {
                    "titlediskController": "collectdlsilogic",
                    "reldiskControllerType": "collectdSCSI",
                    "typediskLabel": "application/jsonHd",
                    "hreflength": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/24/metrics/collectd"
                },
                {
       "100",
                    "title": "alarmsd5acae19-9202-4bec-a600-4ee66ef4d26b",
                    "rel": "alarmsdisk1",
                    "type": "application/vnd.abiquo.alarmsharddisk+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/2/virtualmachines/24/alarmsdisks/6"
                },
                {
                    "title": "actionplansDefault Tier",
                    "rel": "actionplansdatastoretier1",
                    "type": "application/vnd.abiquo.virtualmachineactionplansdatastoretier+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenterslocations/21/virtualappliances/2/virtualmachines/24/actionplansdatastoretiers/1"
                },
                {
                    "title": "actionplansflatprotect",
                    "rel": "actionplansflatprotect",
                    "type": "application/vnd.abiquo.virtualmachineactionplansflat+jsontext/plain",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/actionplansprotect"
                },
                {
                    "title": "cloneunprotect",
                    "rel": "cloneunprotect",
                    "type": "application/vnd.abiquo.virtualmachinecloneoptions+jsontext/plain",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/action/cloneunprotect"
                },
                {
                    "title": "KVMmetricsmetadata",
                    "rel": "hypervisortypemetricsmetadata",
                    "type": "application/vnd.abiquo.hypervisortypemetricsmetadata+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/KVM/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/metrics"
                },
                {
                    "title": "yVMenablemonitoring",
                    "rel": "virtualmachinetemplateenablemonitoring",
                    "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admincloud/enterprisesvirtualdatacenters/1/datacenterrepositoriesvirtualappliances/1/virtualmachinetemplatesvirtualmachines/3/enablemonitoring"
                },
                {
                    "title": "Otherscollectd",
                    "rel": "categorycollectd",
                    "type": "application/vnd.abiquo.category+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/metrics/collectd"
                }
            ]
        }
    ],
    "totalSize": 1,
    "duplicatedvms": [] } 

From the VM data object, the link to the VM metadata is the one with the "rel" value of metadata.

Code Block
         
{
                    "title": "
metadata
alarmssearch",
                    "rel": "
metadata
alarmssearch",
                    "type": "application/vnd.abiquo.
metadata
alarms+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/
2
1/virtualappliances/
2
1/virtualmachines/
24
3/
metadata
alarms"
                },

There is also a metadata attribute in the VM with a null value, but the correct way to access metadata is using the metadata link.

Retrieve existing VM metadata

Use the VM metadata link from the step above to retrieve any existing metadata.

Code Block
curl -X GET https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/2/virtualmachines/24/metadata \

            
-H
 
'Accept:application/vnd.abiquo.metadata+json; version=4.2' \
   {
                   
-u
 
user
"title":
password --verbose

When there is no metadata, the query returns a 200 status code, and a data object with an empty links list and a null metadata attribute.

Code Block
{
 "clone",
                    "
links
rel": 
[],
"clone",
       
"metadata": null
             "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/action/clone"
                },
                {
                    "title": "KVM",
                    "rel": "hypervisortype",
                    "type": "application/vnd.abiquo.hypervisortype+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/KVM"
                },
                {
                    "title": "core_duplicate",
                    "rel": "virtualmachinetemplate",
                    "type": "application/vnd.abiquo.virtualmachinetemplate+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/22"
                },
                {
                    "title": "Others",
                    "rel": "category",
                    "type": "application/vnd.abiquo.category+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
                }
            ],
            "usageStatistics": []
        }
    ],
    "duplicatedvms": []
} 


From the VM data object, the link to the VM metadata is the one with the "rel" value of metadata.

Code Block
                {
                    "title": "metadata",
                    "rel": "metadata",
                    "type": "application/vnd.abiquo.metadata+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/metadata"
                },

There is also a metadata attribute in the VM with a null value, but the correct way to access metadata is using the metadata link.

Retrieve existing VM metadata

Use the VM metadata link from the step above to retrieve any existing metadata.

Code Block
curl -X GET https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/3/metadata \
     -H 'Accept:application/vnd.abiquo.metadata+json; version=4.7' \
     -u user:password --verbose

When there is no metadata, the query returns a 200 status code, and a data object with an empty links list and a null metadata attribute.

Code Block
{
    "links": []
}


Optionally enable monitoring, select metrics, and retrieve metadata again

...

The metadata object will now have an empty monitoring-metrics list.

Code Block
{
    "links": [],
    "metadata": {
        "monitoring-metrics": []
    },
    "links": []
} 

Now select one or more metrics to retrieve. Here In the UI we selected two of the built-in metrics from a KVM hypervisor and performed the GET request again. 

Code Block
{
    "links": [],
    "metadata": {
        "monitoring-metrics": [
            {
                "name": "cpuused_timemem"
            },
            {
                "name": "usedcpu_memtime"
            }
        ]
    },
    "links": []
} 

Prepare a metadata object with a VM startup script

...

Add the startup script to the metadata object with the "startup-script" key. Don't forget to add a comma after the previous object.  For our example, after adding the startup script, the metadata object looked like this:

Code Block
{
    "links":
[],     "metadata": {
        "monitoring-metrics": [
            {
                "name": "cpu_time"
            },
            {
                "name": "used_mem"
            }
        ],
        "startup-script": 
"#cloud-config\r\nusers:\r\n  - name: \"myuser\"\r\n  \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n    passwd: \"$6$rounds=4096$aD0didNw\/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk\/\" \r\n    groups:\r\n      - \"sudo\"\r\nssh_authorized_keys:\r\n  - \"ssh-rsa USER_ID_RSA.PUB\"" 
    }},
    "links": []
} 

Update VM metadata

To update the VM metadata, perform a PUT request to the metadata link.

Code Block
curl -X PUT https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/21/virtualappliances/21/virtualmachines/243/metadata \
     -H 'Accept:application/vnd.abiquo.metadata+json; version=4.27' \
     -H 'Content-Type:application/vnd.abiquo.metadata+json; version=4.27' \
     -d @requestpayload.json \
     -u user:password --verbose

...

If the request is successful, it will return a status code of 200 and the updated metadata object.

Code Block
{
    "links": [],
    "metadata": {
        "monitoring-metrics": [
            {
                "name": "cpu_time"
           
},             {
                "name": "used_mem"  {
          }      "name": "used_mem"
 ],         "startup-script": "#cloud-config\r\nusers:\r\n  - name: \"myuser\"\r\n  \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n },
            passwd: \"$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/\" \r\n{
     groups:\r\n      - \"sudo\"\r\nssh_authorized_keys:\r\n    - \"ssh-rsa USER_ID_RSA.PUB\"""name": "cpu_time"
       } }

And that's all! (big grin)

Access metadata as part of the VM

Here we made a GET request to obtain the VM object and we removed the links to make it easier to read. Here, the metadata object is part of the VM but the links list is not shown.

Code Block
    }
    {    ],
        "id": 24,
            "uuid": "2fade39a-fe59-44b4-be3f-b96b63b48153",
    startup-script": "#cloud-config\r\nusers:\r\n  - name: \"myuser\"\r\n  \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n    passwd: \"$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/\" \r\n    groups:\r\n      -  \"name": "ABQ_2fade39a-fe59-44b4-be3f-b96b63b48153",
            "label": "VM_metadata",sudo\"\r\nssh_authorized_keys:\r\n  - \"ssh-rsa USER_ID_RSA.PUB\""
    },
       "descriptionlinks": "A virtual machine",[]
}

And that's all! (big grin)

Access metadata as part of the VM

Here we made a GET request to obtain the VM object and we removed the links to make it easier to read. Here, the metadata object is part of the VM but the links list is not shown.

Code Block
             "cpu": 1, {
            "ramid": 483,
            "vdrpEnableduuid": true"d0876a63-4238-4182-9d10-5f4f363101b9",
            "description"vdrpPort: "root : 0abiquo",
            "idStatecoresPerSocket": 1,
            "stateidState": "NOT_ALLOCATED"1,
            "idType": 0,
            "type": "MANAGED",
            "highDisponibility": 0,
            "password": "uMvMpfyD",
            "metadata": {
                "monitoring-metrics": [
                    {
                        "name": "cpuused_timemem"
                    },
                    {
                        "name": "usedcpu_memtime"
                    }
                ],
                "startup-script": "#cloud-config\r\nusers:\r\n  - name: \"myuser\"\r\n  \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n    passwd: \"$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/\" \r\n    groups:\r\n      - \"sudo\"\r\nssh_authorized_keys:\r\n  - \"ssh-rsa USER_ID_RSA.PUB\""
            },
            "monitored": true,
            "protected": false,
            "variables": {},
            "creationTimestamp": 1520865331000,
            "backuppolicies": [],
            "generateGuestInitialPassword": false,
            "natrules": [],

  ....
        }
 

Although you can read the metadata here, the most correct and convenient way to work with VM metadata is using the metadata link as described in the previous steps.

...