1{
2    "$id": "http://redfish.dmtf.org/schemas/v1/Task.v1_7_4.json",
3    "$ref": "#/definitions/Task",
4    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
5    "copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
6    "definitions": {
7        "Actions": {
8            "additionalProperties": false,
9            "description": "The available actions for this resource.",
10            "longDescription": "This type shall contain the available actions for this resource.",
11            "patternProperties": {
12                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
13                    "description": "This property shall specify a valid odata or Redfish property.",
14                    "type": [
15                        "array",
16                        "boolean",
17                        "integer",
18                        "number",
19                        "null",
20                        "object",
21                        "string"
22                    ]
23                }
24            },
25            "properties": {
26                "Oem": {
27                    "$ref": "#/definitions/OemActions",
28                    "description": "The available OEM-specific actions for this resource.",
29                    "longDescription": "This property shall contain the available OEM-specific actions for this resource.",
30                    "versionAdded": "v1_1_0"
31                }
32            },
33            "type": "object"
34        },
35        "Links": {
36            "additionalProperties": false,
37            "description": "The links to other resources that are related to this resource.",
38            "longDescription": "This Redfish Specification-described type shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.",
39            "patternProperties": {
40                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
41                    "description": "This property shall specify a valid odata or Redfish property.",
42                    "type": [
43                        "array",
44                        "boolean",
45                        "integer",
46                        "number",
47                        "null",
48                        "object",
49                        "string"
50                    ]
51                }
52            },
53            "properties": {
54                "CreatedResources": {
55                    "description": "An array of URIs referencing the resources created as the result of the operation that produced this task.",
56                    "items": {
57                        "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/idRef"
58                    },
59                    "longDescription": "This property shall contain an array of links to resources indicating the resources created as the result of the operation that produced this task.  Services shall set this property prior to the task entering its final state.",
60                    "readonly": true,
61                    "type": "array",
62                    "versionAdded": "v1_7_0"
63                },
64                "CreatedResources@odata.count": {
65                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
66                },
67                "Oem": {
68                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
69                    "description": "The OEM extension property.",
70                    "longDescription": "This property shall contain the OEM extensions.  All values for properties contained in this object shall conform to the Redfish Specification-described requirements."
71                }
72            },
73            "type": "object"
74        },
75        "OemActions": {
76            "additionalProperties": true,
77            "description": "The available OEM-specific actions for this resource.",
78            "longDescription": "This type shall contain the available OEM-specific actions for this resource.",
79            "patternProperties": {
80                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
81                    "description": "This property shall specify a valid odata or Redfish property.",
82                    "type": [
83                        "array",
84                        "boolean",
85                        "integer",
86                        "number",
87                        "null",
88                        "object",
89                        "string"
90                    ]
91                }
92            },
93            "properties": {},
94            "type": "object"
95        },
96        "Payload": {
97            "additionalProperties": false,
98            "description": "The HTTP and JSON payload details for this Task.",
99            "longDescription": "This type shall contain information detailing the HTTP and JSON payload information for executing this task.",
100            "patternProperties": {
101                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
102                    "description": "This property shall specify a valid odata or Redfish property.",
103                    "type": [
104                        "array",
105                        "boolean",
106                        "integer",
107                        "number",
108                        "null",
109                        "object",
110                        "string"
111                    ]
112                }
113            },
114            "properties": {
115                "HttpHeaders": {
116                    "description": "An array of HTTP headers that this task includes.",
117                    "items": {
118                        "type": "string"
119                    },
120                    "longDescription": "This property shall contain an array of HTTP headers that this task includes.",
121                    "readonly": true,
122                    "type": "array",
123                    "versionAdded": "v1_3_0"
124                },
125                "HttpOperation": {
126                    "description": "The HTTP operation to perform to execute this task.",
127                    "longDescription": "This property shall contain the HTTP operation to execute for this task.",
128                    "readonly": true,
129                    "type": "string",
130                    "versionAdded": "v1_3_0"
131                },
132                "JsonBody": {
133                    "description": "The JSON payload to use in the execution of this task.",
134                    "longDescription": "This property shall contain the JSON-formatted payload used for this task.",
135                    "readonly": true,
136                    "type": "string",
137                    "versionAdded": "v1_3_0"
138                },
139                "TargetUri": {
140                    "description": "The URI of the target for this task.",
141                    "format": "uri-reference",
142                    "longDescription": "This property shall contain a link to the location to use as the target for an HTTP operation.",
143                    "readonly": true,
144                    "type": "string",
145                    "versionAdded": "v1_3_0"
146                }
147            },
148            "type": "object"
149        },
150        "Task": {
151            "additionalProperties": false,
152            "description": "The `Task` schema contains information about a task that the Redfish task service schedules or executes.  Tasks represent operations that take more time than a client typically wants to wait.",
153            "longDescription": "This resource contains a task for a Redfish implementation.",
154            "patternProperties": {
155                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
156                    "description": "This property shall specify a valid odata or Redfish property.",
157                    "type": [
158                        "array",
159                        "boolean",
160                        "integer",
161                        "number",
162                        "null",
163                        "object",
164                        "string"
165                    ]
166                }
167            },
168            "properties": {
169                "@odata.context": {
170                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
171                },
172                "@odata.etag": {
173                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
174                },
175                "@odata.id": {
176                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
177                },
178                "@odata.type": {
179                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
180                },
181                "Actions": {
182                    "$ref": "#/definitions/Actions",
183                    "description": "The available actions for this resource.",
184                    "longDescription": "This property shall contain the available actions for this resource.",
185                    "versionAdded": "v1_1_0"
186                },
187                "Description": {
188                    "anyOf": [
189                        {
190                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
191                        },
192                        {
193                            "type": "null"
194                        }
195                    ],
196                    "readonly": true
197                },
198                "EndTime": {
199                    "description": "The date and time when the task was completed.  This property will only appear when the task is complete.",
200                    "format": "date-time",
201                    "longDescription": "This property shall indicate the date and time when the task was completed.  This property shall not appear if the task is running or otherwise has not been completed.  This property shall appear only if the `TaskState` is `Completed`, `Killed`, `Cancelled`, or `Exception`.",
202                    "readonly": true,
203                    "type": "string"
204                },
205                "EstimatedDuration": {
206                    "description": "The estimated total time required to complete the task.",
207                    "longDescription": "This property shall indicate the estimated total time needed to complete the task.  The value is not expected to change while the task is in progress, but the service may update the value if it obtains new information that significantly changes the expected duration.  Services should be conservative in the reported estimate and clients should treat this value as an estimate.",
208                    "pattern": "^P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?$",
209                    "readonly": true,
210                    "type": [
211                        "string",
212                        "null"
213                    ],
214                    "versionAdded": "v1_6_0"
215                },
216                "HidePayload": {
217                    "description": "An indication of whether the contents of the payload are hidden from view after the task has been created.  If `true`, responses do not return the payload.  If `false`, responses return the payload.  If this property is not present when the task is created, the default is `false`.",
218                    "longDescription": "This property shall indicate whether the contents of the payload should be hidden from view after the task has been created.  If `true`, responses shall not return the `Payload` property.  If `false`, responses shall return the `Payload` property.  If this property is not present when the task is created, the default is `false`.  This property shall be supported if the `Payload` property is supported.",
219                    "readonly": true,
220                    "type": "boolean",
221                    "versionAdded": "v1_3_0"
222                },
223                "Id": {
224                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
225                    "readonly": true
226                },
227                "Links": {
228                    "$ref": "#/definitions/Links",
229                    "description": "Contains references to other resources that are related to this resource.",
230                    "longDescription": "The `Links` property, as described by the Redfish Specification, shall contain references to resources that are related to but are not contained by, or subordinate to, this resource.",
231                    "versionAdded": "v1_7_0"
232                },
233                "Messages": {
234                    "description": "An array of messages associated with the task.",
235                    "items": {
236                        "$ref": "http://redfish.dmtf.org/schemas/v1/Message.json#/definitions/Message"
237                    },
238                    "longDescription": "This property shall contain an array of messages associated with the task.",
239                    "type": "array"
240                },
241                "Name": {
242                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
243                    "readonly": true
244                },
245                "Oem": {
246                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
247                    "description": "The OEM extension property.",
248                    "longDescription": "This property shall contain the OEM extensions.  All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
249                },
250                "Payload": {
251                    "$ref": "#/definitions/Payload",
252                    "description": "The HTTP and JSON request payload details for this task, unless they are hidden from view by the service.",
253                    "longDescription": "This object shall contain information detailing the HTTP and JSON request payload information for executing this task.  This property shall not be included in the response if the `HidePayload` property is `true`.",
254                    "versionAdded": "v1_3_0"
255                },
256                "PercentComplete": {
257                    "description": "The completion percentage of this task.",
258                    "longDescription": "This property shall indicate the completion progress of the task, reported in percent of completion, `0` to `100`.  If the task has not been started, the value shall be zero.",
259                    "maximum": 100,
260                    "minimum": 0,
261                    "readonly": true,
262                    "type": [
263                        "integer",
264                        "null"
265                    ],
266                    "units": "%",
267                    "versionAdded": "v1_4_0"
268                },
269                "StartTime": {
270                    "description": "The date and time when the task was started.",
271                    "format": "date-time",
272                    "longDescription": "This property shall indicate the date and time when the task was started.",
273                    "readonly": true,
274                    "type": "string"
275                },
276                "SubTasks": {
277                    "$ref": "http://redfish.dmtf.org/schemas/v1/TaskCollection.json#/definitions/TaskCollection",
278                    "description": "The link to a collection of sub-tasks for this task.",
279                    "longDescription": "This property shall contain a link to a resource collection of type `TaskCollection`.  This property shall not be present if this resource represents a sub-task for a task.",
280                    "readonly": true,
281                    "versionAdded": "v1_5_0"
282                },
283                "TaskMonitor": {
284                    "description": "The URI of the task monitor for this task.",
285                    "format": "uri-reference",
286                    "longDescription": "This property shall contain a URI to task monitor as defined in the Redfish Specification.",
287                    "readonly": true,
288                    "type": "string",
289                    "versionAdded": "v1_2_0"
290                },
291                "TaskState": {
292                    "$ref": "#/definitions/TaskState",
293                    "description": "The state of the task.",
294                    "longDescription": "This property shall indicate the state of the task.",
295                    "readonly": true
296                },
297                "TaskStatus": {
298                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Health",
299                    "description": "The completion status of the task.",
300                    "longDescription": "This property shall contain the completion status of the task and shall not be set until the task completes.  This property should contain `Critical` if one or more messages in the `Messages` array contains the severity `Critical`.  This property should contain `Warning` if one or more messages in the `Messages` array contains the severity `Warning` and if no messages contain the severity `Critical`.  This property should contain `OK` if all messages in the `Messages` array contain the severity `OK` or if the array is empty.",
301                    "readonly": true
302                }
303            },
304            "required": [
305                "@odata.id",
306                "@odata.type",
307                "Id",
308                "Name"
309            ],
310            "type": "object"
311        },
312        "TaskState": {
313            "enum": [
314                "New",
315                "Starting",
316                "Running",
317                "Suspended",
318                "Interrupted",
319                "Pending",
320                "Stopping",
321                "Completed",
322                "Killed",
323                "Exception",
324                "Service",
325                "Cancelling",
326                "Cancelled"
327            ],
328            "enumDeprecated": {
329                "Killed": "This value has been deprecated and is being replaced by the `Cancelled` value, which has more determinate semantics."
330            },
331            "enumDescriptions": {
332                "Cancelled": "Task has been cancelled by an operator or internal process.",
333                "Cancelling": "Task is in the process of being cancelled.",
334                "Completed": "Task was completed.",
335                "Exception": "Task has stopped due to an exception condition.",
336                "Interrupted": "Task has been interrupted.",
337                "Killed": "Task was terminated.",
338                "New": "A new task.",
339                "Pending": "Task is pending and has not started.",
340                "Running": "Task is running normally.",
341                "Service": "Task is running as a service.",
342                "Starting": "Task is starting.",
343                "Stopping": "Task is in the process of stopping.",
344                "Suspended": "Task has been suspended."
345            },
346            "enumLongDescriptions": {
347                "Cancelled": "This value shall represent that either a `DELETE` operation on a task monitor or `Task` resource or by an internal process cancelled the task.",
348                "Cancelling": "This value shall represent that the task is in the process of being cancelled.",
349                "Completed": "This value shall represent that the task completed successfully or with warnings.",
350                "Exception": "This value shall represent that the task completed with errors.",
351                "Interrupted": "This value shall represent that the task has been interrupted but is expected to restart and is therefore not complete.",
352                "Killed": "This value shall represent that the task is complete because an operator killed it.",
353                "New": "This value shall represent that the task is newly created but has not started.",
354                "Pending": "This value shall represent that the task is pending some condition and has not yet begun to execute.",
355                "Running": "This value shall represent that the task is executing.",
356                "Service": "This value shall represent that the task is now running as a service and expected to continue operation until stopped or killed.",
357                "Starting": "This value shall represent that the task is starting.",
358                "Stopping": "This value shall represent that the task is stopping but is not yet complete.",
359                "Suspended": "This value shall represent that the task has been suspended but is expected to restart and is therefore not complete."
360            },
361            "enumVersionAdded": {
362                "Cancelled": "v1_2_0",
363                "Cancelling": "v1_2_0"
364            },
365            "enumVersionDeprecated": {
366                "Killed": "v1_2_0"
367            },
368            "type": "string"
369        }
370    },
371    "language": "en",
372    "owningEntity": "DMTF",
373    "release": "2022.3",
374    "title": "#Task.v1_7_4.Task"
375}