Google_Service_Container_ProjectsZonesClusters_Resource

The "clusters" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/Container.php  
  1. class Google_Service_Container_ProjectsZonesClusters_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Creates a cluster, consisting of the specified number and type of Google 
  5. * Compute Engine instances, plus a Kubernetes master instance. 
  6. * The cluster is created in the project's default network. 
  7. * A firewall is added that allows traffic into port 443 on the master, which 
  8. * enables HTTPS. A firewall and a route is added for each node to allow the 
  9. * containers on that node to communicate with all other instances in the 
  10. * cluster. 
  11. * Finally, a route named k8s-iproute-10-xx-0-0 is created to track that the 
  12. * cluster's 10.xx.0.0/16 CIDR has been assigned. (clusters.create) 
  13. * @param string $projectId The Google Developers Console project ID or project 
  14. * number. 
  15. * @param string $zoneId The name of the Google Compute Engine zone in which the 
  16. * cluster resides. 
  17. * @param Google_CreateClusterRequest $postBody 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_Service_Container_Operation 
  20. */ 
  21. public function create($projectId, $zoneId, Google_Service_Container_CreateClusterRequest $postBody, $optParams = array()) 
  22. $params = array('projectId' => $projectId, 'zoneId' => $zoneId, 'postBody' => $postBody); 
  23. $params = array_merge($params, $optParams); 
  24. return $this->call('create', array($params), "Google_Service_Container_Operation"); 
  25.  
  26. /** 
  27. * Deletes the cluster, including the Kubernetes master and all worker nodes. 
  28. * Firewalls and routes that were configured at cluster creation are also 
  29. * deleted. (clusters.delete) 
  30. * @param string $projectId The Google Developers Console project ID or project 
  31. * number. 
  32. * @param string $zoneId The name of the Google Compute Engine zone in which the 
  33. * cluster resides. 
  34. * @param string $clusterId The name of the cluster to delete. 
  35. * @param array $optParams Optional parameters. 
  36. * @return Google_Service_Container_Operation 
  37. */ 
  38. public function delete($projectId, $zoneId, $clusterId, $optParams = array()) 
  39. $params = array('projectId' => $projectId, 'zoneId' => $zoneId, 'clusterId' => $clusterId); 
  40. $params = array_merge($params, $optParams); 
  41. return $this->call('delete', array($params), "Google_Service_Container_Operation"); 
  42.  
  43. /** 
  44. * Gets a specific cluster. (clusters.get) 
  45. * @param string $projectId The Google Developers Console project ID or project 
  46. * number. 
  47. * @param string $zoneId The name of the Google Compute Engine zone in which the 
  48. * cluster resides. 
  49. * @param string $clusterId The name of the cluster to retrieve. 
  50. * @param array $optParams Optional parameters. 
  51. * @return Google_Service_Container_Cluster 
  52. */ 
  53. public function get($projectId, $zoneId, $clusterId, $optParams = array()) 
  54. $params = array('projectId' => $projectId, 'zoneId' => $zoneId, 'clusterId' => $clusterId); 
  55. $params = array_merge($params, $optParams); 
  56. return $this->call('get', array($params), "Google_Service_Container_Cluster"); 
  57.  
  58. /** 
  59. * Lists all clusters owned by a project in the specified zone. 
  60. * (clusters.listProjectsZonesClusters) 
  61. * @param string $projectId The Google Developers Console project ID or project 
  62. * number. 
  63. * @param string $zoneId The name of the Google Compute Engine zone in which the 
  64. * cluster resides. 
  65. * @param array $optParams Optional parameters. 
  66. * @return Google_Service_Container_ListClustersResponse 
  67. */ 
  68. public function listProjectsZonesClusters($projectId, $zoneId, $optParams = array()) 
  69. $params = array('projectId' => $projectId, 'zoneId' => $zoneId); 
  70. $params = array_merge($params, $optParams); 
  71. return $this->call('list', array($params), "Google_Service_Container_ListClustersResponse");