/// <summary> /// Creates a node pool for a cluster. /// Documentation https://developers.google.com/container/v1/reference/nodePools/create /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated container service.</param> /// <param name="projectId">The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).</param> /// <param name="zone">The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.</param> /// <param name="clusterId">The name of the cluster.</param> /// <param name="body">A valid container v1 body.</param> /// <returns>OperationResponse</returns> public static Operation Create(containerService service, string projectId, string zone, string clusterId, CreateNodePoolRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (projectId == null) { throw new ArgumentNullException(projectId); } if (zone == null) { throw new ArgumentNullException(zone); } if (clusterId == null) { throw new ArgumentNullException(clusterId); } // Make the request. return(service.NodePools.Create(body, projectId, zone, clusterId).Execute()); } catch (Exception ex) { throw new Exception("Request NodePools.Create failed.", ex); } }
/// <summary> /// Lists the node pools for a cluster. /// Documentation https://developers.google.com/container/v1/reference/nodePools/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated container service.</param> /// <param name="projectId">The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).</param> /// <param name="zone">The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.</param> /// <param name="clusterId">The name of the cluster.</param> /// <returns>ListNodePoolsResponseResponse</returns> public static ListNodePoolsResponse List(containerService service, string projectId, string zone, string clusterId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (projectId == null) { throw new ArgumentNullException(projectId); } if (zone == null) { throw new ArgumentNullException(zone); } if (clusterId == null) { throw new ArgumentNullException(clusterId); } // Make the request. return(service.NodePools.List(projectId, zone, clusterId).Execute()); } catch (Exception ex) { throw new Exception("Request NodePools.List failed.", ex); } }
/// <summary> /// Gets the specified operation. /// Documentation https://developers.google.com/container/v1/reference/operations/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated container service.</param> /// <param name="projectId">The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).</param> /// <param name="zone">The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.</param> /// <param name="operationId">The server-assigned `name` of the operation.</param> /// <returns>OperationResponse</returns> public static Operation Get(containerService service, string projectId, string zone, string operationId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (projectId == null) { throw new ArgumentNullException(projectId); } if (zone == null) { throw new ArgumentNullException(zone); } if (operationId == null) { throw new ArgumentNullException(operationId); } // Make the request. return(service.Operations.Get(projectId, zone, operationId).Execute()); } catch (Exception ex) { throw new Exception("Request Operations.Get failed.", ex); } }