---
title: "Update Elastigroup"
method: PUT
path: "/aws/ec2/group/{groupId}"
tags: ["Elastigroup AWS"]
---

# Update Elastigroup

`PUT /aws/ec2/group/{groupId}`

Describe a specific Elastigroup JSON

## Path parameters

- `groupId` string, required

## Query parameters

- `autoApplyTags` boolean

## Parameters

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

## Request body

- object
  - `group` object, required — Group
    - `name` string, required — AWS Elastigroup Name
    - `description` string — Describe your AWS Elastigroup
    - `region` string — 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
      - `target` integer — The number of instances to launch
      - `minimum` integer — The lower limit number of instances that you can scale down to
      - `maximum` integer — The upper limit number of instances that you can scale up to
      - `unit` 'instance' | 'weight' — The capacity unit to launch instances by. Note: for groups with integration to K8S / ECS weight option is not supported.
    - `strategy` object
      - `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' — 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
      - `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
      - `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 strategy.persistence.shouldPersistPrivateIp is set to true.
      - `instanceTypes` object — Instance Types
        - `ondemand` string — Available on demand instance type. Note: Either ondemand or onDemandTypes can be defined, but not both.
        - `onDemandTypes` string[] — Available on demand instance types. Note: Either ondemand or onDemandTypes can be defined, but not both.
        - `spot` string[] — Available Spot Instance types. Note: Cannot be defined if 'resourceRequirements' is defined.
        - `resourceRequirements` ResourceRequirements — unresolved $ref
        - `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[] — One or more availability Zones for the group. When this parameter is set, compute.subnetIds should be left unused.
        - `name` string — 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
      - `volumeAttachments` VolumeAttachments — unresolved $ref
      - `launchSpecification` object
        - `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` Items[] — The load balancer associated with the ITF. Array with a single element. — unresolved $ref
          - `targetGroupConfig` 0 — unresolved $ref
        - `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[] — One or more security group IDs. In case of update it will override the existing Security Group with the new given array
        - `monitoring` boolean — 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` Items[] — 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 — unresolved $ref
        - `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 example: 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 — 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 — The private IPv4 address.
            - `primary` boolean — 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
        - `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 .
        - `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.
        - `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".
    - `scaling` object
      - `up` Items[] — unresolved $ref
      - `down` Items[] — unresolved $ref
      - `multipleMetrics` object
        - `metrics` Items[] — unresolved $ref
        - `expressions` Items[] — unresolved $ref
      - `target` Items[] — unresolved $ref
    - `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
      - `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
      - `rancher` object — All definitions for using Rancher Labs integration.
        - `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)
      - `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.
      - `dockerSwarm` DockerSwarm — unresolved $ref
      - `jenkins` Jenkins — unresolved $ref
    - `logging` object
      - `export` object
        - `s3` object — Exports Elastigroup logs to the S3 bucket and subdir configured on the S3 [data integration](/#operation/DataIntegrationCreate) given. Each file contains logs of 3 minutes where each log is separated by a new line and saved as a JSON. The file formats are `subdir/accountId_groupId_groupName_startTime.log`. If no subdir was configured, the files will be saved in the root of the bucket.
          - `id` string, required — The identifier of The S3 data integration to export the logs to.
    - `createdAt` string — Creation Time Indicator
    - `updatedAt` string — Update Time Indicator

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