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=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' '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, 15 May 2020 10:52:41 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": ""
  }
}