Constructor
new ServicePlans(endPointopt, optionsopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
endPoint |
String |
<optional> |
Cloud Controller API endpoint URL | |
options |
Object |
<optional> |
{} | Options (same as CloudControllerBase) |
Methods
getServicePlan(guid) → {Promise}
Get a single Service Plan by GUID
v2: https://apidocs.cloudfoundry.org/226/service_plans/retrieve_a_particular_service_plan.html
v3: https://v3-apidocs.cloudfoundry.org/#get-a-service-plan
Parameters:
| Name | Type | Description |
|---|---|---|
guid |
String | Service plan GUID |
Returns:
Resolves with JSON service plan
- Type
- Promise
getServicePlanInstances(guid) → {Promise}
List all Service Instances for a Service Plan
v2: https://apidocs.cloudfoundry.org/226/service_plans/list_all_service_instances_for_the_service_plan.html
v3: Uses /v3/service_instances with service_plan_guids filter
Parameters:
| Name | Type | Description |
|---|---|---|
guid |
String | Service plan GUID |
Returns:
Resolves with JSON service instances list
- Type
- Promise
getServicePlans(filteropt) → {Promise}
Get Service Plans
v2: https://apidocs.cloudfoundry.org/226/service_plans/list_all_service_plans.html
v3: https://v3-apidocs.cloudfoundry.org/#list-service-plans
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filter |
Object |
<optional> |
Query-string filter options |
Returns:
Resolves with JSON service plans list
- Type
- Promise
remove(guid) → {Promise}
Remove a Service Plan
v2: https://apidocs.cloudfoundry.org/226/service_plans/delete_a_particular_service_plans.html
v3: https://v3-apidocs.cloudfoundry.org/#delete-a-service-plan
Parameters:
| Name | Type | Description |
|---|---|---|
guid |
String | Service plan GUID |
Returns:
Resolves with response
- Type
- Promise