Home Reference Source
import {ComputeResourceAdminList} from '@fnndsc/chrisapi'
public class | source

ComputeResourceAdminList

Extends:

ResourceListResource → ComputeResourceAdminList

Compute resource admin list resource object representing a list of compute resource admins.

Constructor Summary

Public Constructor
public

constructor(url: string, auth: Object)

Constructor

Member Summary

Public Members
public

Method Summary

Public Methods
public

post(data: Object, timeout: number): Promise<this>

Make a POST request to this compute resource admin list resource to create a new compute resource admin item resource through the REST API.

Inherited Summary

From class Resource
public static

cloneObj(obj: Object): *

Helper method to make a deep copy clone of the passed object resource.

public get

Return true if the resource object contains any data.

public
public
public
public
public

Make a deep copy clone of this object resource.

From class ListResource
public get

Get the list of item data objects (REST API descriptors).

public get

Return true if the list resource object has a next list page in the paginated REST API.

public get

Return true if the list resource object has a previous list page in the paginated REST API.

public get

Get the total count of items of the entire collection across pages in the paginated REST API.

public
public
public
public
public

get(searchParams: Object, timeout: number): Promise<this>

Fetch this list resource from the REST API based on search parameters.

public

Get an item resource object given its id from the list of items in this list resource object.

public

Get an array of item resource objects corresponding to the items in this list resource object.

public

Get an array of parameter names that can be used as properties of the data object in POST requests.

public

Get an array of search parameter names that can be used as properties of the searchParams argument to the get method.

private

_getResource(linkRelation: string, ResourceClass: Object, searchParams: Object, timeout: number): Promise<ResourceClass>

Internal method to fetch a related resource from the REST API that is referenced by a link relation within this list resource's collection object.

private

_post(data: Object, uploadFileObj: Object, timeout: number): Promise<this>

Internal helper method to make a POST request to this list resource through the REST API.

Public Constructors

public constructor(url: string, auth: Object) source

Constructor

Override:

ListResource#constructor

Params:

NameTypeAttributeDescription
url string

url of the resource

auth Object

authentication object

auth.token string

authentication token

Public Members

public itemClass: Object source

Override:

ListResource#itemClass

Public Methods

public post(data: Object, timeout: number): Promise<this> source

Make a POST request to this compute resource admin list resource to create a new compute resource admin item resource through the REST API.

Params:

NameTypeAttributeDescription
data Object

request JSON data object

data.name string

compute resource name

data.compute_url string

compute resource's url

data.compute_user string

compute resource's user

data.compute_password string

compute resource's password

data.compute_auth_url string
  • optional

compute resource's auth url

data.compute_auth_token string
  • optional
  • default: 'initial_token'

compute resource's auth token

data.description string
  • optional

compute resource's description

data.max_job_exec_seconds number
  • optional
  • default: -1

compute resource's max job execution in seconds

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<this>

JS Promise, resolves to this object