ves-io-schema-service_policy-API-Get
On This Page:
Examples of getting service_policy
Usecase:
Get service-policy-1
Request using vesctl:
vesctl configuration get service_policy service-policy-1 --namespace documentation
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: service-policy-1
namespace: documentation
referringObjects: []
resourceVersion: "1536"
spec:
denyAllRequests: {}
rules: []
serverSelector:
expressions:
- geoip.ves.io/region in (US-West), deployment in (testing)
simpleRules: []
status: []
systemMetadata:
creationTimestamp: "2022-07-28T12:11:53.787454845Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
labels: {}
tenant: acmecorp
uid: f89744a7-71d2-4301-b630-c027238f464d
Request using curl:
curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/service_policys/service-policy-1?response_format=0'
curl response:
HTTP/1.1 200 OK
Content-Length: 1036
Content-Type: application/json
Date: Thu, 28 Jul 2022 12:11:53 GMT
Vary: Accept-Encoding
X-Volterra-Response-Fields-Deprecated: object
{
"object": null,
"create_form": null,
"replace_form": null,
"resource_version": "1536",
"metadata": {
"name": "service-policy-1",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "f89744a7-71d2-4301-b630-c027238f464d",
"creation_timestamp": "2022-07-28T12:11:53.787454845Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"algo": "FIRST_MATCH",
"server_selector": {
"expressions": [
"geoip.ves.io/region in (US-West), deployment in (testing)"
]
},
"port_matcher": null,
"rules": [
],
"deny_all_requests": {
},
"simple_rules": [
]
},
"status": [
],
"referring_objects": [
]
}