Create Allocation Constraint
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
org
allocationId
Request
This endpoint expects an object.
resourceType
Type of the Resource that the Allocation Constraint applies to
Allowed values:
resourceTypeId
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
Type of the Allocation Constraint. Please note that OnDemand and Preemptible are not supported by current implementation.
Allowed values:
constraintValue
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
id
ID of the Allocation Constraint
allocationId
ID of the Allocation that contains the Allocation Constraint
resourceType
Type of the Resource that the Allocation Constraint applies to
Allowed values:
resourceTypeId
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
Type of the Allocation Constraint. Please note that OnDemand and Preemptible are not supported by current implementation.
Allowed values:
constraintValue
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.
derivedResourceId
ID of the allocated Tenant IP Block when resource type is IPBlock
instanceType
Describes a subset of core attributes of an Instance Type
ipBlock
Describes a subset of core attributes of an IP block
created
Date/time when the Allocation Constraint was created
updated
Date/time when the Allocation Constraint was last updated
Errors
400
Bad Request Error
403
Forbidden Error