create-service - Cloud Foundry CLI Reference Guide


名称

create-service - 创建服务实例

用法

cf create-service SERVICE PLAN SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [-t TAGS] Optionally provide service-specific configuration parameters in a valid JSON object in-line: cf create-service SERVICE PLAN 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 create-service SERVICE PLAN SERVICE_INSTANCE -c PATH_TO_FILE Example of valid JSON object: { "cluster_nodes": { "count": 5, "memory_mb": 1024 } }

TIP

Use 'cf create-user-provided-service' to make user-provided services available to CF apps

EXAMPLES

Linux/Mac: cf create-service db-service silver mydb -c '{"ram_gb":4}' Windows Command Line: cf create-service db-service silver mydb -c "{\"ram_gb\":4}" Windows PowerShell: cf create-service db-service silver mydb -c '{\"ram_gb\":4}' cf create-service db-service silver mydb -c ~/workspace/tmp/instance_config.json cf create-service db-service silver mydb -t "list, of, tags"

别名

cs

选项

-c

包含特定于服务的配置参数的有效 JSON 对象,以直接插入方式提供或在文件中提供。有关受支持配置参数的列表,请参阅特定服务产品的文档。

-t

用户提供的标记

另请参阅

bind-service, create-user-provided-service, marketplace, services