ves-io-schema-infraprotect_deny_list_rule-API-Create
Examples of creating infraprotect_deny_list_rule
Usecase:
Create Deny List Rule-1
Request using vesctl:
vesctl configuration create infraprotect_deny_list_rule -i infraprotect_deny_list_rule.yaml
where file infraprotect_deny_list_rule.yaml has following contents (infraprotect_deny_list_rule.CreateRequest):
RequestJSON:
{ "metadata": { "name": "deny-list-rule-1", "namespace": "system" }, "spec": { "prefix": "12.13.14.0/24", "expiration_never": {} }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "deny-list-rule-1", "namespace": "system", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "0e816f08-314f-4411-bea3-d4ba6ff824f6", "creation_timestamp": "2026-06-19T22:03:13.242455Z", "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": { "prefix": "12.13.14.0/24", "expiration_never": {} }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"deny-list-rule-1","namespace":"system"},"spec":{"prefix":"12.13.14.0/24","expiration_never":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1655461974_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect_deny_list_rules'curl response:
HTTP/1.1 200 OKContent-Length: 677Content-Type: application/jsonDate: Fri, 19 Jun 2026 22:03:13 GMTVary: Accept-Encoding
{ "metadata": { "name": "deny-list-rule-1", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "0e816f08-314f-4411-bea3-d4ba6ff824f6", "creation_timestamp": "2026-06-19T22:03:13.242455Z", "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": { "prefix": "12.13.14.0/24", "expiration_never": {
} }}Usecase:
Create ASN-2
Request using vesctl:
vesctl configuration create infraprotect_deny_list_rule -i infraprotect_deny_list_rule.yaml
where file infraprotect_deny_list_rule.yaml has following contents (infraprotect_deny_list_rule.CreateRequest):
RequestJSON:
{ "metadata": { "name": "deny-list-rule-2", "namespace": "system" }, "spec": { "prefix": "12.13.14.0/24", "expiration_timestamp": "2026-06-26T22:02:10.746354Z" }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "deny-list-rule-2", "namespace": "system", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "420a6077-4a3a-49b8-9af2-2fd5c9f157da", "creation_timestamp": "2026-06-19T22:03:13.247799Z", "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": { "prefix": "12.13.14.0/24", "expiration_timestamp": "2026-06-26T22:02:10.746354Z" }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"deny-list-rule-2","namespace":"system"},"spec":{"prefix":"12.13.14.0/24","expiration_timestamp":"2026-06-26T22:02:10.746354Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1655461974_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect_deny_list_rules'curl response:
HTTP/1.1 200 OKContent-Length: 702Content-Type: application/jsonDate: Fri, 19 Jun 2026 22:03:13 GMTVary: Accept-Encoding
{ "metadata": { "name": "deny-list-rule-2", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "420a6077-4a3a-49b8-9af2-2fd5c9f157da", "creation_timestamp": "2026-06-19T22:03:13.247799Z", "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": { "prefix": "12.13.14.0/24", "expiration_timestamp": "2026-06-26T22:02:10.746354Z" }}Usecase:
Create ASN-2
Request using vesctl:
vesctl configuration create infraprotect_deny_list_rule -i infraprotect_deny_list_rule.yaml
where file infraprotect_deny_list_rule.yaml has following contents (infraprotect_deny_list_rule.CreateRequest):
RequestJSON:
{ "metadata": { "name": "deny-list-rule-3", "namespace": "system" }, "spec": { "prefix": "12.13.14.0/24", "one_hour": {} }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "deny-list-rule-3", "namespace": "system", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "d7754fea-c80a-4dd4-a390-3c6ace49c59e", "creation_timestamp": "2026-06-19T22:03:13.252023Z", "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": { "prefix": "12.13.14.0/24" }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"deny-list-rule-3","namespace":"system"},"spec":{"prefix":"12.13.14.0/24","one_hour":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1655461974_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect_deny_list_rules'curl response:
HTTP/1.1 200 OKContent-Length: 643Content-Type: application/jsonDate: Fri, 19 Jun 2026 22:03:13 GMTVary: Accept-Encoding
{ "metadata": { "name": "deny-list-rule-3", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "d7754fea-c80a-4dd4-a390-3c6ace49c59e", "creation_timestamp": "2026-06-19T22:03:13.252023Z", "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": { "prefix": "12.13.14.0/24" }}