cf
command.{"data":{"whitelistIPs":[<IP addresses>]}}
come from in the command?cf update-service vital-hc-hana \
-c '{"data":{"whitelistIPs":["128.127.12.xxx", "193.16.224.xxx/24"]}}'
Remark: if you are using Windows OS you might need to adjust some commands from the Linux-style command line I am using here.
cf
commandcf
CLI communicates with CF resources via APIs. You can see what happens behind the curtain when running cf
with the environment variable CF_TRACE
set to either true
(to send diagnostics to stdout) or to path/to/trace.log
(to send diagnostics to a log file)./tmp/hc_update.log
.CF_TRACE=/tmp/hc_update.log \
cf update-service vital-hc-hana \
-c '{"data":{"whitelistIPs":["128.127.12.xxx"]}}'
cf update-service
command.grep -A 1 REQUEST /tmp/hc_update.log | grep /
PUT
request for a resource /v2/service_instances/8e1a286a-21d7-404d-8d7a-8c77d2a77050
and we can make an educated guess it is the one that calls API to update the service definition.--guid
option to e.g. cf service
command.cf service vital-hc-hana --guid
id
and in the server's URL. What a coincidence 😉cf curl
that allows you to call CF APIs from the command line. So, let's try it with the /v2/service_instances/:guid
API, which we've seen above.cf curl /v2/service_instances/$(cf service vital-hc-hana --guid)/parameters
...or having a utility like jq
installed we can return only the portion of service definition used to set allowed IP addresses.
cf curl /v2/service_instances/$(cf service vital-hc-hana --guid)/parameters \
| jq '.data.whitelistIPs'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
25 | |
17 | |
13 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 |