create-user-provided-service - Cloud Foundry CLI Reference Guide


名称

create-user-provided-service - 使用户提供的服务实例可供 CF 应用程序使用

用法

cf create-user-provided-service SERVICE_INSTANCE [-p CREDENTIALS] [-l SYSLOG_DRAIN_URL] [-r ROUTE_SERVICE_URL] [-t TAGS] Pass comma separated credential parameter names to enable interactive mode: cf create-user-provided-service SERVICE_INSTANCE -p "comma, separated, parameter, names" Pass credential parameters as JSON to create a service non-interactively: cf create-user-provided-service SERVICE_INSTANCE -p '{"key1":"value1","key2":"value2"}' Specify a path to a file containing JSON: cf create-user-provided-service SERVICE_INSTANCE -p PATH_TO_FILE

EXAMPLES

cf create-user-provided-service my-db-mine -p "username, password" cf create-user-provided-service my-db-mine -p /path/to/credentials.json cf create-user-provided-service my-db-mine -t "list, of, tags" cf create-user-provided-service my-drain-service -l syslog://example.com cf create-user-provided-service my-route-service -r https://example.com Linux/Mac: cf create-user-provided-service my-db-mine -p '{"username":"admin","password":"pa55woRD"}' Windows Command Line: cf create-user-provided-service my-db-mine -p "{\"username\":\"admin\",\"password\":\"pa55woRD\"}" Windows PowerShell: cf create-user-provided-service my-db-mine -p '{\"username\":\"admin\",\"password\":\"pa55woRD\"}'

别名

cups

选项

-l

绑定应用程序的日志汇集到的目标 URL

-p

以直接插入方式提供或在文件中提供的凭证,将在 VCAP_SERVICES 环境变量中为绑定应用程序公开

-r

将绑定路径的请求转发到的目标 URL。此 URL 的方案必须是 https

-t

用户提供的标记

另请参阅

bind-service, services