cf-node-client
momo auto_awesome BUY CLAUDE KIT WITH 20% OFF coffee BUY ME COFFEE

Class: ServicePlans

ServicePlans(endPointopt, optionsopt)

Manages Service Plans on Cloud Foundry. Supports both CF API v2 and v3 with automatic version routing. NOTE: V3 methods that need query-string filters use this.REST.request() with manual headers + qs, while simple v3 calls use this.REST.requestV3(). This is because requestV3() does not support the qs parameter.

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)
Source:

Methods

getServicePlan(guid) → {Promise}

Parameters:
Name Type Description
guid String Service plan GUID
Source:
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
Source:
Returns:
Resolves with JSON service instances list
Type
Promise

getServicePlans(filteropt) → {Promise}

Parameters:
Name Type Attributes Description
filter Object <optional>
Query-string filter options
Source:
Returns:
Resolves with JSON service plans list
Type
Promise

remove(guid) → {Promise}

Parameters:
Name Type Description
guid String Service plan GUID
Source:
Returns:
Resolves with response
Type
Promise