ves-io-schema-cloud_credentials-API-Create
On This Page:
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-02-22T15:43:37.951128300Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 51682177-0482-4129-919b-3b6ca804c59d
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-build817539475_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: Mon, 22 Feb 2021 15:43:37 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "aws-cloud-credentials",
"namespace": "system",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "51682177-0482-4129-919b-3b6ca804c59d",
"creation_timestamp": "2021-02-22T15:43:37.951128300Z",
"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"
}
}
}
}