curl --request PUT \
--url https://api.blaxel.ai/v0/policies/{policyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "my-resource",
"displayName": "My Resource",
"labels": {}
},
"spec": {
"flavors": [
{
"name": "t4",
"type": "cpu"
}
],
"locations": [
{
"name": "EU",
"type": "continent"
}
],
"maxTokens": {
"granularity": "minute",
"input": 10000,
"output": 5000,
"ratioInputOverOutput": 2,
"step": 1,
"total": 15000
},
"resourceTypes": [
"model"
],
"sandbox": false,
"type": "location"
}
}
'{
"metadata": {
"name": "my-resource",
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"displayName": "My Resource",
"labels": {},
"plan": "<string>",
"url": "<string>",
"workspace": "<string>"
},
"spec": {
"flavors": [
{
"name": "t4",
"type": "cpu"
}
],
"locations": [
{
"name": "EU",
"type": "continent"
}
],
"maxTokens": {
"granularity": "minute",
"input": 10000,
"output": 5000,
"ratioInputOverOutput": 2,
"step": 1,
"total": 15000
},
"resourceTypes": [
"model"
],
"sandbox": false,
"type": "location"
}
}Updates a governance policyโs restrictions. Changes take effect on the next deployment of resources using this policy.
curl --request PUT \
--url https://api.blaxel.ai/v0/policies/{policyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "my-resource",
"displayName": "My Resource",
"labels": {}
},
"spec": {
"flavors": [
{
"name": "t4",
"type": "cpu"
}
],
"locations": [
{
"name": "EU",
"type": "continent"
}
],
"maxTokens": {
"granularity": "minute",
"input": 10000,
"output": 5000,
"ratioInputOverOutput": 2,
"step": 1,
"total": 15000
},
"resourceTypes": [
"model"
],
"sandbox": false,
"type": "location"
}
}
'{
"metadata": {
"name": "my-resource",
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"displayName": "My Resource",
"labels": {},
"plan": "<string>",
"url": "<string>",
"workspace": "<string>"
},
"spec": {
"flavors": [
{
"name": "t4",
"type": "cpu"
}
],
"locations": [
{
"name": "EU",
"type": "continent"
}
],
"maxTokens": {
"granularity": "minute",
"input": 10000,
"output": 5000,
"ratioInputOverOutput": 2,
"step": 1,
"total": 15000
},
"resourceTypes": [
"model"
],
"sandbox": false,
"type": "location"
}
}OAuth2 authentication with JWT tokens
Unique name identifier of the policy
Rule that controls how a deployment is made and served (e.g. location restrictions)
successful operation
Rule that controls how a deployment is made and served (e.g. location restrictions)
Was this page helpful?