update-service - Cloud Foundry CLI Reference Guide


名称

update-service - 更新服务实例

用法

cf update-service SERVICE_INSTANCE [-p NEW_PLAN] [-c PARAMETERS_AS_JSON] [-t TAGS] [--upgrade] Optionally provide service-specific configuration parameters in a valid JSON object in-line: cf update-service 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 update-service SERVICE_INSTANCE -c PATH_TO_FILE Example of valid JSON object: { "cluster_nodes": { "count": 5, "memory_mb": 1024 } } Optionally provide a list of comma-delimited tags that will be written to the VCAP_SERVICES environment variable for any bound applications.

EXAMPLES

cf update-service mydb -p gold cf update-service mydb -c '{"ram_gb":4}' cf update-service mydb -c ~/workspace/tmp/instance_config.json cf update-service mydb -t "list, of, tags" cf update-service mydb --upgrade cf update-service mydb --upgrade --force

选项

-c

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

-p

更改服务实例的服务套餐

-t

用户提供的标记

--upgrade, -u

Upgrade the service instance to the latest version of the service plan available. It cannot be combined with flags: -c, -p, -t.

--force, -f

Force the upgrade to the latest available version of the service plan. It can only be used with: -u, --upgrade.

另请参阅

rename-service, services, update-user-provided-service