forked from Azure/azure-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjob.go
More file actions
44 lines (40 loc) · 2.24 KB
/
Copy pathjob.go
File metadata and controls
44 lines (40 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package models
// JobResource wraps job properties in an ARM resource envelope.
type JobResource struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty" table:"NAME"`
Properties CommandJob `json:"properties"`
SystemData *SystemData `json:"systemData,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
// CommandJob represents the properties of a Foundry command job.
type CommandJob struct {
JobType string `json:"jobType"`
DisplayName string `json:"displayName,omitempty" table:"DISPLAY NAME"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty" table:"STATUS"`
Command string `json:"command,omitempty"`
EnvironmentImageReference string `json:"environmentImageReference,omitempty"`
CodeID string `json:"codeId,omitempty"`
ComputeID string `json:"computeId,omitempty"`
Inputs map[string]JobInput `json:"inputs,omitempty"`
Outputs map[string]JobOutput `json:"outputs,omitempty"`
Distribution *Distribution `json:"distribution,omitempty"`
Resources *ResourceConfig `json:"resources,omitempty"`
Limits *CommandJobLimits `json:"limits,omitempty"`
EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"`
QueueSettings *QueueSettings `json:"queueSettings,omitempty"`
IsArchived bool `json:"isArchived,omitempty"`
CreatedDateTime string `json:"createdDateTime,omitempty"`
Services map[string]interface{} `json:"services,omitempty"`
}
// TerminalStatuses contains job statuses that indicate the job has finished.
var TerminalStatuses = map[string]bool{
"Completed": true,
"Failed": true,
"Canceled": true,
"NotResponding": true,
"Paused": true,
}