---
title: "Create Allocation"
method: POST
path: "/v2/org/{org}/nico/allocation"
tags: ["Allocation"]
---

# Create Allocation

`POST /v2/org/{org}/nico/allocation`

Create an Allocation for the org.

Org must have an Infrastructure Provider entity. User must have authorization role with `PROVIDER_ADMIN` suffix.

To successfully create a compute Allocation, there must be enough unallocated Machines associated with the Instance Type to satisfy the constraint value.
For network Allocation, the source site-level IP Block must have an available prefix with length equal to the constraint value.

## Request body

- AllocationCreateRequest — Request data to create an Allocation
  - `name` string, required — Concise and descriptive name for the Allocation
  - `description` string, nullable — Detailed description for the Allocation
  - `tenantId` string, uuid, required — ID of the Tenant that should receive the Allocation
  - `siteId` string, uuid, required — ID of the Site where resources should be allocated
  - `allocationConstraints` AllocationConstraintCreateRequest[] — List of Allocation Constraint objects
    - `resourceType` 'InstanceType' | 'IPBlock', required — Type of the Resource that the Allocation Constraint applies to
    - `resourceTypeId` string, uuid, required — ID of the Resource Type that the Allocation Constraint applies to. For InstanceType, this is the ID of the Instance Type. For IPBlock, this is the ID of the IP Block.
    - `constraintType` 'Reserved' | 'OnDemand' | 'Preemptible', required — Type of the Allocation Constraint. Please note that OnDemand and Preemptible are not supported by current implementation.
    - `constraintValue` integer, required — Value of the Allocation Constraint. For InstanceType, this value represents number of Machines allocated for Tenant. For IPBlock, this value represents the prefix Length of the IP Block.

## Response `201`

Created

- Allocation — Specifies a group of resources on a Site that has been allocated to a Tenant
  - `id` string, uuid — ID of the Allocation
  - `name` string — Concise and descriptive name of the Allocation
  - `description` string, nullable — Detailed description of the Allocation
  - `infrastructureProviderId` string, uuid — ID of the Infrastructure Provider that created the Allocation
  - `tenantId` string, uuid — ID of the Tenant that received the Allocation
  - `siteId` string, uuid — ID of the Site where resources are allocated
  - `status` 'Pending' | 'Registered' | 'Deleting' | 'Error' — Status values for Allocation objects
  - `statusHistory` StatusDetail[] — Chronological status history for the Allocation
    - `status` string — State of the associated entity at a particular time
    - `message` string, nullable — Description of the state and cause/remedy in case of error
    - `created` string, date-time — Date/time when the associated entity assumed the status
    - `updated` string, date-time — Date/time when the associated entity was last observed with this status
  - `allocationConstraints` AllocationConstraint[] — List of Allocation Constraints for the Allocation
    - `id` string, uuid — ID of the Allocation Constraint
    - `allocationId` string, uuid — ID of the Allocation that contains the Allocation Constraint
    - `resourceType` 'InstanceType' | 'IPBlock' — Type of the Resource that the Allocation Constraint applies to
    - `resourceTypeId` string, uuid — ID of the resource that acts as the source of the Allocation. For resource type `InstanceType`, this is the ID of the Instance Type whose associated Machines are allocated to the Tenant. For resource type `IPBlock`, this is the ID of the Site-level IP Block from which a prefix is allocated to the Tenant.
    - `constraintType` 'Reserved' | 'OnDemand' | 'Preemptible' — Type of the Allocation Constraint. `Reserved` is the only constraint type supported by current implementation.
    - `constraintValue` integer — Value of the Allocation Constraint. For resource type: `InstanceType`, this value represents number of Machines associated with the Instance Type that is allocated to the Tenant. For resource type `IPBlock`, this value represents the prefix length of the IP Block allocated to the Tenant.
    - `derivedResourceId` string, nullable — ID of the allocated Tenant IP Block when resource type is IPBlock
    - `instanceType` InstanceTypeSummary — Describes a subset of core attributes of an Instance Type
      - `id` string, uuid — ID of the Instance Type
      - `name` string — Name of the Instance Type, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
      - `infrastructureProviderId` string, uuid — ID of the Infrastructure Provider that owns the Instance Type
      - `siteId` string, uuid — ID of the Site that owns the Instance Type
      - `status` 'Pending' | 'Registering' | 'Ready' | 'Deleting' | 'Error' — Status values for Instance Type objects
    - `ipBlock` IpBlockSummary — Describes a subset of core attributes of an IP block
      - `id` string, uuid — ID of the IP Block
      - `name` string — Name of the IP Block, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
      - `routingType` 'Public' | 'DatacenterOnly' — RoutingType of the IP Block
      - `prefix` string — Either IPv4 or IPv6 address
      - `prefixLength` integer — Min: 1, Max: 32 for ipv4, 128 for ipv6
      - `status` 'Pending' | 'Provisioning' | 'Ready' | 'Deleting' | 'Error' — Status values for IP Block objects
    - `deprecations` Deprecation[] — Deprecations active for this resource. Returned only if there are active deprecations.
      - `attribute` string, nullable — Name of the attribute that is deprecated. Omitted if queryParam or endpoint is being deprecated.
      - `queryParam` string, nullable — Query parameter that is deprecated. Omitted if attribute or endpoint is being deprecated.
      - `endpoint` string, nullable — API endpoint that is deprecated. Omitted if attribute or queryParam is being deprecated.
      - `replacedBy` string, nullable — Name of the attribute, query parameter, or endpoint that replaces the deprecated item. Omitted if no replacement is available.
      - `takeActionBy` string, date-time — Date/time by which clients should migrate away from the deprecated API surface
      - `notice` string — Message describing the deprecation
    - `created` string, date-time — Date/time when the Allocation Constraint was created
    - `updated` string, date-time — Date/time when the Allocation Constraint was last updated
  - `created` string, date-time — Date/time when the Allocation was created
  - `updated` string, date-time — Date/time when the Allocation was last updated

## Other responses

- `400` — Error response when request data cannot be validated
- `403` — Error response when user is not authorized to call an endpoint or retrieve/modify objects

---

[API](https://skmtc.net/nvidia/apis/nvidia-infra-controller-rest-api.md) · [All operations](https://skmtc.net/nvidia/apis/nvidia-infra-controller-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nvidia/nvidia-infra-controller-rest-api/revisions/4c29fe59bd4e/schema)
