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

Class: CloudController

CloudController(endPointopt, optionsopt)

Entry point for the Cloud Foundry Controller. Supports both CF API v2 and v3 with automatic version routing. https://github.com/cloudfoundry/cloud_controller_ng

Constructor

new CloudController(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

getAuthorizationEndpoint() → {Promise.<String>}

Get the UAA authorization endpoint URL from Cloud Controller info. Works with both v2 and v3 — abstracts away the response shape difference.
Source:
Throws:
If authorization endpoint is not found in the info response
Type
Error
Returns:
Resolves with the authorization endpoint URL
Type
Promise.<String>

getFeaturedFlag(flag) → {Promise}

Parameters:
Name Type Description
flag String Feature flag name
Source:
Returns:
Resolves with JSON feature flag
Type
Promise

getFeaturedFlags() → {Promise}

Source:
Returns:
Resolves with JSON feature flags list
Type
Promise

getInfo() → {Promise}

Get information from Cloud Controller. v2: http://apidocs.cloudfoundry.org/214/info/get_info.html v3: Uses the root endpoint (/) — CF v3 has no /v3/info. The response is **normalized** so that `authorization_endpoint` and `token_endpoint` are always present at the top level, keeping backward compatibility with existing consumer code.
Source:
Returns:
Resolves with JSON info (always contains `authorization_endpoint` and `token_endpoint`)
Type
Promise

setFeaturedFlag(flag, flagOptionsopt) → {Promise}

Parameters:
Name Type Attributes Description
flag String Feature flag name
flagOptions Object <optional>
v3 body (e.g. { enabled: true })
Source:
Returns:
Resolves with JSON response
Type
Promise