ves-io-schema-k8s_pod_security_policy-API-List

Examples of listing k8spodsecurity_policy

Usecase:

List all k8spodsecurity_policys in current namespace

Request using vesctl:

vesctl configuration list k8s_pod_security_policy --namespace system

vesctl yaml response:

errors: []
items:
- annotations: {}
  labels: {}
  name: pod-security-policy-1
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: f9ecdbf3-3a85-440d-8225-35dd6774adb5

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/k8s_pod_security_policys'

curl response

HTTP/1.1 200 OK
Content-Length: 466
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:03:15 GMT
Vary: Accept-Encoding

{
  "items": [
    {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "pod-security-policy-1",
      "uid": "f9ecdbf3-3a85-440d-8225-35dd6774adb5",
      "description": "",
      "disabled": false,
      "labels": {
      },
      "annotations": {
      },
      "owner_view": null,
      "metadata": null,
      "system_metadata": null,
      "object": null,
      "get_spec": null,
      "status_set": [
      ]
    }
  ],
  "errors": [
  ]
}