From 60e2cc8707172ab8cf4bbf2bb365b34a4f1934aa Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Tue, 2 Oct 2018 14:24:30 -0400 Subject: [PATCH] Show proper response structure in vm.getMetadata example (#169) This updates the documentation for `vm.getMetadata` calls to show the real response structure returned by calls using `Promise`s. - [X] Appropriate docs were updated (if necessary) --- packages/google-cloud-compute/src/vm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/google-cloud-compute/src/vm.js b/packages/google-cloud-compute/src/vm.js index 0886d8cd3ef..526be69abb2 100644 --- a/packages/google-cloud-compute/src/vm.js +++ b/packages/google-cloud-compute/src/vm.js @@ -227,8 +227,12 @@ function VM(zone, name) { * // If the callback is omitted, we'll return a Promise. * //- * vm.getMetadata().then(function(data) { + * // Representation of this VM as the API sees it. * const metadata = data[0]; * const apiResponse = data[1]; + * + * // Custom metadata and predefined keys. + * const customMetadata = metadata.metadata; * }); */ getMetadata: true,