@@ -985,6 +985,58 @@ class VM extends common.ServiceObject {
985
985
callback || common . util . noop
986
986
) ;
987
987
}
988
+ /**
989
+ * Start an instance with customer encrypted disks.
990
+ *
991
+ * @see [Instances: start API Documentation]{@link https://cloud.google.com/compute/docs/reference/rest/v1/instances/startWithEncryptionKey}
992
+ *
993
+ * @param {object[] } disks - An array of the encrypted disks and their keys.
994
+ * @param {function= } callback - The callback function.
995
+ * @param {?error } callback.err - An error returned while making this request.
996
+ * @param {Operation } callback.operation - An operation object
997
+ * that can be used to check the status of the request.
998
+ * @param {object } callback.apiResponse - The full API response.
999
+ *
1000
+ * @example
1001
+ * const Compute = require('@google-cloud/compute');
1002
+ * const compute = new Compute();
1003
+ * const zone = compute.zone('zone-name');
1004
+ * const vm = zone.vm('vm-name');
1005
+ *
1006
+ * var disks = [
1007
+ * {
1008
+ * source: 'disk_name',
1009
+ * diskEncryptionKey: {
1010
+ * rawKey: '...'
1011
+ * }
1012
+ * }
1013
+ * ]
1014
+ *
1015
+ * vm.startWithEncryptionKey(disks, function(err, operation, apiResponse) {
1016
+ * // `operation` is an Operation object that can be used to check the status
1017
+ * // of the request.
1018
+ * });
1019
+ *
1020
+ * //-
1021
+ * // If the callback is omitted, we'll return a Promise.
1022
+ * //-
1023
+ * vm.startWithEncryptionKey(disks).then(function(data) {
1024
+ * const operation = data[0];
1025
+ * const apiResponse = data[1];
1026
+ * });
1027
+ */
1028
+ startWithEncryptionKey ( disks , callback ) {
1029
+ this . request (
1030
+ {
1031
+ method : 'POST' ,
1032
+ uri : '/startWithEncryptionKey' ,
1033
+ json : {
1034
+ disks,
1035
+ } ,
1036
+ } ,
1037
+ callback || common . util . noop
1038
+ ) ;
1039
+ }
988
1040
/**
989
1041
* Stop the instance.
990
1042
*
0 commit comments