Skip to navigation

Update Allocation Constraint

View as Markdown

Update an existing Allocation Constraint by ID

Org must have an Infrastructure Provider. Specified Allocation must have been created by the Provider and requesting user must have PROVIDER_ADMIN role.

Modifying allocations may not be possible if Tenant has started utilizing resources from this allocation.

For an InstanceType resource, constraintValue can be incremented at any time, but not decremented if doing so requires decommissioning Tenant resources.

For an IPBlock resource, constraintValue cannot be changed while Subnets or VPC Prefixes reference the allocated Tenant IP Block. If the source IP Block is linked to an OperatorManaged SitePrefix, its status must also be Ready before constraintValue can change. A change blocked by either condition returns 400.

Submitting the existing constraintValue leaves the constraint unchanged and does not require the source IP Block to be Ready.

Authentication

AuthorizationBearer
export JWT_BEARER_TOKEN="<jwt-bearer-token>"

# Example org name: "acme-inc
export ORG_NAME=<org-name>

# Use the JWT bearer token in your API request auth header:
curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current

Path parameters

orgstringRequired
Name of the Org
allocationIdstringRequired
ID of the Allocation
allocationConstraintIdstringRequiredformat: "uuid"
ID of the Allocation Constraint

Request

This endpoint expects an object.
constraintValueintegerRequired
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

OK
idstringOptionalRead-onlyformat: "uuid"
ID of the Allocation Constraint
allocationIdstringOptionalformat: "uuid"
ID of the Allocation that contains the Allocation Constraint
resourceTypeenumOptional
Type of the Resource that the Allocation Constraint applies to
Allowed values:
resourceTypeIdstringOptionalformat: "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.

constraintTypeenumOptional

Type of the Allocation Constraint. Reserved is the only constraint type supported by current implementation.

Allowed values:
constraintValueintegerOptional

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.

derivedResourceIdstring or nullOptional
ID of the allocated Tenant IP Block when resource type is IPBlock
instanceTypeobjectOptional
Summary of the Instance Type
ipBlockobjectOptional
Summary of the IP Block
deprecationslist of objectsOptional
Deprecations active for this resource. Returned only if there are active deprecations.
createddatetimeOptionalRead-only

Date/time when the Allocation Constraint was created

updateddatetimeOptionalRead-only

Date/time when the Allocation Constraint was last updated

Errors

400
Bad Request Error
403
Forbidden Error