ves-io-schema-secret_policy-API-Get

Examples of getting secret_policy

Usecase:

Get secret-policy-1

Request using vesctl:

vesctl configuration get secret_policy secret-policy-1 --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: secret-policy-1
  namespace: documentation
referringObjects: []
resourceVersion: "756"
spec:
  decryptCacheTimeout: 604800s
  rules:
  - kind: secret_policy_rule
    name: secret-policy-rule-1
    namespace: documentation
    tenant: acmecorp
status: []
systemMetadata:
  creationTimestamp: "2021-06-02T10:22:08.802225377Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 064a64a9-53db-4ee9-88a5-9cbcc87e0d96

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186462253_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/secret_management/namespaces/documentation/secret_policys/secret-policy-1?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Length: 1098
Content-Type: application/json
Date: Wed, 02 Jun 2021 10:22:08 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "756",
  "metadata": {
    "name": "secret-policy-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "064a64a9-53db-4ee9-88a5-9cbcc87e0d96",
    "creation_timestamp": "2021-06-02T10:22:08.802225377Z",
    "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",
    "rules": [
      {
        "kind": "secret_policy_rule",
        "uid": "",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "secret-policy-rule-1"
      }
    ],
    "allow_volterra": false,
    "decrypt_cache_timeout": "604800s",
    "marked_for_delete": false,
    "deletion_time": null
  },
  "status": [
  ],
  "referring_objects": [
  ]
}