Create Allocation Constraint

View as Markdown

Create an Allocation Constraint for a given Allocation ID.

Org must have an Infrastructure Provider entity and specified Allocation must have been created by the Provider. User must have FORGE_PROVIDER_ADMIN role.

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://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current ```

Path parameters

orgstringRequired
allocationIdstringRequired

Request

This endpoint expects an object.
resourceTypeenumRequired
Type of the Resource that the Allocation Constraint applies to
Allowed values:
resourceTypeIdstringRequiredformat: "uuid"
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.
constraintTypeenumRequired
Type of the Allocation Constraint. Please note that OnDemand and Preemptible are not supported by current implementation.
Allowed values:
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

Created
idstringRead-onlyformat: "uuid"
ID of the Allocation Constraint
allocationIdstringformat: "uuid"
ID of the Allocation that contains the Allocation Constraint
resourceTypeenum
Type of the Resource that the Allocation Constraint applies to
Allowed values:
resourceTypeIdstringformat: "uuid"
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.
constraintTypeenum
Type of the Allocation Constraint. Please note that OnDemand and Preemptible are not supported by current implementation.
Allowed values:
constraintValueinteger
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.
derivedResourceIdstring or null
ID of the allocated Tenant IP Block when resource type is IPBlock
instanceTypeobject
Describes a subset of core attributes of an Instance Type
ipBlockobject
Describes a subset of core attributes of an IP block
createddatetimeRead-only

Date/time when the Allocation Constraint was created

updateddatetimeRead-only

Date/time when the Allocation Constraint was last updated

Errors

400
Bad Request Error
403
Forbidden Error