CoreService

<back to all web services

GetActionAssignment

ActionAssignment - CRUD

Returns an action assignment by its id

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/action-assignments/{Id}Returns an action assignment by its id
GET/action-assignments/{Id}Returns an action assignment by its id
"use strict";
/** @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 TagDto {
    /** @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 PathItemDto {
    /** @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 LinkDto {
    /** @param {{caption?:string,rel?:string,hRef?:string,method?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    caption;
    /** @type {string} */
    rel;
    /** @type {string} */
    hRef;
    /** @type {string} */
    method;
}
export class ConfigItemDto {
    /** @param {{id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(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<TagDto>} */
    tags;
    /** @type {IList<PathItemDto>} */
    path;
    /** @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;
    /** @type {IList<LinkDto>} */
    links;
}
/** @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 ParameterDto {
    /** @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}
     * @description Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes */
    value;
    /**
     * @type {?string}
     * @description Optional default value for the frontend. Needs to be in the same format as the value */
    default;
    /**
     * @type {boolean}
     * @description Optional parameters do not need to have a value. Default -> Optional=false */
    optional;
    /**
     * @type {ParameterValueType}
     * @description The data type of the value and default property */
    type;
    /** @type {?string} */
    validation;
}
/** @typedef {'Deployment'|'ResourceGroup'|'Resource'} */
export var ActionScopes;
(function (ActionScopes) {
    ActionScopes["Deployment"] = "Deployment"
    ActionScopes["ResourceGroup"] = "ResourceGroup"
    ActionScopes["Resource"] = "Resource"
})(ActionScopes || (ActionScopes = {}));
export class ActionStepDto {
    /** @param {{name?:string,displayName?:string,variables?:{ [index:string]: Object; },credential?:string,limit?:string,type?:string,module?:string,executionEnvironment?:string,inventory?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {?string} */
    displayName;
    /**
     * @type {{ [index:string]: Object; }}
     * @description The variables which are used in the ansible job */
    variables = {};
    /**
     * @type {?string}
     * @description Optional credential to be used in awx (credential stored in awx) */
    credential;
    /**
     * @type {?string}
     * @description Ansible limit (optional if Scope is Resource) */
    limit;
    /**
     * @type {?string}
     * @description Optional type of the awx action to run (job, workflow, etc.) */
    type;
    /**
     * @type {?string}
     * @description Optional ansible module to be used */
    module;
    /**
     * @type {?string}
     * @description Optional image for the execution environment which runs the action */
    executionEnvironment;
    /**
     * @type {?string}
     * @description Optional inventory */
    inventory;
}
export class ActionDto extends ConfigItemDto {
    /** @param {{tenantId?:string,schemaVersion?:number,definition?:string,parameters?:IList<ParameterDto>,isDisabled?:boolean,scope?:ActionScopes,steps?:ActionStepDto[],id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantId;
    /**
     * @type {number}
     * @description The schema version of the attached definition (json/yaml structure) */
    schemaVersion;
    /**
     * @type {?string}
     * @description The action definition as json/yaml */
    definition;
    /**
     * @type {IList<ParameterDto>}
     * @description Action parameters */
    parameters;
    /**
     * @type {boolean}
     * @description Disabled actions cannot be assigned to a configitem */
    isDisabled;
    /**
     * @type {ActionScopes}
     * @description This action can anly be assigned to configitems of this type */
    scope;
    /**
     * @type {ActionStepDto[]}
     * @description The individual steps of the action */
    steps = [];
}
export class ScheduledTaskAssignmentDto {
    /** @param {{id?:string,configItemId?:string,objectType?:ObjectTypes,displayName?:string,taskId?:number,taskName?:string,cronExpression?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    configItemId;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    displayName;
    /** @type {number} */
    taskId;
    /** @type {string} */
    taskName;
    /** @type {string} */
    cronExpression;
}
export class ActionAssignmentDto {
    /** @param {{id?:string,name?:string,actionId?:string,action?:ActionDto,configItemId?:string,configItemName?:string,configItemType?:ObjectTypes,parameters?:ParameterDto[],selfLink?:string,scope?:ActionScopes,cronExpression?:string,links?:IList<LinkDto>,scheduledTaskAssignmentId?:string,scheduledTaskAssignment?:ScheduledTaskAssignmentDto,objectType?:ObjectTypes}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    actionId;
    /** @type {?ActionDto} */
    action;
    /** @type {string} */
    configItemId;
    /** @type {string} */
    configItemName;
    /** @type {ObjectTypes} */
    configItemType;
    /** @type {ParameterDto[]} */
    parameters = [];
    /** @type {string} */
    selfLink;
    /** @type {ActionScopes} */
    scope;
    /** @type {?string} */
    cronExpression;
    /** @type {IList<LinkDto>} */
    links;
    /** @type {?string} */
    scheduledTaskAssignmentId;
    /** @type {?ScheduledTaskAssignmentDto} */
    scheduledTaskAssignment;
    /** @type {ObjectTypes} */
    objectType;
}
export class GetActionAssignment {
    /** @param {{id?:string,tenantName?:string,includeReferencedObjects?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    tenantName;
    /** @type {?boolean} */
    includeReferencedObjects;
}

JavaScript GetActionAssignment 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/action-assignments/{Id} HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"00000000-0000-0000-0000-000000000000","name":"String","actionId":"00000000-0000-0000-0000-000000000000","action":{"tenantId":"00000000-0000-0000-0000-000000000000","schemaVersion":0,"definition":"String","parameters":null,"isDisabled":false,"scope":"Deployment","steps":[{"name":"String","displayName":"String","variables":{"String":{}},"credential":"String","limit":"String","type":"String","module":"String","executionEnvironment":"String","inventory":"String"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"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","links":null},"configItemId":"00000000-0000-0000-0000-000000000000","configItemName":"String","configItemType":"None","parameters":[{"name":"String","description":"String","value":"String","default":"String","optional":false,"type":"String","validation":"String"}],"selfLink":"String","scope":"Deployment","cronExpression":"String","links":[{"caption":"Start","rel":"start","hRef":"/action-assignments/00000000-0000-0000-0000-000000000000/start","method":"POST"},{"caption":"Completed","rel":"completed","hRef":"/action-assignments/00000000-0000-0000-0000-000000000000/completed","method":"PATCH"}],"scheduledTaskAssignmentId":"00000000-0000-0000-0000-000000000000","scheduledTaskAssignment":{"id":"00000000-0000-0000-0000-000000000000","configItemId":"00000000-0000-0000-0000-000000000000","objectType":"None","displayName":"String","taskId":0,"taskName":"String","cronExpression":"String"},"objectType":"ActionAssignment"}