| Required role: | TenantReader |
| POST | /api/usernotes | Creates a user note on a deployment or resource | |
|---|---|---|---|
| POST | /usernotes | Creates a user note on a deployment or resource |
"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 UserNoteDto {
/** @param {{id?:string,message?:string,configItemId?:string,configItemType?:ObjectTypes,configItemName?:string,tenantId?:string,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,selfLink?:string,objectType?:ObjectTypes}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
message;
/** @type {string} */
configItemId;
/** @type {ObjectTypes} */
configItemType;
/** @type {string} */
configItemName;
/** @type {string} */
tenantId;
/** @type {string} */
created;
/** @type {string} */
createUser;
/** @type {string} */
createUserId;
/** @type {string} */
modified;
/** @type {string} */
modifyUser;
/** @type {string} */
modifyUserId;
/** @type {string} */
selfLink;
/** @type {ObjectTypes} */
objectType;
}
export class CreateUserNote {
/** @param {{tenantName?:string,configItemId?:string,configItemType?:ObjectTypes,message?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
tenantName;
/**
* @type {string}
* @description The id of the deployment or resource the note is attached to */
configItemId;
/**
* @type {ObjectTypes}
* @description The type of the config item (Deployment or a Resource type) */
configItemType;
/**
* @type {string}
* @description The note text (max 1000 chars) */
message;
}
JavaScript CreateUserNote 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/usernotes HTTP/1.1
Host: core.starburst.svc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"tenantName":"String","configItemId":"00000000-0000-0000-0000-000000000000","configItemType":"None","message":"String","txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","message":"String","configItemId":"00000000-0000-0000-0000-000000000000","configItemType":"None","configItemName":"String","tenantId":"00000000-0000-0000-0000-000000000000","created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","selfLink":"/usernotes/00000000-0000-0000-0000-000000000000","objectType":"UserNote"}