CoreService

<back to all web services

QueryResourceGroups

ResourceGroup - CRUD

GetResourceGroups

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/resourcegroups/Returns all resourcegroups
GET/resourcegroups/Returns all resourcegroups
"use strict";
export class QueryBase {
    /** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    skip;
    /** @type {?number} */
    take;
    /** @type {?string} */
    orderBy;
    /** @type {?string} */
    orderByDesc;
    /** @type {?string} */
    include;
    /** @type {?string} */
    fields;
    /** @type {?{ [index:string]: string; }} */
    meta;
}
/** @typedef T {any} */
export class QueryDb extends QueryBase {
    /** @param {{skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class Auditable {
    /** @param {{created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    created;
    /** @type {string} */
    createUser;
    /** @type {string} */
    createUserId;
    /** @type {string} */
    modified;
    /** @type {string} */
    modifyUser;
    /** @type {string} */
    modifyUserId;
    /** @type {boolean} */
    isDeleted;
    /** @type {?string} */
    deleted;
    /** @type {?string} */
    deleteUser;
    /** @type {?string} */
    deleteUserId;
}
/** @typedef {'None'|'ConfigItem'|'Tenant'|'Collection'|'Resource'|'ComputeNode'|'VirtualMachine'|'PhysicalMachine'|'Disk'|'Subnet'|'IPAddress'|'Job'|'JobEvent'|'FreezePeriod'|'ResourceGroup'|'Deployment'|'ResourceGroupTemplate'|'DeploymentTemplate'|'ResourceProvider'|'GenericResource'|'Role'|'Permission'|'User'|'PatchingWindow'|'Update'|'ReportDefinition'|'TimeSeries'|'DataPoint'|'Action'|'ActionAssignment'|'UserNote'} */
export var ObjectTypes;
(function (ObjectTypes) {
    ObjectTypes["None"] = "None"
    ObjectTypes["ConfigItem"] = "ConfigItem"
    ObjectTypes["Tenant"] = "Tenant"
    ObjectTypes["Collection"] = "Collection"
    ObjectTypes["Resource"] = "Resource"
    ObjectTypes["ComputeNode"] = "ComputeNode"
    ObjectTypes["VirtualMachine"] = "VirtualMachine"
    ObjectTypes["PhysicalMachine"] = "PhysicalMachine"
    ObjectTypes["Disk"] = "Disk"
    ObjectTypes["Subnet"] = "Subnet"
    ObjectTypes["IPAddress"] = "IPAddress"
    ObjectTypes["Job"] = "Job"
    ObjectTypes["JobEvent"] = "JobEvent"
    ObjectTypes["FreezePeriod"] = "FreezePeriod"
    ObjectTypes["ResourceGroup"] = "ResourceGroup"
    ObjectTypes["Deployment"] = "Deployment"
    ObjectTypes["ResourceGroupTemplate"] = "ResourceGroupTemplate"
    ObjectTypes["DeploymentTemplate"] = "DeploymentTemplate"
    ObjectTypes["ResourceProvider"] = "ResourceProvider"
    ObjectTypes["GenericResource"] = "GenericResource"
    ObjectTypes["Role"] = "Role"
    ObjectTypes["Permission"] = "Permission"
    ObjectTypes["User"] = "User"
    ObjectTypes["PatchingWindow"] = "PatchingWindow"
    ObjectTypes["Update"] = "Update"
    ObjectTypes["ReportDefinition"] = "ReportDefinition"
    ObjectTypes["TimeSeries"] = "TimeSeries"
    ObjectTypes["DataPoint"] = "DataPoint"
    ObjectTypes["Action"] = "Action"
    ObjectTypes["ActionAssignment"] = "ActionAssignment"
    ObjectTypes["UserNote"] = "UserNote"
})(ObjectTypes || (ObjectTypes = {}));
export class Tag {
    /** @param {{name?:string,value?:string,isProtected?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {?string} */
    value;
    /** @type {boolean} */
    isProtected;
}
export class PathItem {
    /** @param {{label?:string,link?:string,objectType?:ObjectTypes,objectId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    label;
    /** @type {string} */
    link;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    objectId;
}
export class ConfigItem extends Auditable {
    /** @param {{id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    displayName;
    /** @type {?string} */
    description;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {IList<Tag>} */
    tags;
    /** @type {IList<PathItem>} */
    path;
}
/** @typedef {'Lab'|'Poc'|'Dev'|'Test'|'Int'|'Uat'|'Prod'} */
export var Environments;
(function (Environments) {
    Environments["Lab"] = "Lab"
    Environments["Poc"] = "Poc"
    Environments["Dev"] = "Dev"
    Environments["Test"] = "Test"
    Environments["Int"] = "Int"
    Environments["Uat"] = "Uat"
    Environments["Prod"] = "Prod"
})(Environments || (Environments = {}));
/** @typedef {'New'|'Deploying'|'Deployed'|'Removing'|'Removed'|'Failure'|'Imported'} */
export var LifecycleStates;
(function (LifecycleStates) {
    LifecycleStates["New"] = "New"
    LifecycleStates["Deploying"] = "Deploying"
    LifecycleStates["Deployed"] = "Deployed"
    LifecycleStates["Removing"] = "Removing"
    LifecycleStates["Removed"] = "Removed"
    LifecycleStates["Failure"] = "Failure"
    LifecycleStates["Imported"] = "Imported"
})(LifecycleStates || (LifecycleStates = {}));
/** @typedef {'String'|'Number'|'Boolean'|'SecureString'} */
export var ParameterValueType;
(function (ParameterValueType) {
    ParameterValueType["String"] = "String"
    ParameterValueType["Number"] = "Number"
    ParameterValueType["Boolean"] = "Boolean"
    ParameterValueType["SecureString"] = "SecureString"
})(ParameterValueType || (ParameterValueType = {}));
export class Parameter {
    /** @param {{name?:string,description?:string,value?:string,default?:string,optional?:boolean,type?:ParameterValueType,validation?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {?string} */
    description;
    /** @type {?string} */
    value;
    /** @type {?string} */
    default;
    /** @type {boolean} */
    optional;
    /** @type {ParameterValueType} */
    type;
    /** @type {?string} */
    validation;
}
/** @typedef {'String'|'Number'|'Boolean'|'List'} */
export var ValueDataType;
(function (ValueDataType) {
    ValueDataType["String"] = "String"
    ValueDataType["Number"] = "Number"
    ValueDataType["Boolean"] = "Boolean"
    ValueDataType["List"] = "List"
})(ValueDataType || (ValueDataType = {}));
export class Variable {
    /** @param {{name?:string,value?:string,type?:ValueDataType,description?:string,isInherited?:boolean,environment?:Environments}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {string} */
    value;
    /** @type {ValueDataType} */
    type;
    /** @type {?string} */
    description;
    /** @type {boolean} */
    isInherited;
    /** @type {?Environments} */
    environment;
}
export class DeploymentCollection extends ConfigItem {
    /** @param {{tenantId?:string,name?:string,objectType?:ObjectTypes,selfLink?:string,variables?:IList<Variable>,isLostAndFound?:boolean,monthlyBudget?:number,sendBudgetNotificationMails?:boolean,budgetWarningThresholdPercent?:number,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantId;
    /** @type {string} */
    name;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {IList<Variable>} */
    variables;
    /** @type {boolean} */
    isLostAndFound;
    /** @type {number} */
    monthlyBudget;
    /** @type {boolean} */
    sendBudgetNotificationMails;
    /** @type {number} */
    budgetWarningThresholdPercent;
}
/** @typedef {'Native'|'Foreign'|'Mixed'} */
export var ResourceCompositions;
(function (ResourceCompositions) {
    ResourceCompositions["Native"] = "Native"
    ResourceCompositions["Foreign"] = "Foreign"
    ResourceCompositions["Mixed"] = "Mixed"
})(ResourceCompositions || (ResourceCompositions = {}));
/** @typedef {'None'|'Starting'|'Running'|'Stopping'|'Stopped'|'Restarting'|'Deleting'|'Unknown'} */
export var OperationalStates;
(function (OperationalStates) {
    OperationalStates["None"] = "None"
    OperationalStates["Starting"] = "Starting"
    OperationalStates["Running"] = "Running"
    OperationalStates["Stopping"] = "Stopping"
    OperationalStates["Stopped"] = "Stopped"
    OperationalStates["Restarting"] = "Restarting"
    OperationalStates["Deleting"] = "Deleting"
    OperationalStates["Unknown"] = "Unknown"
})(OperationalStates || (OperationalStates = {}));
export class Deployment extends ConfigItem {
    /** @param {{shortId?:string,tenantId?:string,name?:string,nameUserDefinedPart?:string,objectType?:ObjectTypes,selfLink?:string,state?:LifecycleStates,environment?:Environments,templateId?:string,parameters?:IList<Parameter>,variables?:IList<Variable>,variablesSnapshot?:IList<Variable>,parentId?:string,parent?:DeploymentCollection,validFrom?:string,validUntil?:string,isNeverExpiring?:boolean,nextPatchDate?:string,defaultResourceProviderId?:string,needsAttention?:boolean,composition?:ResourceCompositions,monthlyBudget?:number,sendBudgetNotificationMails?:boolean,budgetWarningThresholdPercent?:number,operationalState?:OperationalStates,resourcesRunning?:number,resourcesTotal?:number,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    shortId;
    /** @type {string} */
    tenantId;
    /** @type {string} */
    name;
    /** @type {string} */
    nameUserDefinedPart;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {LifecycleStates} */
    state;
    /** @type {Environments} */
    environment;
    /** @type {?string} */
    templateId;
    /** @type {IList<Parameter>} */
    parameters;
    /** @type {IList<Variable>} */
    variables;
    /** @type {IList<Variable>} */
    variablesSnapshot;
    /** @type {string} */
    parentId;
    /** @type {?DeploymentCollection} */
    parent;
    /** @type {string} */
    validFrom;
    /** @type {?string} */
    validUntil;
    /** @type {boolean} */
    isNeverExpiring;
    /** @type {?string} */
    nextPatchDate;
    /** @type {string} */
    defaultResourceProviderId;
    /** @type {boolean} */
    needsAttention;
    /** @type {ResourceCompositions} */
    composition;
    /** @type {number} */
    monthlyBudget;
    /** @type {boolean} */
    sendBudgetNotificationMails;
    /** @type {number} */
    budgetWarningThresholdPercent;
    /** @type {OperationalStates} */
    operationalState;
    /** @type {number} */
    resourcesRunning;
    /** @type {number} */
    resourcesTotal;
}
export class ResourceGroup extends ConfigItem {
    /** @param {{shortId?:string,tenantId?:string,name?:string,objectType?:ObjectTypes,selfLink?:string,environment?:Environments,state?:LifecycleStates,parentId?:string,parent?:Deployment,templateId?:string,parameters?:IList<Parameter>,variables?:IList<Variable>,nextPatchDate?:string,composition?:ResourceCompositions,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    shortId;
    /** @type {string} */
    tenantId;
    /** @type {string} */
    name;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {Environments} */
    environment;
    /** @type {LifecycleStates} */
    state;
    /** @type {string} */
    parentId;
    /** @type {?Deployment} */
    parent;
    /** @type {?string} */
    templateId;
    /** @type {IList<Parameter>} */
    parameters;
    /** @type {IList<Variable>} */
    variables;
    /** @type {?string} */
    nextPatchDate;
    /** @type {ResourceCompositions} */
    composition;
}
/** @typedef {'None'|'Count'|'DistinctCount'|'Sum'|'Min'|'Max'|'Avg'|'First'} */
export var Aggregations;
(function (Aggregations) {
    Aggregations["None"] = "None"
    Aggregations["Count"] = "Count"
    Aggregations["DistinctCount"] = "DistinctCount"
    Aggregations["Sum"] = "Sum"
    Aggregations["Min"] = "Min"
    Aggregations["Max"] = "Max"
    Aggregations["Avg"] = "Avg"
    Aggregations["First"] = "First"
})(Aggregations || (Aggregations = {}));
export class QueryResourceGroups extends QueryDb {
    /** @param {{tenantName?:string,includeDeleted?:boolean,groupBy?:string,aggregateOn?:string,aggregation?:Aggregations,includeReferencedObjects?:boolean,skip?:number,take?:number,orderBy?:string,orderByDesc?:string,include?:string,fields?:string,meta?:{ [index:string]: string; }}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantName;
    /**
     * @type {?boolean}
     * @description If true, also soft deleted items will be returned */
    includeDeleted;
    /**
     * @type {?string}
     * @description The property, the data will be grouped on */
    groupBy;
    /**
     * @type {?string}
     * @description The property, used for aggregation */
    aggregateOn;
    /**
     * @type {?Aggregations}
     * @description The aggregation function to use */
    aggregation;
    /**
     * @type {?boolean}
     * @description Returns all referenced object */
    includeReferencedObjects;
}
export class Tenant extends ConfigItem {
    /** @param {{name?:string,objectType?:ObjectTypes,selfLink?:string,variables?:IList<Variable>,allowedMailDomains?:IList<string>,licensedModules?:IList<string>,defaultDeploymentLifetimeDays?:number,maxDeploymentLifetimeDays?:number,systemUnpatchedWarningDays?:number,systemBackupMissingWarningHours?:number,stopVulnerableResourceAfterDays?:number,deploymentExpirationWarningDays?:number,patchNotificationDays?:number,useCustomHostnames?:boolean,removeInactiveVulnerabilitiesAfterDays?:number,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<Tag>,path?:IList<PathItem>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {IList<Variable>} */
    variables;
    /** @type {IList<string>} */
    allowedMailDomains;
    /** @type {IList<string>} */
    licensedModules;
    /** @type {number} */
    defaultDeploymentLifetimeDays;
    /** @type {number} */
    maxDeploymentLifetimeDays;
    /** @type {number} */
    systemUnpatchedWarningDays;
    /** @type {number} */
    systemBackupMissingWarningHours;
    /** @type {number} */
    stopVulnerableResourceAfterDays;
    /** @type {number} */
    deploymentExpirationWarningDays;
    /** @type {number} */
    patchNotificationDays;
    /** @type {boolean} */
    useCustomHostnames;
    /** @type {number} */
    removeInactiveVulnerabilitiesAfterDays;
}
/** @typedef {'Second'|'Minute'|'Hour'|'Day'|'Week'|'Month'|'Year'} */
export var IntervalUnits;
(function (IntervalUnits) {
    IntervalUnits["Second"] = "Second"
    IntervalUnits["Minute"] = "Minute"
    IntervalUnits["Hour"] = "Hour"
    IntervalUnits["Day"] = "Day"
    IntervalUnits["Week"] = "Week"
    IntervalUnits["Month"] = "Month"
    IntervalUnits["Year"] = "Year"
})(IntervalUnits || (IntervalUnits = {}));
export class TimeSeriesDefinition extends Auditable {
    /** @param {{id?:string,tenantId?:string,tenant?:Tenant,name?:string,displayName?:string,selfLink?:string,objectType?:ObjectTypes,description?:string,sourceType?:ObjectTypes,autoCollection?:boolean,autoCollectionQuery?:string,autoCollectionInterval?:number,autoCollectionIntervalUnit?:IntervalUnits,autoCollectionTime?:string,lastAutoCollected?:string,retentionTimeMonths?:number,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    tenantId;
    /** @type {?Tenant} */
    tenant;
    /** @type {string} */
    name;
    /** @type {?string} */
    displayName;
    /** @type {string} */
    selfLink;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {?string} */
    description;
    /** @type {ObjectTypes} */
    sourceType;
    /** @type {boolean} */
    autoCollection;
    /** @type {?string} */
    autoCollectionQuery;
    /** @type {?number} */
    autoCollectionInterval;
    /** @type {?IntervalUnits} */
    autoCollectionIntervalUnit;
    /** @type {?string} */
    autoCollectionTime;
    /** @type {?string} */
    lastAutoCollected;
    /** @type {number} */
    retentionTimeMonths;
}
/** @typedef T {any} */
export class QueryResponse {
    /** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index:string]: string; },responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    offset;
    /** @type {number} */
    total;
    /** @type {T[]} */
    results = [];
    /** @type {?{ [index:string]: string; }} */
    meta;
    /** @type {?ResponseStatus} */
    responseStatus;
}

JavaScript QueryResourceGroups DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/resourcegroups/ HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"offset":0,"total":0,"results":[{"shortId":"String","tenantId":"00000000-0000-0000-0000-000000000000","name":"String","objectType":"ResourceGroup","selfLink":"/resourcegroups/00000000-0000-0000-0000-000000000000","environment":"Lab","state":"New","parentId":"00000000-0000-0000-0000-000000000000","parent":{"shortId":"String","tenantId":"00000000-0000-0000-0000-000000000000","name":"String","nameUserDefinedPart":"String","objectType":"Deployment","selfLink":"/deployments/00000000-0000-0000-0000-000000000000","state":"New","environment":"Lab","templateId":"00000000-0000-0000-0000-000000000000","parameters":null,"variables":null,"variablesSnapshot":null,"parentId":"00000000-0000-0000-0000-000000000000","parent":{"tenantId":"00000000-0000-0000-0000-000000000000","name":"String","objectType":"Collection","selfLink":"/collections/00000000-0000-0000-0000-000000000000","variables":null,"isLostAndFound":false,"monthlyBudget":0,"sendBudgetNotificationMails":false,"budgetWarningThresholdPercent":0,"id":"00000000-0000-0000-0000-000000000000","displayName":"String","description":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"validFrom":"0001-01-01T00:00:00.0000000Z","validUntil":"0001-01-01T00:00:00.0000000Z","isNeverExpiring":false,"nextPatchDate":"0001-01-01T00:00:00.0000000Z","defaultResourceProviderId":"00000000-0000-0000-0000-000000000000","needsAttention":false,"composition":"Native","monthlyBudget":0,"sendBudgetNotificationMails":false,"budgetWarningThresholdPercent":0,"operationalState":"None","resourcesRunning":0,"resourcesTotal":0,"id":"00000000-0000-0000-0000-000000000000","displayName":"String","description":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"templateId":"00000000-0000-0000-0000-000000000000","parameters":null,"variables":null,"nextPatchDate":"0001-01-01T00:00:00.0000000Z","composition":"Native","id":"00000000-0000-0000-0000-000000000000","displayName":"String","description":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}