ves-io-schema-service_policy_rule-API-Get

Examples of getting servicepolicyrule

Usecase:

Get service-policy-rule-1

Request using vesctl:

vesctl configuration get service_policy_rule service-policy-rule-1 --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: service-policy-rule-1
  namespace: documentation
referringObjects: []
resourceVersion: "823"
spec:
  action: ALLOW
  anyAsn: {}
  anyIp: {}
  argMatchers: []
  clientNameMatcher:
    exactValues: []
    regexValues:
    - .+\.ves.io
  clientRole:
    match: app-user
  cookieMatchers: []
  gotoPolicy: []
  headers:
  - item:
      exactValues:
      - en-US
      regexValues: []
      transformers: []
    name: Accept-Language
  - item:
      exactValues:
      - gzip
      - deflate
      regexValues: []
      transformers: []
    name: Accept-Encoding
  labelMatcher:
    keys:
    - ves.io/appType
  path:
    exactValues:
    - /register
    - /guest-play
    prefixValues: []
    regexValues: []
    transformers: []
  queryParams:
  - item:
      exactValues:
      - guest
      regexValues: []
      transformers: []
    key: guest-user-name
  rateLimiter: []
  scheme: []
  wafAction:
    none: {}
status: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:03:56.366561580Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: abfa3209-d0e9-4fdf-b834-084462ca6fb3

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/documentation/service_policy_rules/service-policy-rule-1?response_format=0'

curl response:

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

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "823",
  "metadata": {
    "name": "service-policy-rule-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "abfa3209-d0e9-4fdf-b834-084462ca6fb3",
    "creation_timestamp": "2021-08-25T09:03:56.366561580Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "action": "ALLOW",
    "client_name_matcher": {
      "exact_values": [
      ],
      "regex_values": [
        ".+\.ves.io"
      ]
    },
    "client_role": {
      "match": "app-user"
    },
    "server_selector": null,
    "label_matcher": {
      "keys": [
        "ves.io/appType"
      ]
    },
    "path": {
      "prefix_values": [
      ],
      "exact_values": [
        "/register",
        "/guest-play"
      ],
      "regex_values": [
      ],
      "transformers": [
      ]
    },
    "headers": [
      {
        "name": "Accept-Language",
        "item": {
          "exact_values": [
            "en-US"
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "invert_matcher": false
      },
      {
        "name": "Accept-Encoding",
        "item": {
          "exact_values": [
            "gzip",
            "deflate"
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "invert_matcher": false
      }
    ],
    "query_params": [
      {
        "key": "guest-user-name",
        "item": {
          "exact_values": [
            "guest"
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "invert_matcher": false
      }
    ],
    "http_method": null,
    "any_ip": {

    },
    "any_asn": {

    },
    "api_group_matcher": null,
    "port_matcher": null,
    "expiration_timestamp": null,
    "body_matcher": null,
    "arg_matchers": [
    ],
    "cookie_matchers": [
    ],
    "waf_action": {
      "none": {

      }
    },
    "domain_matcher": null,
    "rate_limiter": [
    ],
    "virtual_host_matcher": null,
    "tls_fingerprint_matcher": null,
    "malicious_user_mitigation_bypass": null,
    "scheme": [
    ],
    "url_matcher": null,
    "l4_dest_matcher": null,
    "challenge_action": "DEFAULT_CHALLENGE",
    "goto_policy": [
    ],
    "content_rewrite_action": null,
    "shape_protected_endpoint_action": null
  },
  "status": [
  ],
  "referring_objects": [
  ]
}