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
resourceVersion: "750"
spec:
denyAllRequests: {}
rules: []
serverSelector:
expressions:
- geoip.ves.io/region in (US-West), deployment in (testing)
simpleRules: []
status: []
systemMetadata:
creationTimestamp: "2021-03-31T08:29:54.574077100Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 8f04b005-cda3-46e5-a7ee-d6b66dd04ec9
Request using curl:
curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_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: 982
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:29:54 GMT
Vary: Accept-Encoding
{
"object": null,
"create_form": null,
"replace_form": null,
"resource_version": "750",
"metadata": {
"name": "service-policy-1",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "8f04b005-cda3-46e5-a7ee-d6b66dd04ec9",
"creation_timestamp": "2021-03-31T08:29:54.574077100Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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": [
]
}