ves-io-schema-kms_policy_rule-API-Create

Examples of creating kmspolicyrule

Usecase:

Create kms-policy-rule-1

Request using vesctl:

vesctl configuration create kms_policy_rule -i kms_policy_rule.yaml

where file kmspolicyrule.yaml has following contents (kmspolicyrule.CreateRequest):

metadata:
  name: kms-policy-rule-1
  namespace: documentation
spec:
  action: ALLOW
  clientNameMatcher:
    regexValues:
    - akar\.gc(\d)*\.int\.ves\.io

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: kms-policy-rule-1
  namespace: documentation
spec:
  action: ALLOW
  clientNameMatcher:
    exactValues: []
    regexValues:
    - akar\.gc(\d)*\.int\.ves\.io
systemMetadata:
  creationTimestamp: "2020-07-02T15:53:10.946080200Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: ec8a14e6-9be2-414e-8dfc-a304d016c40b

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"kms-policy-rule-1","namespace":"documentation"},"spec":{"action":"ALLOW","clientNameMatcher":{"regexValues":["akar\.gc(\d)*\.int\.ves\.io"]}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_policy_rules'

curl response:

HTTP/1.1 200 OK
Content-Length: 866
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:10 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-policy-rule-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "ec8a14e6-9be2-414e-8dfc-a304d016c40b",
    "creation_timestamp": "2020-07-02T15:53:10.946080200Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "action": "ALLOW",
    "client_name": "",
    "client_selector": null,
    "client_name_matcher": {
      "exact_values": [
      ],
      "regex_values": [
        "akar\.gc(\d)*\.int\.ves\.io"
      ]
    },
    "label_matcher": null,
    "operation": null
  }
}