---
title: "Update Elastigroup"
method: PUT
path: "/gcp/gce/group/{groupId}"
tags: ["Elastigroup GCP"]
---

# Update Elastigroup

`PUT /gcp/gce/group/{groupId}`

Update an GCP Elastigroup

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref
- `#/paths/~1aws~1ec2~1group~1%7BgroupId%7D/put/parameters/0` — unresolved $ref

## Request body

- object
  - `group` object, required — Elastigroup Configuration
    - `name` string — GCP Elastigroup Name
    - `description` string — Description for your GCP Elastigroup
    - `capacity` object — Update capacity settings
      - `target` integer — Current scale the Elastigroup will conform to.
      - `minimum` integer — The Elastigroup will not set a target below this value.
      - `maximum` integer — The Elastigroup will not set a target greater than this value.
    - `scheduling` object — Schedule tasks to execute, using CRON expressions.
      - `tasks` object[] — The scheduling tasks for the group.
        - `isEnabled` boolean — Describes whether the task is enabled. When true the task should run when false it should not run.
        - `taskType` string, required — The task type to run. / Valid Values: 'setCapacity'. Required on scheduling.tasks object.
        - `cronExpression` string — A valid cron expression. For example : * * * * * .The cron is running in UTC time zone and is in Unix cron format Cron Expression Validator Script. Only one of ‘frequency’ or ‘cronExpression’ should be used at a time.
        - `targetCapacity` integer — The target capacity of the group
        - `minCapacity` integer — The min capacity of the group
        - `maxCapacity` integer — The max capacity of the group
    - `strategy` object — Update strategy settings
      - `fallbackToOd` boolean — Activate Fallback to On-Demand. When provisioning an instance, if no Preemptible market is available, Fallback to On-Demand will provision an On-Demand instance to maintain the group capacity.
      - `optimizationWindows` string[] — Set time window to perform the revert to preemptible. time windows must be at least 120 minutes. Format: DayInWeek:HH-DayInWeek:HH. Required when strategy.revertToPreemptible.performAt is 'timeWindow'
      - `provisioningModel` 'SPOT' | 'PREEMPTIBLE' — Define the provisioning model of the launched instances
      - `revertToPreemptible` object — Setting for revert to preemptible option
        - `performAt` 'always' | 'never' | 'timeWindow', required — Required on strategy.revertToPreemptible object
      - `preemptiblePercentage` integer — percentage of Preemptible instances in the Elastigroup. The remaining percentage will be On-Demand instances.
      - `onDemandCount` integer — the exact number of On-Demand instances required in the Elastigroup.
      - `drainingTimeout` integer — The time in seconds, the instance is allowed to run while detached from the ELB.
      - `shouldUtilizeCommitments` boolean — Enable committed use discounts utilization.
    - `compute` object — Compute Configuration
      - `health` object — Set health check and auto-healing of unhealthy VMs according to GCP Backend Services.
        - `healthCheckType` string, required — Health check types to use in order to validate instance health.
        - `autoHealing` boolean — Enable auto-healing of unhealthy instances.
        - `gracePeriod` string — The amount of time (in seconds) after a new instance has launched before terminating the old instance.
        - `unhealthyDuration` integer — Amount of time (in seconds) for the instance to remain unhealthy before a replacement is triggered.
      - `launchSpecification` object — Update compute.launchSpecification settings
        - `metadata` object[] — An array of the following objects, representing Key-Value pair meta data for the created instances
          - `key` string — The meta data’s key
          - `value` string — The meta data’s value
        - `tags` string[] — Tags to mark instances created.
        - `backendServiceConfig` object — Configure Backend Services.
          - `backendServices` object[] — Configure the Backend Service to connect the Elastigroup to
            - `backendServiceName` string, required — The name of the Backend Service. Required on compute.launchSpecification.backendServiceConfig.backendServices object
            - `locationType` string — Which locations the backend service should be active. Possible values should be: 'regional' 'global'
            - `scheme` 'INTERNAL' | 'EXTERNAL' | 'null' — In case the locationType is 'regional' we can set the traffic for the backend service, / between the instances in the vpc / traffic from the internet
            - `namedPorts` object — Key-Value of port name and and port tuples.
              - …
            - `backendBalancing` object — Configure how traffic is distributed across instance groups.
              - …
        - `disks` object[] — Array of disks associated with this instance. Persistent disks must be created before you can assign them
          - `deviceName` string — Specifies a unique device name of your choice
          - `initializeParams` object — Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance
            - `diskSizeGb` integer — Specifies the size of the disk in base-2 GB
            - `diskType` string — Specifies the disk type to use to create the instance. The default is null (GCP default value will be applied). Valid values: pd-ssd, pd-standard, pd-balanced, pd-extreme, hyperdisk-balanced, hyperdisk-balanced-high-availability.
            - `sourceImage` string — A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. Required for compute.launchSpecification.disks.initializeParams object
          - `mode` string — The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode
          - `source` string — Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
          - `type` string — Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT
          - `autoDelete` boolean — Specifies whether the disk will be auto-deleted when the instance is deleted.
          - `boot` boolean — Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem
          - `interface` string — Specifies the disk interface to use for attaching this disk, which is either SCSI or NVM. The default is SCSI
        - `networkInterfaces` object[] — An array of the following objects, representing network configuration for the created instances
          - `network` string, required — Network resource for this instance elastic for the created instances
          - `projectId` string — Use network resource from different project. set project ID to use it's network resource. This parameter relevant only If the network resource is in different project
        - `shieldedInstanceConfig` object — You can use secure boot when you launch VMs using Elastigroup. This helps you comply with your security policies. In the instance configuration, use ‘secureBootEnabled’ set to True to enforce UEFI with secure boot. Elastigroup provisions VMs with secure boot, as long as the images supports UEFI.
          - `enableSecureBoot` boolean
          - `enableIntegrityMonitoring` boolean
        - `startupScript` string — Create and run your own startup scripts on your virtual machines to perform automated tasks every time your instance boots up.
        - `shutdownScript` string — The Base64-encoded shutdown script to execute prior to instance termination. For more information please see: Shutdown Script
        - `ipForwarding` boolean — IP Forwarding Criteria
        - `minCpuPlatform` string — Set instance CPU platform
      - `instanceTypes` object — Instance Types Configuration
        - `ondemand` string, required — The type of On Demand instances to utilize
        - `preemptible` string[], required — The type of Preemptible instances to utilize
        - `custom` object — The custom types instances to utilize
          - `vCPU` integer
          - `memoryGiB` integer
        - `preferred` object — prioritize instance types when launching instances for the group. <a style=color:red>Must be a sublist of the general instance types.</a>
          - `preemptible` string[] — The type of Preemptible instances to utilize
          - `custom` Custom — unresolved $ref
      - `availabilityZones` string[] — Availability zones for the group
      - `preferredAvailabilityZones` string[] — prioritize availability zones when launching instances for the group <a style=color:red>Must be a sublist of compute.availabilityZones.</a>
      - `gpu` object — Cpu Type
        - `type` string
        - `count` integer
      - `subnets` object[] — Subnets your group is associated with
        - `region` string
        - `subnetNames` string[]
    - `scaling` object — Update scaling settings
      - `up` object[] — Update scaling up settings
        - `policyName` string — Scaling policy name
        - `source` string — The source of the metric. Valid values: spectrum, stackdriver
        - `metricName` string, required — The name of the metric. Default value is instance/cpu/utilization. Required on scaling.up object
        - `statistic` string — The metric aggregator to return. Valid values: average, sum, min, max
        - `unit` 'seconds' | 'microseconds' | 'milliseconds' | 'bytes' | 'kilobytes' | 'megabytes' | 'gigabytes' | 'terabytes' | 'bits' | 'kilobits' | 'megabits' | 'gigabits' | 'terabits' | 'percent' | 'count' | 'bytes/second' | 'kilobytes/second' | 'megabytes/second' | 'gigabytes/second' | 'terabytes/second' | 'bits/second' | 'kilobits/second' | 'megabits/second' | 'gigabits/second' | 'terabits/second' | 'count/second' | 'none' — The unit for the alarm’s associated metric.
        - `threshold` integer, required — The value against which the specified statistic is compared. Required on scaling.up object
        - `namespace` string, required — The namespace for the associated metric. Valid value: compute Required on scaling.up object
        - `period` integer — The period in seconds over which the statistic is applied
        - `evaluationPeriods` integer — The number of periods over which data is compared to the specified threshold
        - `cooldown` integer — The amount of time (in seconds) after a scaling activity completes before any further trigger-related scaling activities can start
        - `operator` string — The operator to use in order to determine if the scaling policy is applicable. / Valid Values: gte (greater than or equal to) lte (lower than or equal to)
        - `dimensions` object[] — Set metrics for scaling.up policy
          - `name` string, required — The short labels names for filtering associated metric. For example, the metric instance/disk/read_ops_count is associated with the label compute.googleapis.com/storage_type, the short label name is storage_type
          - `value` string — Value of selected metric.can be Null
        - `action` object — The action to take when scale up is needed.
          - `type` string, required — The type of the action to take when scale up is needed. Valid value: adjustment. Required on scaling.up.action object
          - `adjustment` integer — The number associated with the specified adjustment type. Required if using adjustment as action type.
      - `down` object[] — Update scaling down settings
        - `policyName` string — The policy name
        - `source` string — The source of the metric. Valid values: spectrum, stackdriver
        - `metricName` string, required — The name of the metric. Default value is instance/cpu/utilization. Required on scaling.down object
        - `statistic` string — The metric aggregator to return. Valid values: average, sum, min, max
        - `unit` 'seconds' | 'microseconds' | 'milliseconds' | 'bytes' | 'kilobytes' | 'megabytes' | 'gigabytes' | 'terabytes' | 'bits' | 'kilobits' | 'megabits' | 'gigabits' | 'terabits' | 'percent' | 'count' | 'bytes/second' | 'kilobytes/second' | 'megabytes/second' | 'gigabytes/second' | 'terabytes/second' | 'bits/second' | 'kilobits/second' | 'megabits/second' | 'gigabits/second' | 'terabits/second' | 'count/second' | 'none' — The unit for the alarm’s associated metric.
        - `threshold` integer, required — The value against which the specified statistic is compared. Required on scaling.down object
        - `namespace` string, required — The namespace for the associated metric. Valid Value: compute Required on scaling.down object
        - `period` integer — The period in seconds over which the statistic is applied
        - `evaluationPeriods` integer — The number of periods over which data is compared to the specified threshold.
        - `cooldown` integer — The amount of time (in seconds) after a scaling activity completes before any further trigger-related scaling activities can start.
        - `operator` string — The operator to use in order to determine if the scaling policy is applicable. / Valid Values: gte (greater than or equal to) lte (lower than or equal to)
        - `dimensions` object[] — he short labels names for filtering associated metric. For example, the metric instance/disk/read_ops_count is associated with the label compute.googleapis.com/storage_type, the short label name is storage_type
          - `name` string, required — The short labels names for filtering associated metric. For example, the metric instance/disk/read_ops_count is associated with the label compute.googleapis.com/storage_type, the short label name is storage_type Required on scaling.down.dimensions object
          - `value` string — Value of selected metric.can be Null
        - `action` object — Update the action to take when scale up is needed
          - `type` string, required — The type of the action to take when scale up is needed. Valid value: adjustment Required on scaling.down.action object
          - `adjustment` integer — The number associated with the specified adjustment type. Required if using adjustment as action type
    - `thirdPartiesIntegration` object — Third Parties Integration Configuration
      - `dockerSwarm` object — Properties to connect docker swarm.
        - `masterHost` string — Docker swarm master hostname
        - `masterPort` integer — Docker swarm master port
      - `gke` object — Properties for GKE integration
        - `autoUpdate` boolean — If set to True - we check every 30 minutes if the gke version of the original node pool of the elastigroup was imported from - changed. if so - we re import the new configurations
        - `autoScale` object — Properties for GKE integration auto scaling
          - `isEnabled` boolean — Flag to enable / disable the auto scaling
          - `isAutoConfig` boolean — Flag to enable / disable the headroom configuration
          - `cooldown` integer — Set cooldown (in minutes)
          - `headroom` object — Set headroom configuration
            - `cpuPerUnit` integer — Optionally configure the number of CPUs to allocate the headroom.
            - `memoryPerUnit` integer — Optionally configure the number of memory (MiB) to allocate the headroom.
            - `numOfUnits` integer — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
          - `down` object — Set scale down properties
            - `evaluationPeriods` integer — Set number of evaluation periods for scale down. minimum value is: 3
        - `clusterIdentifier` string — Cluster ID
        - `location` string — Instance Location

## Other responses

- `200` — unresolved $ref
- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
