# Google Container Engine API . projects . zones . clusters . nodePools

## Instance Methods

Creates a node pool for a cluster.

Deletes a node pool from a cluster.

Retrieves the node pool requested.

Lists the node pools for a cluster.

### Method Details

`create(projectId, zone, clusterId, body, x__xgafv=None)`

    Creates a node pool for a cluster.

    Args:
      projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
      zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
      clusterId: string, The name of the cluster. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # CreateNodePoolRequest creates a node pool for a cluster.
        "nodePool": { # NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. # The node pool to create.
          "status": "A String", # The status of the nodes in this pool instance.
          "statusMessage": "A String", # [Output only] Additional information about the current status of this node pool instance, if available.
          "name": "A String", # The name of the node pool.
          "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool.
            "A String",
          ],
          "version": "A String", # The version of the Kubernetes of this node.
          "initialNodeCount": 42, # The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.
          "config": { # Parameters that describe the nodes in a cluster. # The node configuration of the pool.
            "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
            "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
            "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added.
              "A String",
            ],
            "metadata": { # The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB.
              "a_key": "A String",
            },
          },
          "selfLink": "A String", # Server-defined URL for the resource.
        },
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.
        "status": "A String", # The current status of the operation.
        "name": "A String", # The server-assigned ID for the operation.
        "zone": "A String", # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place.
        "detail": "A String", # Detailed operation progress, if available.
        "selfLink": "A String", # Server-defined URL for the resource.
        "operationType": "A String", # The operation type.
        "statusMessage": "A String", # If an error has occurred, a textual description of the error.
        "targetLink": "A String", # Server-defined URL for the target of the operation.
      }

`delete(projectId, zone, clusterId, nodePoolId, x__xgafv=None)`

    Deletes a node pool from a cluster.

    Args:
      projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
      zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
      clusterId: string, The name of the cluster. (required)
      nodePoolId: string, The name of the node pool to delete. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.
        "status": "A String", # The current status of the operation.
        "name": "A String", # The server-assigned ID for the operation.
        "zone": "A String", # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place.
        "detail": "A String", # Detailed operation progress, if available.
        "selfLink": "A String", # Server-defined URL for the resource.
        "operationType": "A String", # The operation type.
        "statusMessage": "A String", # If an error has occurred, a textual description of the error.
        "targetLink": "A String", # Server-defined URL for the target of the operation.
      }

`get(projectId, zone, clusterId, nodePoolId, x__xgafv=None)`

    Retrieves the node pool requested.

    Args:
      projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
      zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
      clusterId: string, The name of the cluster. (required)
      nodePoolId: string, The name of the node pool. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.
        "status": "A String", # The status of the nodes in this pool instance.
        "statusMessage": "A String", # [Output only] Additional information about the current status of this node pool instance, if available.
        "name": "A String", # The name of the node pool.
        "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool.
          "A String",
        ],
        "version": "A String", # The version of the Kubernetes of this node.
        "initialNodeCount": 42, # The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.
        "config": { # Parameters that describe the nodes in a cluster. # The node configuration of the pool.
          "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
          "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
          "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added.
            "A String",
          ],
          "metadata": { # The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB.
            "a_key": "A String",
          },
        },
        "selfLink": "A String", # Server-defined URL for the resource.
      }

`list(projectId, zone, clusterId, x__xgafv=None)`

    Lists the node pools for a cluster.

    Args:
      projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
      zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
      clusterId: string, The name of the cluster. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # ListNodePoolsResponse is the result of ListNodePoolsRequest.
        "nodePools": [ # A list of node pools for a cluster.
          { # NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.
            "status": "A String", # The status of the nodes in this pool instance.
            "statusMessage": "A String", # [Output only] Additional information about the current status of this node pool instance, if available.
            "name": "A String", # The name of the node pool.
            "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool.
              "A String",
            ],
            "version": "A String", # The version of the Kubernetes of this node.
            "initialNodeCount": 42, # The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.
            "config": { # Parameters that describe the nodes in a cluster. # The node configuration of the pool.
              "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
              "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
              "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added.
                "A String",
              ],
              "metadata": { # The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB.
                "a_key": "A String",
              },
            },
            "selfLink": "A String", # Server-defined URL for the resource.
          },
        ],
      }