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": "1643531a-fb64-4a65-8199-fc6a040fe506",
"creation_timestamp": "2025-05-30T01:20:26.635743Z",
"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-build1497866850_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: Fri, 30 May 2025 01:20:26 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-1",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "1643531a-fb64-4a65-8199-fc6a040fe506",
"creation_timestamp": "2025-05-30T01:20:26.635743Z",
"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-06-06T01:19:34.596969Z"
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "deny-list-rule-2",
"namespace": "system",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "5e215054-c5f6-46dd-8be9-b885f8d370b7",
"creation_timestamp": "2025-05-30T01:20:26.639617Z",
"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-06-06T01:19:34.596969Z"
}
}
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-06-06T01:19:34.596969Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1497866850_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: Fri, 30 May 2025 01:20:26 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-2",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "5e215054-c5f6-46dd-8be9-b885f8d370b7",
"creation_timestamp": "2025-05-30T01:20:26.639617Z",
"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-06-06T01:19:34.596969Z"
}
}
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": "f4d20b4c-ba7f-4a06-a57c-4cfed8ddbf36",
"creation_timestamp": "2025-05-30T01:20:26.644433Z",
"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-build1497866850_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: Fri, 30 May 2025 01:20:26 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "deny-list-rule-3",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "f4d20b4c-ba7f-4a06-a57c-4cfed8ddbf36",
"creation_timestamp": "2025-05-30T01:20:26.644433Z",
"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"
}
}