ves-io-schema-cloud_credentials-API-Create

Examples of creating cloud_credentials

Usecase:

Create cloud_credentials object that will be used by volterra services to access cloud API on users behalf.

Request using vesctl:

vesctl configuration create cloud_credentials -i cloud_credentials.yaml

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

metadata:
  name: aws-cloud-credentials
  namespace: system
spec:
  awsSecretKey:
    accessKey: abcdefghijkl
    secretKey:
      clearSecretInfo:
        url: string://<base64>

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: aws-cloud-credentials
  namespace: system
spec:
  awsSecretKey:
    accessKey: abcdefghijkl
    secretKey:
      clearSecretInfo:
        url: string://<base64>
systemMetadata:
  creationTimestamp: "2020-05-15T10:52:32.696193139Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: c811c385-466a-470a-a990-4f3d10899bf5

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"aws-cloud-credentials","namespace":"system"},"spec":{"awsSecretKey":{"accessKey":"abcdefghijkl","secretKey":{"clearSecretInfo":{"url":"string://\u003cbase64\u003e"}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/cloud_credentialss'

curl response:

HTTP/1.1 200 OK
Content-Length: 853
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:32 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "aws-cloud-credentials",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "c811c385-466a-470a-a990-4f3d10899bf5",
    "creation_timestamp": "2020-05-15T10:52:32.696193139Z",
    "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": {
    "aws_secret_key": {
      "access_key": "abcdefghijkl",
      "secret_key": {
        "clear_secret_info": {
          "provider": "",
          "url": "string://\u003cbase64\u003e"
        },
        "secret_encoding_type": "EncodingNone"
      }
    }
  }
}