Home > Software engineering >  Is it possible to update service with a bound application
Is it possible to update service with a bound application

Time:08-15

Is it possible for an app bound to a service to update this service? Or is it something only an admin Cf can do ?

For instance, I would like to execute the following command

cf update-service test_db -c '{​​​​​"data":{"serviceStopped":true}}'

What I have in mind: create an app bound to test_db to update the value of the dictionnary.

CodePudding user response:

Is it possible for an app bound to a service to update this service? Or is it something only an admin Cf can do ?

Yes, but it requires credentials. The application on CF itself has no permissions, so you would need to supply the credentials of a user or client that has permissions that the application can use to update the service.

Any user or client that is in the same org and space as the service with the SpaceDev role will have access to update the service.

If you want to have an application make calls to the Cloud Controller, like to update a database, you can do that by embedding the cf CLI and invoking it, you can use a library like the cf-java-client, or you can use the REST API directly.

  • Related