​
Select Service
ves-io-schema-policer-API-Create
Published April 5, 2023 | Last modified November 14, 2025
Examples of creating policer
Usecase:
Create policer-1 with 10kBps committed information rate and 10kB burst size
Request using vesctl:
vesctl configuration create policer -i policer.yaml
where file policer.yaml has following contents (policer.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "policer-1",
"namespace": "documentation"
},
"spec": {
"committed_information_rate": 10000,
"burst_size": 10000,
"policer_mode": "POLICER_MODE_SHARED"
}
}
Copied!
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "policer-1",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "3afb5e22-0ee2-4ff3-b64b-f6263eee7e19",
"creation_timestamp": "2025-11-13T23:06:46.541156Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"policer_type": "POLICER_SINGLE_RATE_TWO_COLOR",
"committed_information_rate": 10000,
"burst_size": 10000,
"policer_mode": "POLICER_MODE_SHARED"
}
}
Copied!
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"policer-1","namespace":"documentation"},"spec":{"committed_information_rate":10000,"burst_size":10000,"policer_mode":"POLICER_MODE_SHARED"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build4194363419_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/policers'
Copied!
curl response:
HTTP/1.1 200 OK
Content-Length: 774
Content-Type: application/json
Date: Thu, 13 Nov 2025 23:06:46 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "policer-1",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "3afb5e22-0ee2-4ff3-b64b-f6263eee7e19",
"creation_timestamp": "2025-11-13T23:06:46.541156Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"policer_type": "POLICER_SINGLE_RATE_TWO_COLOR",
"committed_information_rate": 10000,
"burst_size": 10000,
"policer_mode": "POLICER_MODE_SHARED"
}
}
Copied!