ves-io-schema-infraprotect_configuration-CustomAPI-Get

Examples of performing infraprotect_configuration CustomAPI Get

Usecase:

Get a specific configured zone

Request:

Request using vesctl:

vesctl request rpc infraprotect_configuration.CustomAPI.Get -i request.yaml --uri /public/namespaces/system/infraprotect_configurations/38b115f3-da21-42d1-a07e-542806b0d96a --http-method GET

where file request.yaml has following contents:

          namespace: system
zoneUuid: 38b115f3-da21-42d1-a07e-542806b0d96a

        

vesctl yaml response:

          configuration:
  description: Bypass UDP traffic coming back from google public DNS servers
  ipprotos: []
  name: allow_google
  operStatus: ok
  ports:
  - port: 53
    proto: udp
    srcBasedPolicies: []
  - port: 53
    proto: tcp
    srcBasedPolicies: []
  prefixes:
  - cidr: 185.12.11.0/24
  srcports: []
  status: normal

        

Request using curl:

          curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build449658010_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect_configurations/38b115f3-da21-42d1-a07e-542806b0d96a?namespace=system&zone_uuid=38b115f3-da21-42d1-a07e-542806b0d96a'
        

curl response:

          HTTP/1.1 200 OK
Content-Length: 624
Content-Type: application/json
Date: Fri, 12 Jan 2024 12:06:22 GMT
Vary: Accept-Encoding

{
  "configuration": {
    "description": "Bypass UDP traffic coming back from google public DNS servers",
    "ipprotos": [
    ],
    "name": "allow_google",
    "oper_status": "ok",
    "ports": [
      {
        "deny": false,
        "port": 53,
        "proto": "udp",
        "src_based_policies": [
        ]
      },
      {
        "deny": false,
        "port": 53,
        "proto": "tcp",
        "src_based_policies": [
        ]
      }
    ],
    "prefixes": [
      {
        "cidr": "185.12.11.0/24",
        "comment": ""
      }
    ],
    "srcports": [
    ],
    "status": "normal",
    "uuid": ""
  }
}