Google_InstancesServiceResource

The "instances" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_ComputeService.php  
  1. class Google_InstancesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Adds an access config to an instance's network interface. (instances.addAccessConfig) 
  6. * @param string $project Project name. 
  7. * @param string $zone Name of the zone scoping this request. 
  8. * @param string $instance Instance name. 
  9. * @param string $network_interface Network interface name. 
  10. * @param Google_AccessConfig $postBody 
  11. * @param array $optParams Optional parameters. 
  12. * @return Google_Operation 
  13. */ 
  14. public function addAccessConfig($project, $zone, $instance, $network_interface, Google_AccessConfig $postBody, $optParams = array()) { 
  15. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance, 'network_interface' => $network_interface, 'postBody' => $postBody); 
  16. $params = array_merge($params, $optParams); 
  17. $data = $this->__call('addAccessConfig', array($params)); 
  18. if ($this->useObjects()) { 
  19. return new Google_Operation($data); 
  20. } else { 
  21. return $data; 
  22. /** 
  23. * Deletes the specified instance resource. (instances.delete) 
  24. * @param string $project Name of the project scoping this request. 
  25. * @param string $zone Name of the zone scoping this request. 
  26. * @param string $instance Name of the instance resource to delete. 
  27. * @param array $optParams Optional parameters. 
  28. * @return Google_Operation 
  29. */ 
  30. public function delete($project, $zone, $instance, $optParams = array()) { 
  31. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance); 
  32. $params = array_merge($params, $optParams); 
  33. $data = $this->__call('delete', array($params)); 
  34. if ($this->useObjects()) { 
  35. return new Google_Operation($data); 
  36. } else { 
  37. return $data; 
  38. /** 
  39. * Deletes an access config from an instance's network interface. (instances.deleteAccessConfig) 
  40. * @param string $project Project name. 
  41. * @param string $zone Name of the zone scoping this request. 
  42. * @param string $instance Instance name. 
  43. * @param string $access_config Access config name. 
  44. * @param string $network_interface Network interface name. 
  45. * @param array $optParams Optional parameters. 
  46. * @return Google_Operation 
  47. */ 
  48. public function deleteAccessConfig($project, $zone, $instance, $access_config, $network_interface, $optParams = array()) { 
  49. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance, 'access_config' => $access_config, 'network_interface' => $network_interface); 
  50. $params = array_merge($params, $optParams); 
  51. $data = $this->__call('deleteAccessConfig', array($params)); 
  52. if ($this->useObjects()) { 
  53. return new Google_Operation($data); 
  54. } else { 
  55. return $data; 
  56. /** 
  57. * Returns the specified instance resource. (instances.get) 
  58. * @param string $project Name of the project scoping this request. 
  59. * @param string $zone Name of the zone scoping this request. 
  60. * @param string $instance Name of the instance resource to return. 
  61. * @param array $optParams Optional parameters. 
  62. * @return Google_Instance 
  63. */ 
  64. public function get($project, $zone, $instance, $optParams = array()) { 
  65. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance); 
  66. $params = array_merge($params, $optParams); 
  67. $data = $this->__call('get', array($params)); 
  68. if ($this->useObjects()) { 
  69. return new Google_Instance($data); 
  70. } else { 
  71. return $data; 
  72. /** 
  73. * Returns the specified instance's serial port output. (instances.getSerialPortOutput) 
  74. * @param string $project Name of the project scoping this request. 
  75. * @param string $zone Name of the zone scoping this request. 
  76. * @param string $instance Name of the instance scoping this request. 
  77. * @param array $optParams Optional parameters. 
  78. * @return Google_SerialPortOutput 
  79. */ 
  80. public function getSerialPortOutput($project, $zone, $instance, $optParams = array()) { 
  81. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance); 
  82. $params = array_merge($params, $optParams); 
  83. $data = $this->__call('getSerialPortOutput', array($params)); 
  84. if ($this->useObjects()) { 
  85. return new Google_SerialPortOutput($data); 
  86. } else { 
  87. return $data; 
  88. /** 
  89. * Creates an instance resource in the specified project using the data included in the request. 
  90. * (instances.insert) 
  91. * @param string $project Name of the project scoping this request. 
  92. * @param string $zone Name of the zone scoping this request. 
  93. * @param Google_Instance $postBody 
  94. * @param array $optParams Optional parameters. 
  95. * @return Google_Operation 
  96. */ 
  97. public function insert($project, $zone, Google_Instance $postBody, $optParams = array()) { 
  98. $params = array('project' => $project, 'zone' => $zone, 'postBody' => $postBody); 
  99. $params = array_merge($params, $optParams); 
  100. $data = $this->__call('insert', array($params)); 
  101. if ($this->useObjects()) { 
  102. return new Google_Operation($data); 
  103. } else { 
  104. return $data; 
  105. /** 
  106. * Retrieves the list of instance resources contained within the specified zone. (instances.list) 
  107. * @param string $project Name of the project scoping this request. 
  108. * @param string $zone Name of the zone scoping this request. 
  109. * @param array $optParams Optional parameters. 
  110. * @opt_param string filter Optional. Filter expression for filtering listed resources. 
  111. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100. 
  112. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. 
  113. * @return Google_InstanceList 
  114. */ 
  115. public function listInstances($project, $zone, $optParams = array()) { 
  116. $params = array('project' => $project, 'zone' => $zone); 
  117. $params = array_merge($params, $optParams); 
  118. $data = $this->__call('list', array($params)); 
  119. if ($this->useObjects()) { 
  120. return new Google_InstanceList($data); 
  121. } else { 
  122. return $data; 
  123. /** 
  124. * Sets metadata for the specified instance to the data included in the request. 
  125. * (instances.setMetadata) 
  126. * @param string $project Name of the project scoping this request. 
  127. * @param string $zone Name of the zone scoping this request. 
  128. * @param string $instance Name of the instance scoping this request. 
  129. * @param Google_Metadata $postBody 
  130. * @param array $optParams Optional parameters. 
  131. * @return Google_Operation 
  132. */ 
  133. public function setMetadata($project, $zone, $instance, Google_Metadata $postBody, $optParams = array()) { 
  134. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance, 'postBody' => $postBody); 
  135. $params = array_merge($params, $optParams); 
  136. $data = $this->__call('setMetadata', array($params)); 
  137. if ($this->useObjects()) { 
  138. return new Google_Operation($data); 
  139. } else { 
  140. return $data; 
  141. /** 
  142. * Sets tags for the specified instance to the data included in the request. (instances.setTags) 
  143. * @param string $project Name of the project scoping this request. 
  144. * @param string $zone Name of the zone scoping this request. 
  145. * @param string $instance Name of the instance scoping this request. 
  146. * @param Google_Tags $postBody 
  147. * @param array $optParams Optional parameters. 
  148. * @return Google_Operation 
  149. */ 
  150. public function setTags($project, $zone, $instance, Google_Tags $postBody, $optParams = array()) { 
  151. $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance, 'postBody' => $postBody); 
  152. $params = array_merge($params, $optParams); 
  153. $data = $this->__call('setTags', array($params)); 
  154. if ($this->useObjects()) { 
  155. return new Google_Operation($data); 
  156. } else { 
  157. return $data;