Constructor
new UserProvidedServices(endPointopt, optionsopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
endPoint |
String |
<optional> |
Cloud Controller API endpoint URL | |
options |
Object |
<optional> |
{} | Options (same as CloudControllerBase) |
Methods
add(upsOptions) → {Promise}
Create a user-provided service
v2: http://apidocs.cloudfoundry.org/217/user_provided_service_instances/creating_a_user_provided_service_instance.html
v3: https://v3-apidocs.cloudfoundry.org/#create-a-service-instance
Parameters:
| Name | Type | Description |
|---|---|---|
upsOptions |
Object | User provided service options |
Returns:
Resolves with JSON response
- Type
- Promise
getService(guid) → {Promise}
Get a specific user-provided service
v2: http://apidocs.cloudfoundry.org/217/user_provided_service_instances/retrieve_a_particular_user_provided_service_instance.html
v3: https://v3-apidocs.cloudfoundry.org/#get-a-service-instance
Parameters:
| Name | Type | Description |
|---|---|---|
guid |
String | Service GUID |
Returns:
Resolves with JSON service
- Type
- Promise
getServiceBindings(guid, filteropt) → {Promise}
Get service bindings for a user-provided service
v2: http://apidocs.cloudfoundry.org/221/user_provided_service_instances/list_all_service_bindings_for_the_user_provided_service_instance.html
v3: Uses /v3/service_credential_bindings with service_instance_guids filter
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
guid |
String | Service GUID | |
filter |
Object |
<optional> |
Query-string filter options |
Returns:
Resolves with JSON bindings list
- Type
- Promise
getServices() → {Promise}
Get user-provided services
v2: http://apidocs.cloudfoundry.org/217/user_provided_service_instances/list_all_user_provided_service_instances.html
v3: Uses /v3/service_instances with type=user-provided filter
Returns:
Resolves with JSON services list
- Type
- Promise
remove(guid) → {Promise}
Remove a user-provided service
v2: http://apidocs.cloudfoundry.org/217/user_provided_service_instances/delete_a_particular_user_provided_service_instance.html
v3: https://v3-apidocs.cloudfoundry.org/#delete-a-service-instance
Parameters:
| Name | Type | Description |
|---|---|---|
guid |
String | Service GUID |
Returns:
Resolves with response
- Type
- Promise