---
title: "Create Elastigroup"
method: POST
path: "/gcp/gce/group"
tags: ["Elastigroup GCP"]
---

# Create Elastigroup

`POST /gcp/gce/group`

Create a new GCP Elastigroup

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `group` object, required
    - `id` string — GCP Elastigroup
    - `name` string, required — GCP Elastigroup Name
    - `description` string — Description for your GCP Elastigroup
    - `capacity` object, required
      - `target` integer, required — Current scale the Elastigroup will conform to.
      - `minimum` integer, required — The Elastigroup will not set a target below this value.
      - `maximum` integer, required — The Elastigroup will not set a target greater than this value.
      - `unit` string — The base capacity unit.
    - `scheduling` object
      - `tasks` object[]
        - `isEnabled` boolean
        - `taskType` string
        - `cronExpression` string
        - `targetCapacity` integer
        - `minCapacity` integer
        - `maxCapacity` integer
    - `strategy` object, required
      - `fallbackToOd` boolean, required
      - `optimizationWindows` string[]
      - `provisioningModel` 'SPOT' | 'PREEMPTIBLE' — Define the provisioning model of the launched instances
      - `revertToPreemptible` object
        - `performAt` string, required
      - `preemptiblePercentage` integer, required — percentage of Preemptible instances in the Elastigroup. The remaining percentage will be On-Demand instances.
      - `onDemandCount` integer, required — 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, required
      - `launchSpecification` object, required
        - `metadata` object[]
          - `key` string
          - `value` string
        - `tags` string[]
        - `backendServiceConfig` object
          - `backendServices` object[]
            - `backendServiceName` string, required
            - `locationType` string
            - `scheme` string
            - `namedPorts` object
              - …
            - `backendBalancing` object — Configure how traffic is distributed across instance groups.
              - …
        - `disks` object[], required
          - `deviceName` string
          - `initializeParams` object
            - `diskSizeGb` integer
            - `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
          - `mode` string
          - `source` string
          - `type` string
          - `autoDelete` boolean
          - `boot` boolean
          - `interface` string
        - `networkInterfaces` object[], required
          - `network` string, required
          - `projectId` string
        - `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
        - `shutdownScript` string
        - `ipForwarding` boolean
        - `minCpuPlatform` string
        - `instanceNamePrefix` string — Set an instance name prefix to be used for all launched instances and their boot disk. The prefix value should comply with the following limitations: * A recommended length of up to 30 characters. * A maximum length of 36 characters. Note: the GroupId suffix will be removed from the instance name once using over 30 characters. * The first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.
      - `instanceTypes` object
        - `ondemand` string, required — The type of On Demand instances to utilize
        - `preemptible` string[], required — The type of Preemptible instances to utilize
        - `custom` Custom — unresolved $ref
        - `preferred` Preferred — unresolved $ref
      - `availabilityZones` string[], required — Availability zones for the group
      - `health` object — Set health check and auto-healing of unhealthy VMs according to GCP Backend Services.
        - `healthCheckType` 'K8S_NODE' | 'BACKEND_SERVICE', 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.
      - `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
        - `type` string
        - `count` integer
      - `subnets` object[], required — Subnets your group is associated with
        - `region` string
        - `subnetNames` string[]
    - `scaling` object
      - `up` object[]
        - `policyName` string
        - `source` string
        - `metricName` string
        - `statistic` string
        - `unit` string
        - `threshold` integer
        - `namespace` string
        - `period` integer
        - `evaluationPeriods` integer
        - `cooldown` integer
        - `operator` string
        - `dimensions` object[]
          - `name` string
          - `value` string
        - `action` object
          - `type` string
          - `adjustment` integer
      - `down` object[]
        - `policyName` string
        - `source` string
        - `metricName` string
        - `statistic` string
        - `unit` string
        - `threshold` integer
        - `namespace` string
        - `period` integer
        - `evaluationPeriods` integer
        - `cooldown` integer
        - `operator` string
        - `dimensions` object[]
          - `name` string
          - `value` string
        - `action` object
          - `type` string
          - `adjustment` integer
    - `thirdPartiesIntegration` object
      - `dockerSwarm` object
        - `masterHost` string
        - `masterPort` integer
      - `gke` object
        - `autoUpdate` boolean
        - `autoScale` object
          - `isEnabled` boolean
          - `isAutoConfig` boolean
          - `cooldown` integer
          - `headroom` object
            - `cpuPerUnit` integer
            - `memoryPerUnit` integer
            - `numOfUnits` integer
          - `down` object
            - `evaluationPeriods` integer
        - `clusterIdentifier` string
        - `location` string
    - `createdAt` string, date-time — The datetime the group was created.
    - `updatedAt` string, date-time — The datetime the group was last updated.

## 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)
