Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Pools

Represents a Pool resource.

For a list of methods for this resource, see the end of this page.

Resource representations

{
  "name": string,
  "description": string,
  "selfLink": string,
  "type": string,
  "numReplicas": integer,
  "initialNumReplicas": integer,
  "currentNumReplicas": integer,
  "autoRestart": boolean,
  "template": {
    "version": string,
    "vmParams": {
      "machineType": string,
      "baseInstanceName": string,
      "serviceAccounts": [
        {
          "email": string,
          "scopes": [
            string
          ]
        }
      ],
      "description": string,
      "tags": {
        "fingerPrint": string,
        "items": [
          string
        ]
      },
      "networkInterfaces": [
        {
          "network": string,
          "networkIp": string,
          "accessConfigs": [
            {
              "name": string,
              "type": string,
              "natIp": string
            }
          ]
        }
      ],
      "metadata": {
        "fingerPrint": string,
        "items": [
          {
            "key": string,
            "value": string
          }
        ]
      },
      "canIpForward": boolean,
      "onHostMaintenance": string,
      "disksToCreate": [
        {
          "boot": boolean,
          "autoDelete": boolean,
          "attachment": {
            "deviceName": string,
            "index": unsigned integer
          },
          "initializeParams": {
            "sourceImage": string,
            "diskSizeGb": long
          }
        }
      ],
      "disksToAttach": [
        {
          "source": string,
          "attachment": {
            "deviceName": string,
            "index": unsigned integer
          }
        }
      ]
    },
    "action": {
      "commands": [
        string
      ],
      "envVariables": [
        {
          "name": string,
          "value": string,
          "hidden": boolean
        }
      ],
      "timeoutMilliSeconds": integer
    },
    "healthChecks": [
      {
        "name": string,
        "description": string,
        "path": string,
        "host": string,
        "port": integer,
        "checkIntervalSec": integer,
        "timeoutSec": integer,
        "unhealthyThreshold": integer,
        "healthyThreshold": integer
      }
    ]
  },
  "targetPool": string,
  "targetPools": [
    string
  ],
  "resourceViews": [
    string
  ],
  "labels": [
    {
      "key": string,
      "value": string
    }
  ],
  "healthChecks": [
    {
      "name": string,
      "description": string,
      "path": string,
      "host": string,
      "port": integer,
      "checkIntervalSec": integer,
      "timeoutSec": integer,
      "unhealthyThreshold": integer,
      "healthyThreshold": integer
    }
  ],
  "baseInstanceName": string
}
Property name Value Description Notes
autoRestart boolean Whether replicas in this pool should be restarted if they experience a failure. The default value is true .
baseInstanceName string The base instance name to use for the replicas in this pool. This must match the regex [a-z]([-a-z0-9]*[a-z0-9])? . If specified, the instances in this replica pool will be named in the format baseInstanceName - <ID> . The <ID> postfix will be a four character alphanumeric identifier generated by the service.

If this is not specified by the user, the service generates a random base instance name.

currentNumReplicas integer [Output Only] The current number of replicas in the pool.
description string An optional description of the replica pool.
healthChecks[] list Deprecated. Please use template[].healthChecks instead.
healthChecks[]. checkIntervalSec integer How often (in seconds) to make HTTP requests for this healthcheck. The default value is 5 seconds.
healthChecks[]. description string The description for this health check.
healthChecks[]. healthyThreshold integer The number of consecutive health check requests that need to succeed before the replica is considered healthy again. The default value is 2.
healthChecks[]. host string The value of the host header in the HTTP health check request. If left empty (default value), the localhost IP 127.0.0.1 will be used.
healthChecks[]. name string The name of this health check.
healthChecks[]. path string The localhost request path to send this health check, in the format /path/to/use . For example, /healthcheck .
healthChecks[]. port integer The TCP port for the health check requests.
healthChecks[]. timeoutSec integer How long (in seconds) to wait before a timeout failure for this healthcheck. The default value is 5 seconds.
healthChecks[]. unhealthyThreshold integer The number of consecutive health check requests that need to fail in order to consider the replica unhealthy. The default value is 2.
initialNumReplicas integer The number of replicas this pool should have. While this parameter and the numReplicas parameter sets the same property, you set this parameter as numReplicas is deprecated. This number must be larger than or equal to 0.
labels[] list A list of labels to attach to this replica pool and all created virtual machines in this replica pool.
labels[]. key string The key for this label.
labels[]. value string The value of this label.
name string The name of the replica pool. Must follow the regex [a-zA-Z0-9-_]{1,28}
numReplicas integer [Deprecated] The number of replicas this pool should have. This parameter and the initialNumReplicas field set the same property but this parameter is deprecated and you should set the initialNumReplicas parameter instead.
resourceViews[] list The list of resource views that should be updated with all the replicas that are managed by this pool.
targetPool string [Deprecated] , please use targetPools[] instead.
targetPools[] list A list of target pools to update with the replicas that are managed by this pool. If specified, the replicas in this replica pool will be added to the specified target pools for load balancing purposes. The replica pool must live in the same region as the specified target pools. These values must be the target pool resource names, and not fully qualified URLs.
template nested object The template to use when creating replicas in this pool. This template is used during initial instance creation of the pool, when growing the pool in size, or when a replica restarts. You must include at least the vmParams field.
template. action nested object An action to run during initialization of your replicas. An action is run as shell commands which are executed one after the other in the same bash shell, so any state established by one command is inherited by later commands.
template.action. commands[] list A list of commands to run, one per line. If any command fails, the whole action is considered a failure and no further actions are run. This also marks the virtual machine or replica as a failure.
template.action. envVariables[] list A list of environment variables to use for the commands in this action.
template.action.envVariables[]. hidden boolean Specifies whether this variable is hidden or visible.
template.action.envVariables[]. name string The name of the environment variable.
template.action.envVariables[]. value string The value of the variable.
template.action. timeoutMilliSeconds integer If an action on a particular virtual machine does not finish in the timeoutMS , the current command is failed and the replica is considered a failure. No further actions are executed. The command is killed by sending a "kill" signal to the shell process that is running the command. No additional efforts are made to stop any processes that were spawned or created as the result of running the action. The default is the max allowed value, 1 hour (or 3600000 milliseconds).
template. healthChecks[] list A list of HTTP Health Checks to configure for this replica pool and all virtual machines in this replica pool.
template.healthChecks[]. checkIntervalSec integer How often (in seconds) to make HTTP requests for this healthcheck. The default value is 5 seconds.
template.healthChecks[]. description string The description for this health check.
template.healthChecks[]. healthyThreshold integer The number of consecutive health check requests that need to succeed before the replica is considered healthy again. The default value is 2.
template.healthChecks[]. host string The value of the host header in the HTTP health check request. If left empty (default value), the localhost IP 127.0.0.1 will be used.
template.healthChecks[]. name string The name of this health check.
template.healthChecks[]. path string The localhost request path to send this health check, in the format /path/to/use . For example, /healthcheck .
template.healthChecks[]. port integer The TCP port for the health check requests.
template.healthChecks[]. timeoutSec integer How long (in seconds) to wait before a timeout failure for this healthcheck. The default value is 5 seconds.
template.healthChecks[]. unhealthyThreshold integer The number of consecutive health check requests that need to fail in order to consider the replica unhealthy. The default value is 2.
template. version string A free-form string describing the version of this template. You can provide any versioning string you would like. For example, " version1 " or " template-v1. "
template. vmParams nested object The virtual machine parameters to use for these replicas. You can define settings such as the machine type and the image of these replicas.
template.vmParams. baseInstanceName string Deprecated. Please use baseInstanceName instead.
template.vmParams. canIpForward boolean Enables IP forwarding, which allows this instance to receive packets destined for a different IP address, and send packets with a different source IP. See IP Forwarding for more information.
template.vmParams. description string An optional textual description of the instance.
template.vmParams. disksToAttach[] list A list of existing Persistent Disk resources to attach to each replica in the pool. Each disk will be attached in read-only mode to every replica.
template.vmParams.disksToAttach[]. attachment nested object How the disk will be attached to the Replica.
template.vmParams.disksToAttach[].attachment. deviceName string The device name of this disk.
template.vmParams.disksToAttach[].attachment. index unsigned integer A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, this is assigned by the server.
template.vmParams.disksToAttach[]. source string The name of the Persistent Disk resource. The Persistent Disk resource must be in the same zone as the Pool.
template.vmParams. disksToCreate[] list A list of Disk resources to create and attach to each Replica in the Pool. Currently, you can only define one disk and it must be a root persistent disk. Note that Replica Pool will create a root persistent disk for each replica.
template.vmParams.disksToCreate[]. attachment nested object How the disk will be attached to the Replica.
template.vmParams.disksToCreate[].attachment. deviceName string The device name of this disk.
template.vmParams.disksToCreate[].attachment. index unsigned integer A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, this is assigned by the server.
template.vmParams.disksToCreate[]. autoDelete boolean If true , then this disk will be deleted when the instance is deleted. The default value is true .
template.vmParams.disksToCreate[]. boot boolean If true , indicates that this is the root persistent disk.
template.vmParams.disksToCreate[]. initializeParams nested object Create the new disk using these parameters. The name of the disk will be <instance_name>-<four_random_characters> .
template.vmParams.disksToCreate[].initializeParams. diskSizeGb long The size of the created disk in gigabytes.
template.vmParams.disksToCreate[].initializeParams. sourceImage string The name or fully-qualified URL of a source image to use to create this disk. If you provide a name of the source image, Replica Pool will look for an image with that name in your project. If you are specifying an image provided by Compute Engine, you will need to provide the full URL with the correct project, such as:
http://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-wheezy-7-vYYYYMMDD
template.vmParams. machineType string The machine type for this instance. The resource name (e.g. n1-standard-1 ).
template.vmParams. metadata nested object The metadata key/value pairs assigned to this instance.
template.vmParams.metadata. fingerPrint string The fingerprint of the metadata. Required for updating the metadata entries for this instance.
template.vmParams.metadata. items[] list A list of metadata items.
template.vmParams.metadata.items[]. key string A metadata key.
template.vmParams.metadata.items[]. value string A metadata value.
template.vmParams. networkInterfaces[] list A list of network interfaces for the instance. Currently only one interface is supported by Google Compute Engine, ONE_TO_ONE_NAT .
template.vmParams.networkInterfaces[]. accessConfigs[] list An array of configurations for this interface. This specifies how this interface is configured to interact with other network services.
template.vmParams.networkInterfaces[].accessConfigs[]. name string Name of this access configuration.
template.vmParams.networkInterfaces[].accessConfigs[]. natIp string Attaches a reserved external IP address to the replicas in this pool. It is only possible to attach a static IP address to one replica at a time. If you specify a reserved IP address and attempt to create more than one replica, all but one replica will fail.
template.vmParams.networkInterfaces[].accessConfigs[]. type string Type of this access configuration file. Currently only ONE_TO_ONE_NAT is supported.
template.vmParams.networkInterfaces[]. network string Name of the Network resource to which this interface applies.
template.vmParams.networkInterfaces[]. networkIp string An optional IPV4 internal network address to assign to the instance for this network interface.
template.vmParams. onHostMaintenance string Sets the scheduling options for the replicas in this pool. This determines how Compute Engine handles your instances when there is a maintenance event.  You can set one of the following options:

  • " MIGRATE ": Specifies that your instances should be migrated away from maintenance events. Your instance remains running through the migration. Only certain zones currently qualify for migration. See Scheduled maintenance for more information.
  • " TERMINATE ": Terminates and restarts the instance away from the scheduled maintenance event.


template.vmParams. serviceAccounts[] list A list of Service Accounts to enable for this instance.
template.vmParams.serviceAccounts[]. email string The service account email address, for example: [email protected]
template.vmParams.serviceAccounts[]. scopes[] list The list of OAuth2 scopes to obtain for the service account, for example: https://www.googleapis.com/auth/devstorage.full_control
template.vmParams. tags nested object A list of tags to apply to the Google Compute Engine instance to identify resources.
template.vmParams.tags. fingerPrint string The fingerprint of the tag. Required for updating the list of tags.
template.vmParams.tags. items[] list The list of tags that apply to these replicas.
type string The type of replica pool this is. Currently, only SMART_VM is supported to indicate Google Compute Engine virtual machine instances.

Methods

delete
Deletes a pool. This deletes all replicas in the pool, and also deletes the associated virtual machine instances. If you would like to keep any virtual machine instances from being deleted, you can specify the instances in the abandonInstances[] list.
get
Gets information about a single replica pool.
insert
Inserts a new replica pool, using the template provided. This creates a replica pool with the specified number of replicas automatically.
list
Lists all replica pools.
resize
Resizes a pool. This causes the Replica Pool service to remove or add replicas. Note that you cannot select which replicas can be removed.
updatetemplate
Updates the template used by the pool. If you update a template, the new template will only apply to new replicas or to replicas that are restarted.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.