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
object:
  metadata:
    annotations: {}
    labels: {}
    name: service-policy-rule-1
    namespace: documentation
    uid: 4e9b2970-7b09-4748-87de-adac017a54eb
  spec:
    gcSpec:
      argMatchers: []
      clientNameMatcher:
        exactValues: []
        regexValues: []
        transformers: []
      cookieMatchers: []
      domainMatcher:
        exactValues: []
        regexValues: []
        transformers: []
      forwardingClass: []
      headers: []
      queryParams: []
      rateLimiter: []
      virtualHostMatcher:
        exactValues: []
        regexValues: []
        transformers: []
  systemMetadata:
    creationTimestamp: "2020-09-16T10:50:50.301622900Z"
    creatorClass: examplesvc
    creatorId: examplesvc
    finalizers: []
    namespace:
    - kind: namespace
      name: documentation
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 1f49d8548a9e6ffe:1f49d8548a9e6ffe:0:1
    uid: 4e9b2970-7b09-4748-87de-adac017a54eb
resourceVersion: "599"
spec:
  argMatchers: []
  clientNameMatcher:
    exactValues: []
    regexValues: []
  cookieMatchers: []
  domainMatcher:
    exactValues: []
    regexValues: []
  headers: []
  queryParams: []
  rateLimiter: []
  virtualHostMatcher:
    exactValues: []
    regexValues: []
status: []
systemMetadata:
  creationTimestamp: "2020-09-16T10:50:50.301622900Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 4e9b2970-7b09-4748-87de-adac017a54eb

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_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, 16 Sep 2020 10:50:50 GMT
Vary: Accept-Encoding

{
  "object": {
    "metadata": {
      "name": "service-policy-rule-1",
      "namespace": "documentation",
      "uid": "4e9b2970-7b09-4748-87de-adac017a54eb",
      "labels": {
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "4e9b2970-7b09-4748-87de-adac017a54eb",
      "creation_timestamp": "2020-09-16T10:50:50.301622900Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc",
      "creator_id": "examplesvc",
      "creator_cookie": "",
      "trace_info": "1f49d8548a9e6ffe:1f49d8548a9e6ffe:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "documentation"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "action": "DENY",
        "client_name": "",
        "client_selector": null,
        "client_role": null,
        "client_name_matcher": {
          "exact_values": [
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "label_matcher": null,
        "path": null,
        "headers": [
        ],
        "query_params": [
        ],
        "http_method": null,
        "ip_matcher": null,
        "asn_matcher": null,
        "api_group_matcher": null,
        "port_matcher": null,
        "expiration_timestamp": null,
        "body_matcher": null,
        "arg_matchers": [
        ],
        "cookie_matchers": [
        ],
        "waf_action": null,
        "domain_matcher": {
          "exact_values": [
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "rate_limiter": [
        ],
        "virtual_host_matcher": {
          "exact_values": [
          ],
          "regex_values": [
          ],
          "transformers": [
          ]
        },
        "tls_fingerprint_matcher": null,
        "forwarding_class": [
        ],
        "malicious_user_mitigation": null,
        "malicious_user_mitigation_bypass": null
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "599",
  "metadata": {
    "name": "service-policy-rule-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "4e9b2970-7b09-4748-87de-adac017a54eb",
    "creation_timestamp": "2020-09-16T10:50:50.301622900Z",
    "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": "DENY",
    "client_name": "",
    "client_selector": null,
    "client_role": null,
    "client_name_matcher": {
      "exact_values": [
      ],
      "regex_values": [
      ]
    },
    "label_matcher": null,
    "path": null,
    "headers": [
    ],
    "query_params": [
    ],
    "http_method": null,
    "ip_matcher": null,
    "asn_matcher": null,
    "api_group_matcher": null,
    "port_matcher": null,
    "expiration_timestamp": null,
    "body_matcher": null,
    "arg_matchers": [
    ],
    "cookie_matchers": [
    ],
    "waf_action": null,
    "domain_matcher": {
      "exact_values": [
      ],
      "regex_values": [
      ]
    },
    "rate_limiter": [
    ],
    "virtual_host_matcher": {
      "exact_values": [
      ],
      "regex_values": [
      ]
    },
    "tls_fingerprint_matcher": null,
    "malicious_user_mitigation": null,
    "malicious_user_mitigation_bypass": null
  },
  "status": [
  ]
}