ves-io-schema-bgp_asn_set-API-Create
On This Page:
Examples of creating bgpasnset
Usecase:
Create bgpasnset bgp-asn-anonymous in current namespace. list of networks. It can be used to block address from anonymous networks. valid only publicly exposed services
Request using vesctl:
vesctl configuration create bgp_asn_set -i bgp_asn_set.yaml
where file bgpasnset.yaml has following contents (bgpasnset.CreateRequest):
metadata:
name: bgp-asn-anonymous
namespace: documentation
spec:
asNumbers:
- 1234
- 5678
- 9101
- 1121
- 3141
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: bgp-asn-anonymous
namespace: documentation
spec:
asNumbers:
- 1234
- 5678
- 9101
- 1121
- 3141
systemMetadata:
creationTimestamp: "2021-03-31T08:28:12.504856100Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: e219f5d8-4d76-45a4-9f91-d89cf3303de9
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"bgp-asn-anonymous","namespace":"documentation"},"spec":{"asNumbers":[1234,5678,9101,1121,3141]}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/bgp_asn_sets'
curl response:
HTTP/1.1 200 OK
Content-Length: 686
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:28:12 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "bgp-asn-anonymous",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "e219f5d8-4d76-45a4-9f91-d89cf3303de9",
"creation_timestamp": "2021-03-31T08:28:12.504856100Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"spec": {
"as_numbers": [
1234,
5678,
9101,
1121,
3141
]
}
}