| Requires any of the roles: | TenantReader, Admin, TenantAdmin |
| POST | /api/patching/windows | Creates a new patching window | |
|---|---|---|---|
| POST | /patching/windows | Creates a new patching window |
"use strict";
/** @typedef {number} */
export var MonthlyDayOccurence;
(function (MonthlyDayOccurence) {
MonthlyDayOccurence[MonthlyDayOccurence["First"] = 1] = "First"
MonthlyDayOccurence[MonthlyDayOccurence["Second"] = 2] = "Second"
MonthlyDayOccurence[MonthlyDayOccurence["Third"] = 3] = "Third"
MonthlyDayOccurence[MonthlyDayOccurence["Fourth"] = 4] = "Fourth"
})(MonthlyDayOccurence || (MonthlyDayOccurence = {}));
export class PatchingWindowDto {
/** @param {{id?:string,name?:string,dayOfWeek?:DayOfWeek,monthlyOccurence?:MonthlyDayOccurence,timeOfDay?:string,duration?:string,isDefault?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
/** @type {DayOfWeek} */
dayOfWeek;
/** @type {MonthlyDayOccurence} */
monthlyOccurence;
/** @type {string} */
timeOfDay;
/** @type {string} */
duration;
/** @type {boolean} */
isDefault;
}
export class CreatePatchingWindow {
/** @param {{tenantName?:string,monthlyOccurence?:MonthlyDayOccurence,dayOfWeek?:DayOfWeek,timeOfDay?:string,duration?:string,isDefault?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
tenantName;
/**
* @type {MonthlyDayOccurence}
* @description Occurence of week day in the month */
monthlyOccurence;
/**
* @type {DayOfWeek}
* @description The day of the week, when patching will happen */
dayOfWeek;
/**
* @type {string}
* @description The time, when the patching window will start */
timeOfDay;
/**
* @type {?string}
* @description The max duration (hours) of the window wherein patchings can be started */
duration;
/**
* @type {boolean}
* @description It's the default patching window for new resource groups */
isDefault;
}
JavaScript CreatePatchingWindow 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/patching/windows HTTP/1.1
Host: core.starburst.svc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"tenantName":"String","monthlyOccurence":"First","dayOfWeek":"Sunday","timeOfDay":"00:00:00","duration":"00:00:00","isDefault":false,"txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","name":"String","dayOfWeek":"Sunday","monthlyOccurence":"First","timeOfDay":"00:00:00","duration":"00:00:00","isDefault":false}