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: "2021-05-12T11:17:36.611534839Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 17f1138d-aa38-46e0-aa9c-7f679ab25c6b

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-build672621555_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: 904
Content-Type: application/json
Date: Wed, 12 May 2021 11:17:36 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "aws-cloud-credentials",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "17f1138d-aa38-46e0-aa9c-7f679ab25c6b",
    "creation_timestamp": "2021-05-12T11:17:36.611534839Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "aws_secret_key": {
      "access_key": "abcdefghijkl",
      "secret_key": {
        "clear_secret_info": {
          "provider": "",
          "url": "string://\u003cbase64\u003e"
        },
        "blindfold_secret_info_internal": null,
        "secret_encoding_type": "EncodingNone"
      }
    }
  }
}