---
title: "Create VNG"
method: POST
path: "/ocean/aws/ecs/launchSpec"
tags: ["Ocean ECS"]
---

# Create VNG

`POST /ocean/aws/ecs/launchSpec`

Create a new Ocean ECS virtual node group in the specified account.

## Parameters

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

## Request body

- object
  - `launchSpec` object, required — AWS Cluster Virtual Node Group (VNG).
    - `id` string
    - `oceanId` string, required — The Ocean cluster identifier. Required for to create a virtual node group.
    - `name` string, required — User given name of the virtual node group.
    - `imageId` string — Set image identifier. Can be null.
    - `images` Items[] — An array of image objects. <br> * You can configure VNG with either the imageId or images objects, but not both simultaneously. * For each architecture type (amd64, arm64) only one AMI is allowed. * Valid values: null, or an array with at least one element — unresolved $ref
    - `userData` string, byte — Base64-encoded MIME user data to make available to the instances.
    - `securityGroupIds` string[] — Set security groups. Each element in array should be a security group identifier.
    - `instanceTypes` string[] — An array of supported instance types for the VNG.
    - `preferredSpotTypes` string[] — When Ocean scales up instances, it takes your preferred types into consideration while maintaining a variety of machine types running for optimized distribution. [Learn More](https://docs.flexera.com/spot/ocean/features/vngs/attributes-and-actions-per-vng?id=preferred-spot-instance-types-per-vng)
    - `subnetIds` string[] — Set the subnets in the VNG. Each element in the array should be a subnet identifier.
    - `iamInstanceProfile` union[] — The instance profile iamRole object.
      - union
        - string — The iamRole ARN. If set, do not set launchSpec.iamInstanceProfile.name
        - string — The iamRole name. If set, do not set launchSpec.iamInstanceProfile.arn
    - `attributes` object[] — Add attributes to the cluster.
      - `key` string, required — Give the attribute a key.
      - `value` string, required — Set the value of the attribute.
    - `autoScale` object
      - `headrooms` object[] — Set custom headroom per VNG. Provide a list of launchSpec.autoscale.headroom objects.
        - `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, required — The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
    - `tags` object[] — List of kay-value pairs of tags.
      - `tagKey` string — Set the tag key.
      - `tagValue` string — Set the tag value.
    - `blockDeviceMappings` BlockDeviceMappings — unresolved $ref
    - `restrictScaleDown` boolean — When set to True, the VNG container instances will be treated as if all tasks running have the [restrict-scale-down label](https://docs.flexera.com/spot/ocean/features/labels-and-taints). Therefore, Ocean will not scale down container instances unless they are empty.
    - `instanceMetadataOptions` InstanceMetadataOptions — unresolved $ref
    - `scheduling` Scheduling — unresolved $ref
    - `strategy` object — Similar to a strategy for an Ocean cluster, but applying only to a virtual node group.
      - `spotPercentage` integer — The desired percentage of the Spot instances out of all running container instances. Defaults to 100 when not set.\ Only available when the field is **not** set in the cluster directly (Ocean.Strategy.spotPercentage)
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

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