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

Class: Organizations

Organizations(endPoint, options) → {void}

Manage Organizations in Cloud Foundry Supports both Cloud Foundry API v2 and v3

Constructor

new Organizations(endPoint, options) → {void}

Parameters:
Name Type Description
endPoint String [CC endpoint]
options Object [Configuration options]
Source:
Returns:
Type
void

Methods

add(orgOptions) → {Promise}

Parameters:
Name Type Description
orgOptions Object [Organization options]
Source:
Returns:
[Promise resolving to created organization]
Type
Promise

getAllOrganizations(filteropt) → {Promise.<Array>}

Get ALL organizations across all pages (auto-pagination). Returns a flat array of every organization resource. Results are cached when caching is enabled.
Parameters:
Name Type Attributes Description
filter Object <optional>
Base filter (merged with pagination params)
Source:
Returns:
Flat array of all organization resources
Type
Promise.<Array>

getAuditors(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to auditors list]
Type
Promise

getManagers(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to managers list]
Type
Promise

getMemoryUsage(guid) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
Source:
Returns:
[Promise resolving to memory usage]
Type
Promise

getOrganization(guid) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
Source:
Returns:
[Promise resolving to organization]
Type
Promise

getOrganizationByName(name) → {Promise}

Find an Organization by name using server-side filtering. Returns the first matching resource or null if not found. v2: Uses q=name:{name} filter v3: Uses names={name} filter
Parameters:
Name Type Description
name String [Organization name]
Source:
Returns:
[Promise resolving to organization resource or null]
Type
Promise

getOrganizations(filter) → {Promise}

Parameters:
Name Type Description
filter Object [Filter options]
Source:
Returns:
[Promise resolving to organizations list]
Type
Promise

getPrivateDomains(guid, filter) → {Promise}

Get private domains from an Organization v2: http://apidocs.cloudfoundry.org/214/organizations/list_all_private_domains_for_the_organization.html v3: https://v3-apidocs.cloudfoundry.org/#list-domains-for-an-organization NOTE (v3): /v3/organizations/:guid/domains returns all domains accessible to the org (both owned/private and shared). The v3 API does not support a `visibility` query parameter. Client-side filtering on `relationships.organization.data` is needed for strict private-only results.
Parameters:
Name Type Description
guid String [Organization GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to domains list]
Type
Promise

getSummary(guid) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
Source:
Returns:
[Promise resolving to organization summary]
Type
Promise

getUsers(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to users list]
Type
Promise

remove(guid, deleteOptions) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
deleteOptions Object [Delete options (async, purge, etc.)]
Source:
Returns:
[Promise resolving to job details]
Type
Promise

update(guid, orgOptions) → {Promise}

Parameters:
Name Type Description
guid String [Organization GUID]
orgOptions Object [Organization options]
Source:
Returns:
[Promise resolving to updated organization]
Type
Promise