CoreService

<back to all web services

QueryResourceProviders

ResourceProvider - CRUD

Returns all resourceproviders of a tenant

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/resourceproviders/Returns all resourceproviders
GET/api/resourceproviders/searchReturns all resourceproviders
GET/resourceproviders/searchReturns all resourceproviders
GET/resourceproviders/Returns all resourceproviders
"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 {'Azure'|'AmazonWebServices'|'GoogleCloudPlatform'|'ActiveDirectoryServices'|'DomainNameSystem'|'SwisscomESC'|'AzureKeyVault'} */
export var ResourceProviderTypes;
(function (ResourceProviderTypes) {
    ResourceProviderTypes["Azure"] = "Azure"
    ResourceProviderTypes["AmazonWebServices"] = "AmazonWebServices"
    ResourceProviderTypes["GoogleCloudPlatform"] = "GoogleCloudPlatform"
    ResourceProviderTypes["ActiveDirectoryServices"] = "ActiveDirectoryServices"
    ResourceProviderTypes["DomainNameSystem"] = "DomainNameSystem"
    ResourceProviderTypes["SwisscomESC"] = "SwisscomESC"
    ResourceProviderTypes["AzureKeyVault"] = "AzureKeyVault"
})(ResourceProviderTypes || (ResourceProviderTypes = {}));
export class ProviderConfigEntry {
    /** @param {{name?:string,value?:string,isSecure?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {string} */
    value;
    /** @type {boolean} */
    isSecure;
}
export class ResourceProvider extends ConfigItem {
    /** @param {{tenantId?:string,name?:string,defaultEnvironment?:Environments,allowedEnvironments?:IList<Environments>,objectType?:ObjectTypes,type?:ResourceProviderTypes,selfLink?:string,config?:IList<ProviderConfigEntry>,isDisabled?:boolean,isReadyForDeployments?:boolean,costCurrentMonth?:number,costLastMonth?:number,costCurrency?:string,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 {Environments} */
    defaultEnvironment;
    /** @type {IList<Environments>} */
    allowedEnvironments;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {ResourceProviderTypes} */
    type;
    /** @type {string} */
    selfLink;
    /** @type {IList<ProviderConfigEntry>} */
    config;
    /** @type {boolean} */
    isDisabled;
    /** @type {boolean} */
    isReadyForDeployments;
    /** @type {number} */
    costCurrentMonth;
    /** @type {number} */
    costLastMonth;
    /** @type {string} */
    costCurrency;
}
/** @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 QueryResourceProviders 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;
}
/** @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 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 QueryResourceProviders 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/resourceproviders/ 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":[{"tenantId":"00000000-0000-0000-0000-000000000000","name":"String","defaultEnvironment":"Lab","allowedEnvironments":null,"objectType":"ResourceProvider","type":"Azure","selfLink":"/resourceproviders/00000000-0000-0000-0000-000000000000","config":null,"isDisabled":false,"isReadyForDeployments":false,"costCurrentMonth":0,"costLastMonth":0,"costCurrency":"String","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"}}}