Create a budget
Changed onCreates a budget and returns it. The server assigns the identifier and records the caller as created_by.
effect selects the kind of budget: a limit budget takes limit, window, and posture, and an exemption takes validity. A limit budget can split its limit with scope.each.
- If the body is invalid, the request fails with 400.
- For a caller whose access covers only particular principals or groups, a scope that doesn't lie within those principals and groups fails with 400, and invalid_parameters names scope.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Request body
The body of a request that creates or replaces a limit budget.
The body of a request that creates or replaces an exemption.
Example request
{
"labels": {
"env": "test"
},
"managed_by": {
"owner": "terraform"
}
}Response
The created budget.
A budget sets a spending limit, or declares an exemption from limits, for part of the organization's AI usage. scope selects the usage it covers.
effect tells the two kinds apart. A limit budget carries its settings in limit, window, and posture, and an exemption carries the period it covers in validity. The fields of the other kind are null.
A limit budget sets a spending limit on the usage in its scope for each budget window. It has a balance, and it can have a notification rule that alerts as spend reaches shares of the limit.
An exemption declares that the usage in its scope is exempt from limits for a limited time. It sets no limit. The service stores and lists exemptions, but they change no balance or notification.
Example response
{
"id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
"labels": {
"env": "test"
},
"managed_by": {
"owner": "terraform"
},
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}Changes
- info
endpoint added
- info