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": "86d315ea-331b-4a4d-acc4-07ac8592c955",
"creation_timestamp": "2025-06-26T23:55:14.612953Z",
"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-build336959812_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 OK
Content-Length: 677
Content-Type: application/json
Date: Thu, 26 Jun 2025 23:55:14 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-1",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "86d315ea-331b-4a4d-acc4-07ac8592c955",
"creation_timestamp": "2025-06-26T23:55:14.612953Z",
"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": "2025-07-03T23:54:40.312497Z"
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "deny-list-rule-2",
"namespace": "system",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "53c970f3-43f7-4926-8043-49dbdf00eeb5",
"creation_timestamp": "2025-06-26T23:55:14.617258Z",
"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": "2025-07-03T23:54:40.312497Z"
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"deny-list-rule-2","namespace":"system"},"spec":{"prefix":"12.13.14.0/24","expiration_timestamp":"2025-07-03T23:54:40.312497Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build336959812_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 OK
Content-Length: 702
Content-Type: application/json
Date: Thu, 26 Jun 2025 23:55:14 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-2",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "53c970f3-43f7-4926-8043-49dbdf00eeb5",
"creation_timestamp": "2025-06-26T23:55:14.617258Z",
"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": "2025-07-03T23:54:40.312497Z"
}
}
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": "fb0dd2f4-979e-4292-a22a-1bc1d3ab571d",
"creation_timestamp": "2025-06-26T23:55:14.621105Z",
"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-build336959812_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 OK
Content-Length: 643
Content-Type: application/json
Date: Thu, 26 Jun 2025 23:55:14 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-3",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "fb0dd2f4-979e-4292-a22a-1bc1d3ab571d",
"creation_timestamp": "2025-06-26T23:55:14.621105Z",
"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"
}
}