bind-service - Cloud Foundry CLI Reference Guide


NAME

bind-service - Bind a service instance to an app

USAGE

cf bind-service APP_NAME SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [--binding-name BINDING_NAME] Optionally provide service-specific configuration parameters in a valid JSON object in-line: cf bind-service APP_NAME SERVICE_INSTANCE -c '{"name":"value","name":"value"}' Optionally provide a file containing service-specific configuration parameters in a valid JSON object. The path to the parameters file can be an absolute or relative path to a file. cf bind-service APP_NAME SERVICE_INSTANCE -c PATH_TO_FILE Example of valid JSON object: { "permissions": "read-only" } Optionally provide a binding name for the association between an app and a service instance: cf bind-service APP_NAME SERVICE_INSTANCE --binding-name BINDING_NAME

EXAMPLES

Linux/Mac: cf bind-service myapp mydb -c '{"permissions":"read-only"}' Windows Command Line: cf bind-service myapp mydb -c "{\"permissions\":\"read-only\"}" Windows PowerShell: cf bind-service myapp mydb -c '{\"permissions\":\"read-only\"}' cf bind-service myapp mydb -c ~/workspace/tmp/instance_config.json --binding-name BINDING_NAME

ALIAS

bs

OPTIONS

--binding-name

Name to expose service instance to app process with (Default: service instance name)

-c

Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering.

SEE ALSO

services