---
title: "Create Elastigroup"
method: POST
path: "/aws/ec2/group"
tags: ["Elastigroup AWS"]
---

# Create Elastigroup

`POST /aws/ec2/group`

Create a new AWS Elastigroup.

There are several third Party Integrations available, which can be activated based on your configuration, such as:
* [Rancher Elastigroup](https://docs.flexera.com/spot/elastigroup/tools-integrations/rancher)
* [Route53 Elastigroup](https://docs.flexera.com/spot/elastigroup/tools-integrations/route53)
* [DockerSwarm Elastigroup](https://docs.flexera.com/spot/elastigroup/tools-integrations/docker-swarm)
* [ECS Elastigroup](https://docs.flexera.com/spot/elastigroup/features/amazon-ecs/elastigroup-for-ecs)
* [Beanstalk Elastigroup](https://docs.flexera.com/spot/elastigroup/tools-integrations/elastic-beanstalk)


  You can create a beanstalk elastigroup with the following steps:
  * [Get the beanstalk configuration](https://spec.dev.spot.io/#operation/elastigroupAwsGetBeanstalkConfiguration) to JSON format
  * Modify required parameters and post the JSON as a body to create a new elastigroup

## Parameters

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

## Request body

- object
  - `group` object, required — Elastigroup Configuration
    - `name` string, required — AWS Elastigroup Name
    - `description` string — Describe your AWS Elastigroup
    - `region` string, required — The AWS region your group will be created in. This parameter is required if you specify subnets (through compute.subnetIds). This parameter is optional if you specify Availability Zones (through compute.availabilityZones).
    - `capacity` object, required — Capacity Configuration
      - `target` integer, required — The number of instances to launch
      - `minimum` integer, required — The lower limit number of instances that you can scale down to
      - `maximum` integer, required — The upper limit number of instances that you can scale up to
      - `unit` 'instance' | 'weight', required — The capacity unit to launch instances by. Note: for groups with integration to K8S / ECS weight option is not supported.
    - `strategy` object, required — Strategy
      - `risk` integer — The percentage of Elastigroup that will run with spot market capacity
      - `onDemandCount` integer — Minimum number of instances that will always be on-demand
      - `availabilityVsCost` 'costOriented' | 'availabilityOriented' | 'balanced' | 'cheapest' | 'equalAzDistribution', required — How Elastigroup determines which instances to add and replace. (please read this article before using [Equal AZ Instance Distribution](https://docs.flexera.com/spot/elastigroup-for-aws/concepts/general-concepts/equal-az-distribution))
      - `fallbackToOd` boolean — When set to `true` Elastigroup will launch On Demand instances if no spot market is available
      - `considerODPricing` boolean — When the value is set to `true`, Elastigroup will prioritize launching On-Demand instances if they are found to be more cost-effective than available Spot markets.
      - `utilizeReservedInstances` boolean — In case of any available Reserved Instances, Elastigroup will utilize them before purchasing Spot instances
      - `utilizeCommitments` boolean — If there are available Reserved Instances or Savings Plans, Elastigroup will utilize them before using Spot instances
      - `restrictSingleAz` boolean — Elastigroup will automatically scale your instances in the most available and cost efficient availability zone. Every evaluation will be done when there are no active instances in the group.
      - `drainingTimeout` integer — The time in seconds to allow the instance be drained from incoming TCP connections and detached from ELB before terminating it, during a scale down operation
      - `maxReplacementsPercentage` integer — The percentage of active instances that can be replaced in parallel. This is used to prevent a large number of instances from being replaced at once.
      - `signals` object[] — The signals defined for this group. For more information refer the below article: [Signals](https://docs.flexera.com/spot/elastigroup-for-aws/concepts/compute-concepts/using-signals-in-elastigroups)
        - `name` 'INSTANCE_READY' | 'INSTANCE_READY_TO_SHUTDOWN' — The name of the signal defined for the group.
        - `timeout` integer — The timeout in seconds to hold the instance until a signal is sent. If no signal is sent the instance will be replaced (INSTANCE_READY) or we will terminate the instance (INSTANCE_READY_TO_SHUTDOWN) after the timeout.
      - `persistence` object[] — You can register persistence (Stateful) recovery arguments
        - `shouldPersistPrivateIp` boolean — Should the instance maintain its private IP
        - `shouldPersistRootDevice` boolean — Should the instance maintain its root device volumes
        - `shouldPersistBlockDevices` boolean — Should the instance maintain its Data volumes
        - `blockDevicesMode` 'reattach' | 'onLaunch' — Determine the way we attach the data volumes to the data devices
      - `revertToSpot` object — Hold settings for strategy correction - replacing On-Demand for Spot instances
        - `performAt` 'never' | 'always' | 'timeWindow' — Settings for maintenance strategy - possible values: timeWindow, never, always. performAt of type: 'never' OR 'timeWindow' can only be applied to groups with "availabilityOriented" OR groups with "persistence", other groups allow either 'always' type or nothing which also means always.
        - `timeWindows` string[] — When performAt is 'timeWindow': must specify a list of 'timeWindows' with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat hh = hour 24 = 0 -23 mm = minute = 0 - 59
      - `scalingStrategy` object — Set termination policy
        - `terminationPolicy` 'default' | 'newestInstance'
    - `compute` object, required
      - `product` 'Linux/UNIX (Amazon VPC)' | 'SUSE Linux (Amazon VPC)' | 'Windows (Amazon VPC)' | 'Red Hat Enterprise Linux (Amazon VPC)' — Operation system type.
      - `elasticIps` string[] — List of ElasticIPs Allocation Ids to associate to the group instances
      - `privateIps` string[] — List of Private IPs to associate to the group instances. Please note: This setting will only apply if rategy.persistence.shouldPersistPrivateIp is set to true.
      - `instanceTypes` object — Instance Types
        - `ondemand` string — Available on demand instance type. Note: Either ondemand or onDemandTypes must be defined, but not both.
        - `onDemandTypes` string[] — Available on demand instance types. Note: Either ondemand or onDemandTypes must be defined, but not both.
        - `spot` string[] — Available Spot Instance types. Note: Cannot be defined if 'resourceRequirements' is defined.
        - `resourceRequirements` object — Required instance attributes. Instance types will be selected based on these requirements.
          - `requiredGpu` object — Required instance GPU
            - `minimum` integer
            - `maximum` integer
          - `requiredVCpu` object, required — Required instance vCPU
            - `minimum` integer
            - `maximum` integer
          - `requiredMemory` object, required — Required instance memory (GiB)
            - `minimum` integer
            - `maximum` integer
          - `excludedInstanceTypes` string[] — Instance types to exclude
          - `excludedInstanceFamilies` string[] — Instance families to exclude
          - `excludedInstanceGenerations` string[] — Instance generations to exclude
        - `preferredSpot` string[] — Prioritized subset of spot instance types. The list must be a subset of the selected spot instance types or meet the resource requirements if defined.
        - `weights` object[] — Custom weight for each instance type (only valid in weight capacity unit)
          - `instanceType` string — The instance type to customize its weight
          - `weightedCapacity` integer — The weight
      - `subnetIds` string[] — A comma-separated list of subnet identifiers for your group. When this parameter is set, compute.availabilityZones should be left unused.
      - `availabilityZones` object[], required — One or more availability Zones for the group. When this parameter is set, compute.subnetIds should be left unused.
        - `name` string, required — The Availability Zone name
        - `subnetIds` string[] — A comma-separated list of subnet identifiers for your group.
        - `placementGroupName` string — specify a Placement Group name, the instances will be launched in the Placement Group for the AZ.
      - `preferredAvailabilityZones` string[] — The AZs to prioritize when launching Spot instances. If no markets are available in the Preferred AZs, Spot instances are launched in the non-preferred AZs. * Must be a sublist of compute.AvailabilityZones * strategy.availabilityVsCost must not be equalAzDistribution
      - `launchSpecification` object, required
        - `creditSpecification` object — creditSpecification is a parameter that indicates in what mode t2/t3 instances will be launched with. It consists of one key: cpuCredits (String)
          - `cpuCredits` 'unlimited' | 'standard'
        - `loadBalancersConfig` object — Elastic Load Balancers configurations
          - `loadBalancers` object[] — List of classic load balancers and/or application load balancer target groups
            - `name` string — The AWS resource name. Required for Classic Load Balancer. Optional for Application Load Balancer.
            - `arn` string — The AWS resource ARN (Required only for ALB target groups)
            - `type` 'CLASSIC' | 'TARGET_GROUP' — The resource type.
        - `itf` object — Contains the configuration details of Intelligent Traffic Flow (ITF).
          - `fixedTargetGroups` boolean — Boolean to control whether to keep the set of target groups fixed. When set to true, all target groups will be created in advance upon create/update group, and will not be deleted even when not being used anymore.
          - `weightStrategy` 'vcpu' | 'custom' — Distribution strategy (either 'vcpu' or 'custom'). 'Custom' strategy can be set only when the group is configured with custom weights.
          - `migrationHealthinessThreshold` integer — Threshold for the minimum healthiness level of the target groups that is needed before activating the ITF rules. Integer representing the percentage of healthy instances within the target groups. Valid values: integer between 0-100.
          - `loadBalancers` object[], required — The load balancer associated with the ITF. Array with a single element.
            - `loadBalancerArn` string, required — Identifier of the load balancer in AWS.
            - `listenerRules` object[], required — The listener rules that should be maintained by ITF. Array with a minimum of 1 element.
              - …
            - `defaultStaticTargetGroups` object[] — A default static target group on the rule. Array with a single element.
              - …
          - `targetGroupConfig` object, required — Contains the configuration details of an ITF target group.
            - `vpcId` string, required — The ID of the AWS VPC for the targets. Valid values: any string which is not empty or null.
            - `healthCheckPath` string, required — The destination for health checks on the targets.
            - `healthCheckProtocol` 'HTTP' | 'HTTPS' — HTTP, HTTPS are already listed under the enum below, no need to repeat.
            - `healthCheckPort` string — The port to use to connect with the target. Valid values: 1-65535 or "traffic-port".
            - `healthCheckIntervalSeconds` integer — The approximate amount of time, in seconds, between health checks of an individual target. Valid values: integer between 5-300.
            - `healthCheckTimeoutSeconds` integer — The amount of time, in seconds, during which no response means a failed health check. Valid values: integer between 2-120.
            - `healthyThresholdCount` integer — The number of consecutive health checks successes required before considering an unhealthy target healthy. Valid values: integer between 2-10.
            - `unhealthyThresholdCount` integer — The number of consecutive health check failures required before considering the target unhealthy. Valid values: integer between 2-10.
            - `port` integer, required — The port on which the targets are listening. Not used if the target is a Lambda function. Valid values: integer between 1-65535.
            - `protocol` 'HTTP' | 'HTTPS', required — The protocol to use for routing traffic to the targets.
            - `protocolVersion` 'GRPC' | 'HTTP1' | 'HTTP2' — The protocol version.
            - `tags` object[] — The tags to assigned with the created target groups
              - …
            - `matcher` object — Matcher to use when checking for a successful response from a target group. One of 'httpCode' or 'grpcCode' is required.
              - …
        - `healthCheckType` 'ELB' | 'HCS' | 'TARGET_GROUP' | 'ECS_CLUSTER_INSTANCE' | 'EC2' | 'OPSWORKS' | 'K8S_NODE' | 'NOMAD_NODE' — The service to use for the health check.
        - `healthCheckGracePeriod` integer — The amount of time, in seconds, after the instance has launched to starts and check its health.
        - `healthCheckUnhealthyDurationBeforeReplacement` integer — The amount of time, in seconds, an existing instance should remain active after becoming unhealthy. After the set time out the instance will be replaced
        - `securityGroupIds` string[], required — One or more security group IDs. In case of update it will override the existing Security Group with the new given array
        - `monitoring` boolean, required — Describes whether instance Enhanced Monitoring is enabled
        - `ebsOptimized` boolean — Enable EBS optimization for supported instance which is not enabled by default. Note - additional charges will be applied.
        - `imageId` string — The ID of the image used to launch the instance. * The following instance types are supported by HVM image: M3, M4, C3, C4, D2, G2, R3, CC2, CC1, CG1, CR1. * The following instance types are supported by PV image: M1, M2, M3, C1, C3. * In case of conflict between Instance type to image type, an error message will be returned
        - `images` object[] — An array of image objects. <br> Elastigroup can be configured with either imageId or images, but not both. <br> * Valid values: null, or an array with at least 1 element. * Multiple AMIs aren't allowed with stateful groups / Stateful Node / Ocean or with the following third-party integrations: ECS / Nomad / Docker Swarm / Kubernetes
          - `id` string, required — Identifier of the image in AWS. Valid values: any string which is not empty or null.
        - `keyPair` string — Specify a Key Pair to attach to the instances
        - `blockDeviceMappings` object[] — Array list of block devices that are exposed to the instance, You can specify virtual devices and EBS volumes.
          - `deviceName` string — Set device name
          - `ebs` object — Set EBS properties
            - `encrypted` boolean
            - `iops` integer — Must be greater than or equal to 0
            - `dynamicIops` object — Set dynamic IOPS properties. When using this object, you cannot use the 'iops' object. You must use one or the other.
              - …
            - `kmsKeyId` string
            - `snapshotId` string
            - `throughput` integer — The amount of data transferred to or from a storage device per second, you can use this param just in a case that volumetype=‘gp3’.
            - `volumeType` string — Set volume type
            - `deleteOnTermination` boolean — Flag to delete the EBS on instance termination
            - `volumeSize` integer — Set volume size (in GB). When using this property - don't use dynamicVolumeSize. Volume size should be greater or equal than the size configured in the AMI
            - `dynamicVolumeSize` object — Set dynamic volume size properties. When using this object, you cannot use volumeSize. You must use one or the other.
              - …
        - `networkInterfaces` object[] — List of network interfaces in an EC2 instance. If you define network interface, please pay attention to omit these properties from other sections in this JSON and set them here: subnetId - compute.availabilityZones
          - `description` string — The description of the network interface. Applies only if creating a network interface when launching an instance.
          - `deviceIndex` integer, required — The position of the network interface in the attachment order. A primary network interface has a device index of 0. If you specify a network interface when launching an instance, you must specify the device index.
          - `secondaryPrivateIpAddressCount` integer — The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses. The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide.
          - `associatePublicIpAddress` boolean — Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.
          - `deleteOnTermination` boolean — If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
          - `networkInterfaceId` string — The ID of the network interface. Used to attach the specified network interface to the instance.
          - `privateIpAddresses` object[] — One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
            - `privateIpAddress` string, required — The private IPv4 address.
            - `primary` boolean, required — Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
          - `subnetId` string — The ID of the subnet to associate with the network interface. Required when creating a new Network Interface, and not attaching an existing one via networkInterfaceId.
          - `associateIpv6Address` boolean — Indicates whether to assign an IPv6 address. Amazon EC2 chooses the IPv6 addresses from the range of the subnet.
        - `iamRole` object — The instance profile iamRole
          - `name` string — The iamRole name
        - `userData` string, byte — The Base64-encoded MIME user data to make available to the instances
        - `shutdownScript` string, byte — The Base64-encoded shutdown script to execute prior to instance termination. For more information please see: [Shutdown Script](https://docs.flexera.com/spot/integration-docs/elastigroup/concepts/compute-concepts/shutdown-scripts/)
        - `tags` object[]
          - `tagKey` string — The tag's key
          - `tagValue` string — The tag's value
        - `resourceTagSpecification` object — Optional field. User will specified which resources should be tagged with group tags.
          - `volumes` object — Optional field. Tag specification for Volume resources.
            - `shouldTag` boolean — Optional field. Volume resources will be tagged with group tags.
          - `snapshots` object — Optional field. Tag specification for Snapshot resources.
            - `shouldTag` boolean — Optional field. Snapshot resources will be tagged with group tags.
          - `enis` object — Optional field. Tag specification for ENI resources.
            - `shouldTag` boolean — Optional field. ENI resources will be tagged with group tags.
          - `amis` object — Optional field. Tag specification for AMI resources.
            - `shouldTag` boolean — Optional field. AMI resources will be tagged with group tags.
        - `metadataOptions` object — Optional field. Used for IMDSv2. In Create route can't be null. In Update route can be null.
          - `httpTokens` string, required — Required for IMDSv2. Can’t be null in Create or Update. Values can be "optional" or "required".
          - `httpPutResponseHopLimit` integer — An integer within 1,64 range (including). The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.
          - `instanceMetadataTags` 'Enabled' | 'Disabled' — Indicates whether access to instance tags from the instance metadata is enabled or disabled. Can’t be null.
        - `cpuOptions` object — Optional field. The CPU options for the instances that are launched within the group.
          - `threadsPerCore` integer, required — The number of threads per CPU core. To disable multithreading for the instances, specify a value of 1 . Otherwise, specify the default value of 2 .
        - `autoHealing` boolean — Optional field. Auto-healing replacement won't be triggered if this parameter value is "false". In a case of a stateful group - no recycling will start if this parameter value is "false".
      - `volumeAttachments` object — Any volumes specified in this field will be automatically attached to every instance launched in the group. All volumes must be located within the availability zone of the group. Additionally, the group must have at least one persistence configuration. If your group has more than one instance or you want to share the same volume between several instances, it's important to use [Amazon EBS Multi-Attach supported volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) to enable concurrent attachment of the volumes to multiple instances. This ensures that your volumes can be effectively shared among instances in your group.
        - `volumes` object[], required
          - `volumeId` string, required — The volume id to attach
          - `deviceName` string, required — The device name to attach. When you attach a volume to your instance, you include a device name for the volume. Do not use a device name that is reserved for the root volume (for example - `/dev/sda1` or `/dev/xvda`).
    - `scaling` object
      - `up` object[]
        - `policyName` string — The policy name.
        - `namespace` string, required — The namespace for the alarm's associated metric.
        - `source` 'cloudWatch' — The metric source.
        - `metricName` string, required — The name of the metric.
        - `statistic` 'average' | 'sum' | 'sampleCount' | 'maximum' | 'minimum' | 'percentile' — The metric statistics to return.
        - `extendedStatistic` string — Percentile statistic. Valid values: p0.1 - p100.
        - `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 — The value against which the specified statistic is compared.
        - `adjustment` integer — The number associated with the specified adjustment type.
        - `stepAdjustments` object[] — The list of steps to define actions to take based on different thresholds. When set, policy-level threshold and action cannot be specified. If specified, at least one step should be defined.
          - `action` object — The action to take when scale up according to step's threshold is needed. A mandatory field, that should be filled with one of the following: "adjustment", "percentageAdjustment", "setMinTarget", "updateCapacity".
            - `type` 'adjustment' | 'updateCapacity' | 'setMinTarget' | 'percentageAdjustment', required — The type of the action to take when scale up is needed.
            - `adjustment` integer — The number / percentage associated with the specified adjustment type. Required if using `adjustment` or `percentageAdjustment` as action type
            - `minTargetCapacity` integer — The desired target capacity of a group. Required if using `setMinTarget` as action type
            - `target` integer — The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are not defined.
            - `minimum` integer — The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither `target` nor `maximum` are not defined
            - `maximum` integer — The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither `target` nor `minimum` are not defined
          - `threshold` integer, required — The value against which the specified statistic is compared in order to determine if a step should be applied.
        - `action` object — The action to take when scale up is needed. A mandatory field, that should be filled with one of the following: "adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
          - `type` 'adjustment' | 'updateCapacity' | 'setMinTarget' | 'percentageAdjustment', required — The type of the action to take when scale up is needed.
          - `adjustment` integer — The number / percentage associated with the specified adjustment type. Required if using `adjustment` or `percentageAdjustment` as action type
          - `minTargetCapacity` integer — The minimum target capacity. Required if using `setMinTarget` as action type.
          - `target` integer — The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
          - `minimum` integer — The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither `target` nor `maximum` are defined
          - `maximum` integer — The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither `target` nor `minimum` are defined
        - `minTargetCapacity` integer — The minimum target capacity.
        - `dimensions` object[] — The dimensions for the alarm's associated metric. When name is "instanceId", no value is needed.
          - `name` string, required
          - `value` string
        - `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` 'gt' | 'gte' | 'lt' | 'lte' — The operator to use in order to determine if the scaling policy is applicable.
        - `isEnabled` boolean — Specifies whether the scaling policy described in this block is enabled.
      - `down` object[]
        - `policyName` string — The policy name.
        - `namespace` string — The namespace for the alarm's associated metric.
        - `source` 'cloudWatch' — The metric source.
        - `metricName` string — The name of the metric.
        - `statistic` 'average' | 'sum' | 'sampleCount' | 'maximum' | 'minimum' | 'percentile' — The metric statistics to return.
        - `extendedStatistic` string — Percentile statistic. Valid values: p0.1 - p100.
        - `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 — The value against which the specified statistic is compared.
        - `adjustment` integer — The number associated with the specified adjustment type.
        - `stepAdjustments` object[] — The list of steps to define actions to take based on different thresholds. When set, policy-level threshold and action cannot be specified. If specified, at least one step should be defined.
          - `action` object — The action to take when scale down according to step's threshold is needed. A mandatory field, that should be filled with one of the following: "adjustment", "percentageAdjustment", "setMaxTarget", "updateCapacity".
            - `type` 'adjustment' | 'updateCapacity' | 'setMaxTarget' | 'percentageAdjustment', required — The type of the action to take when scale down is needed.
            - `adjustment` integer — The number / percentage associated with the specified adjustment type. Required if using `adjustment` or `percentageAdjustment` as action type
            - `maxTargetCapacity` integer — The desired target capacity of. Required if using `setMaxTarget` as action type
            - `target` integer — The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
            - `minimum` integer — The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither `target` nor `maximum` are defined
            - `maximum` integer — The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither `target` nor `minimum` are defined
          - `threshold` integer, required — The value against which the specified statistic is compared in order to determine if a step should be applied.
        - `action` object — The action to take when scale up is needed. A mandatory field, that should be filled with one of the following: "adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
          - `type` 'adjustment' | 'updateCapacity' | 'setMinTarget' | 'percentageAdjustment', required — The type of the action to take when scale up is needed.
          - `adjustment` integer — The number / percentage associated with the specified adjustment type. Required if using `adjustment` or `percentageAdjustment` as action type.
          - `maxTargetCapacity` integer — The maximum target capacity. Required if using `setMaxTarget` as action type.
          - `target` integer — The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
          - `minimum` integer — The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
          - `maximum` integer — The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
        - `maxTargetCapacity` integer — The maximum target capacity.
        - `dimensions` object[] — The dimensions for the alarm's associated metric. When name is "instanceId", no value is needed.
          - `name` string, required
          - `value` string
        - `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 and before any further trigger-related scaling activities can start.
        - `operator` 'gt' | 'gte' | 'lt' | 'lte' — The operator to use in order to determine if the scaling policy is applicable.
        - `isEnabled` boolean — Specifies whether the scaling policy described in this block is enabled.
      - `multipleMetrics` object
        - `metrics` object[]
          - `name` string, required — The metric name.
          - `metricName` string, required — The name of the source metric.
          - `namespace` string, required — The namespace for the alarm's associated metric.
          - `statistic` 'average' | 'sum' | 'sampleCount' | 'maximum' | 'minimum' | 'percentile' — The metric statistics to return.
          - `extendedStatistic` string — Percentile statistic. Valid values: p0.1 - p100.
          - `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.
          - `dimensions` object[] — The dimensions for the alarm's associated metric. When name is "instanceId", no value is needed.
            - `name` string, required
            - `value` string
        - `expressions` object[]
          - `name` string, required — The expression name.
          - `expression` string, required — An expression consisting of the metric names listed in the 'metrics' array.
      - `target` object[]
        - `source` 'cloudWatch' — The source of the metric.
        - `policyName` string, required — The policy name
        - `metricName` string, required — The name of the metric.
        - `statistic` 'average' | 'sum' | 'sampleCount' | 'maximum' | 'minimum' | 'percentile' — The metric statistics to return.
        - `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.
        - `namespace` string, required — The namespace for the alarm's associated metric.
        - `dimensions` object[] — The dimensions for the alarm's associated metric. When name is "instanceId", no value is needed.
          - `name` string, required
          - `value` string
        - `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.
        - `target` integer, required — The target value for the group.
        - `predictive` object — Enable predictive autoscaling.
          - `mode` 'FORECAST_AND_SCALE' | 'FORECAST_ONLY', required — Predictive autoscaling mode.
    - `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.
        - `startTime` string — DATETIME in ISO-8601 format and is in UTC time. Sets a start time for scheduled actions. If "frequency" or "cronExpression" are not used - the task will run only once at the start time and will then be deleted from the group configuration.
        - `frequency` 'hourly' | 'daily' | 'weekly' — The recurrence frequency to run this task. Only one of ‘frequency' or ‘cronExpression' should be used at a time
        - `cronExpression` string — A valid cron expression. 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.
        - `taskType` 'backup_ami' | 'scale' | 'scaleUp' | 'percentageScaleUp' | 'scaleDown' | 'percentageScaleDown' | 'roll' | 'clusterRoll (For ECS Integration)' | 'statefulUpdateCapacity' | 'statefulRecycle' — The task type to run. For stateful groups, use only those who has a `stateful` prefix, or `backup_ami`. For non-stateful group, use the rest.
        - `scaleTargetCapacity` integer — The target capacity of the group. Should be used when choosing ‘taskType' of ‘scale'.
        - `scaleMinCapacity` integer — The min capacity of the group. Should be used when choosing ‘taskType' of ‘scale'.
        - `scaleMaxCapacity` integer — The max capacity of the group. Required when ‘taskType' is ‘scale'.
        - `targetCapacity` integer — Set a new target capacity for the Elastigroup. Required when ‘taskType' is ‘statefulUpdateCapacity'.
        - `MinCapacity` integer — Set a new minimum capacity for the Elastigroup. Required when ‘taskType' is ‘statefulUpdateCapacity'.
        - `MaxCapacity` integer — Set a new maximum capacity for the Elastigroup. Required when ‘taskType' is ‘statefulUpdateCapacity'.
        - `batchSizePercentage` integer — The percentage size of each batch in the scheduled deployment roll. Required when the taskType is roll.
    - `thirdPartiesIntegration` object — All definitions for using third-party Integrations
      - `rancher` object — Rancher integration object.
        - `masterHost` string — Rancher master url
        - `accessKey` string — Rancher version
        - `secretKey` string
        - `version` string
      - `kubernetes` object
        - `integrationMode` string
        - `clusterIdentifier` string
        - `autoScale` object
          - `isEnabled` boolean
          - `cooldown` integer
          - `down` object — Auto Scaling scale down operations.
            - `evaluationPeriods` integer
            - `maxScaleDownPercentage` integer — The maximum % of nodes that will be scaled down at once out of the total amount of potential nodes to scale down. example: if 10 nodes can be scaled down, only 5 will be given 50% in this parameter. the other 50% will be scaled down in the next autoscaling iteration.
            - `headroom` object — Spare resource capacity management enabling fast assignment of Pods without waiting for new resources to launch.
              - …
          - `labels` object[]
            - `key` string
            - `value` string
          - `isAutoConfig` boolean
      - `nomad` object
        - `masterHost` string
        - `masterPort` integer
        - `autoScale` object
          - `isEnabled` boolean — Enable the Autoscaler.
          - `cooldown` integer — Cooldown period between scaling actions. Value should be cooldown period in seconds, greater than 180
          - `down` object — Auto Scaling scale down operations.
            - `evaluationPeriods` integer
          - `headroom` object — Spare resource capacity management enabling fast assignment of Pods without waiting for new resources to launch.
            - `cpuPerUnit` integer — Optionally configure the number of CPUs to allocate per headroom unit. CPUs are denoted in CPU units, where 1024 units = 1 vCPU.
            - `memoryPerUnit` integer — Optionally configure the amount of memory (MiB) to allocate per headroom unit.
            - `numOfUnits` integer — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
          - `constraints` object[]
            - `key` string
            - `value` string
        - `aclToken` string
        - `tlsConfig` object — Configuration object for TLS integration. (optional)
          - `tlsEnabled` boolean — When true, all communication to the master is with TLS. (required)
          - `privateKey` string — A generated client private key. (required)
          - `certificate` string — The certificates chain, first the client certificate then the ca certificate. (required)
      - `opsWorks` object
        - `layerId` string
        - `stackType` string
      - `codeDeploy` object
        - `cleanUpOnFailure` boolean
        - `terminateInstanceOnFailure` boolean
        - `deploymentGroups` object[]
          - `applicationName` string
          - `deploymentGroupName` string
      - `route53` object — Route53 integration object.
        - `domains` object[] — Route53 domain configurations.
          - `hostedZoneId` string — The Route53 Hosted Zone ID for the registered domain.
          - `spotinstAccountId` string — The Spot account ID that is linked to the AWS account that holds the Route53 hosted Zone ID. The default is the user Spot account provided as a URL parameter.
          - `recordSetType` 'a' | 'cname' — Set the type of recordSet to update. Valid values: * "a" - means register and de-register of instances done by IP address (IPv4). When it is "a" you should also specify usePublicIp. * "cname" - register and de-register of instances done by CNAME. When it is "cname", you should also specify usePublicDns.
          - `recordSets` object[] — List of record sets.
            - `name` string — Name of the recordSet.
            - `usePublicIp` boolean — Defines whether to use public or private IP. Relevant only when recordSetType=a.
            - `usePublicDns` boolean — Defines whether to use a public DNS or private DNS in the instance registration process. Relevant only when recordSetType=cname. * False=Create a new weighted CNAME recordset with same name and the instance Private DNS. * True=instances should be registered with public DNS.
      - `elasticBeanstalk` object — Beanstalk integration object.
        - `environmentId` string
        - `deploymentPreferences` object
          - `automaticRoll` boolean
          - `batchSizePercentage` integer
          - `gracePeriod` integer
          - `strategy` object
            - `action` string
            - `shouldDrainInstances` boolean
        - `managedActions` object
          - `platformUpdate` object
            - `performAt` string
            - `timeWindow` string
            - `updateLevel` string
            - `instanceRefreshEnabled` boolean
      - `ecs` object — ECS integration object.
        - `clusterName` string — ECS cluster name
        - `autoScale` object — The ECS Autoscaler properties.
          - `isEnabled` boolean, required — Enable the ECS Autoscaler.
          - `cooldown` integer — Cooldown period between scaling actions. Value should be cooldown period in seconds, greater than 180.
          - `attributes` object
            - `key` string
            - `value` string
          - `resourceLimits` object — Optionally set upper and lower bounds on the resource usage of the cluster.
            - `maxMemoryGib` integer — The maximum memory in GiB units that can be allocated to the cluster. Minimum value: 1.
            - `maxVcpu` integer — The maximum CPU in vCPU units that can be allocated to the cluster. Minimum value: 1.
          - `down` object — Autoscaling scale down operations.
            - `evaluationPeriods` integer
            - `maxScaleDownPercentage` integer — The maximum portion (as a %) of nodes that will be scaled down at once out of the total number of potential nodes to scale down. Example: If there are 10 nodes to scale down and the parameter is 50%, then only 5 nodes will be scaled down at once. The other 5 nodes will be scaled down in the next autoscaling iteration.
          - `headroom` object — Spare resource capacity management enabling fast assignment of pods without waiting for new resources to launch.
            - `cpuPerUnit` integer — Optionally configure the number of CPUs to allocate per headroom unit. CPUs are denoted in CPU units, where 1024 units = 1 vCPU.
            - `memoryPerUnit` integer — Optionally configure the amount of memory (MiB) to allocate per headroom unit.
            - `numOfUnits` integer — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
          - `isAutoConfig` boolean — Use automatic headroom. When set to true, the values under cluster.autoScaler.headroom are not effective, as Ocean configures and optimizes headroom automatically.
          - `shouldScaleDownNonServiceTasks` boolean — Option to scale down non-service tasks. If not set, Ocean does not scale down standalone tasks.
          - `enableAutomaticAndManualHeadroom` boolean — When set to true, both automatic and per custom Virtual Node Group manual headroom to be saved concurrently and independently in the cluster. prerequisite: isAutoConfig must be true
        - `batch` object
          - `jobQueueNames` string[]
        - `optimizeImages` object
          - `shouldOptimizeEcsAmi` boolean
          - `performAt` 'never' | 'always' | 'timeWindow' — Settings for maintenance strategy.\ performAt of type: 'never' OR 'timeWindow' can only be applied to groups with "availabilityOriented" OR groups with "persistence",\ other groups allow either 'always' type or nothing which also means always.
          - `timeWindows` string[] — When performAt is 'timeWindow':\ must specify a list of 'timeWindows' with at least one time window Each string is in the format of - ddd:hh:mm-ddd:hh:mm * ddd = day of week = Sun | Mon | Tue | Wed | Thu | Fri | Sat * hh = hour 24 = 0 -23 * mm = minute = 0 - 59
      - `dockerSwarm` object — DockerSwarm integration object.
        - `masterHost` string — Docker swarm master hostname
        - `masterPort` integer — Docker swarm master port number
        - `autoScale` object — autoScale configuration
          - `isEnabled` boolean — Specifies whether the scaling policy described in this block is enabled.
          - `cooldown` integer — The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
          - `down` object
            - `evaluationPeriods` integer — The number of periods over which data is compared to the specified threshold.
            - `maxScaleDownPercentage` integer — Would represent the maximum % to scale-down.
          - `headroom` object — Set custom headroom per Virtual Node Group. provide list of launchSpec.autoScale.headrooms object
            - `cpuPerUnit` integer — configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU
            - `memoryPerUnit` integer — Configure the amount 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.
          - `tlsConfig` object
            - `tlsEnabled` boolean
            - `privateKey` string
            - `certificate` string
      - `jenkins` object — Jenkins integration object.
        - `connectionMethod` object — Connection method configuration, define how Jenkins orchestrator and elastigroup with Jenkins integration will connect and communicate
          - `jnlp` object
            - `masterIP` string — Jenkins orchestrator ip adress
            - `masterPort` string — Jenkins orchestrator listening port (usually 8080)
            - `password` string — Jenkins orchestrator password, when set, `userName` is required
            - `userName` string — Jenkins orchestrator userName, when set, `password` is required
            - `token` string — Jenkins orchestrator authentication token. Set both `token` and `password` is not allowed
          - `ssh` object
            - `sshPublicKey` string — public key for SSH connection
          - `manuallyConnection` boolean — When set to `true`, startup-script for elsatigroup with jenkins integration need to be define manually by the user in `compute.launchSpecification.userData`
    - `logging` Logging — unresolved $ref

## Other responses

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