Services Instances

Creating a service instance

To create a new instance of a service:

data = {
    'name': 'my-dummy-instance',
    'service': 'dummy-service',
    'plan': 'dummy-plan',
    'description': 'A service instance with a dumb name',
    'owner': 'my-team',
}
client = TsuruClient()
client.services_instances.create(data)

Binding to an app

To bind a service instance to an app, call bind method:

client = TsuruClient()
app = client.apps.get('my-app')
app.services.bind('service-type', 'my-service-instance')