ves-io-schema-ip_prefix_set-API-Get

Examples of getting ipprefixset

Usecase:

Get ddos-black-list from system

Request using vesctl:

vesctl configuration get ip_prefix_set ddos-black-list --namespace system

vesctl yaml response:

object:
  metadata:
    annotations: {}
    labels: {}
    name: ddos-black-list
    namespace: system
    uid: 02738695-dab4-4f42-a067-69a72c36229d
  spec:
    gcSpec:
      prefix:
      - 1.2.3.0/24
      - 4.5.6.0/24
      - 7.8.9.0/24
  systemMetadata:
    creationTimestamp: "2020-05-15T10:52:42.540789177Z"
    creatorClass: examplesvc.ves.io
    finalizers: []
    namespace:
    - kind: namespace
      name: system
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 70ee9b210065e0e2:70ee9b210065e0e2:0:1
    uid: 02738695-dab4-4f42-a067-69a72c36229d
resourceVersion: "232"
status: []

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/ip_prefix_sets/ddos-black-list?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Length: 1275
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "object": {
    "metadata": {
      "name": "ddos-black-list",
      "namespace": "system",
      "uid": "02738695-dab4-4f42-a067-69a72c36229d",
      "labels": {
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "02738695-dab4-4f42-a067-69a72c36229d",
      "creation_timestamp": "2020-05-15T10:52:42.540789177Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc.ves.io",
      "creator_id": "",
      "creator_cookie": "",
      "trace_info": "70ee9b210065e0e2:70ee9b210065e0e2:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "system"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "prefix": [
          "1.2.3.0/24",
          "4.5.6.0/24",
          "7.8.9.0/24"
        ]
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "232",
  "metadata": null,
  "system_metadata": null,
  "spec": null,
  "status": [
  ]
}