diff --git a/node.js/cds-connect.md b/node.js/cds-connect.md index 26b1147e0..9e59b8548 100644 --- a/node.js/cds-connect.md +++ b/node.js/cds-connect.md @@ -384,8 +384,123 @@ Here are a few examples: +If the `vcap` configuration contains multiple properties such as `name`, `label`, `tags`, `plan`, all properties have to match the corresponding VCAP_SERVICE attributes: + + + + + + + + + + + + + + + +
CAP configVCAP_SERVICES
+ + +```json +{ + "cds": { + "requires": { + "hana": { + "vcap": { + "label": "hana", + "plan": "standard", + "name": "myHana", + "tags": "database" + } + } + } + } +} +``` + +```json +{ + "VCAP_SERVICES": { + "hana": [{ + "label": "hana", + "plan": "standard", + "name": "myHana", + "tags": ["database"] + }] + } +} +``` +
+ +CAP services often come with a default `vcap` configuration. In rare cases, the default configuration has to be deactivated which can be achieved by explicitly setting the service property `vcap.` to `false`: + + + + + + + + + + + + + + + + +
CAP configVCAP_SERVICES
+ + +```json +{ + "cds": { + "requires": { + "hana": { + "vcap": { + "label": false, + "name": "myHana", + "tags": "database" + } + } + } + } +} +``` + + +```json +{ + "VCAP_SERVICES": { + "myHana-binding": [{ + "label": "not-hana", + "plan": "standard", + "name": "myHana", + "tags": ["database"] + }] + } +} +``` +
+ +::: tip To see the default configuration of a CAP service, use: + +```js +cds env get requires. +``` +::: ### In Kubernetes / Kyma { #in-kubernetes-kyma}