1package batch
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20// AccessScope enumerates the values for access scope.
21type AccessScope string
22
23const (
24	// Job Grants access to perform all operations on the job containing the task.
25	Job AccessScope = "job"
26)
27
28// PossibleAccessScopeValues returns an array of possible values for the AccessScope const type.
29func PossibleAccessScopeValues() []AccessScope {
30	return []AccessScope{Job}
31}
32
33// AllocationState enumerates the values for allocation state.
34type AllocationState string
35
36const (
37	// Resizing The pool is resizing; that is, compute nodes are being added to or removed from the pool.
38	Resizing AllocationState = "resizing"
39	// Steady The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A
40	// pool enters this state when it is created and when no operations are being performed on the pool to
41	// change the number of nodes.
42	Steady AllocationState = "steady"
43	// Stopping The pool was resizing, but the user has requested that the resize be stopped, but the stop
44	// request has not yet been completed.
45	Stopping AllocationState = "stopping"
46)
47
48// PossibleAllocationStateValues returns an array of possible values for the AllocationState const type.
49func PossibleAllocationStateValues() []AllocationState {
50	return []AllocationState{Resizing, Steady, Stopping}
51}
52
53// AutoUserScope enumerates the values for auto user scope.
54type AutoUserScope string
55
56const (
57	// Pool Specifies that the task runs as the common auto user account which is created on every node in a
58	// pool.
59	Pool AutoUserScope = "pool"
60	// Task Specifies that the service should create a new user for the task.
61	Task AutoUserScope = "task"
62)
63
64// PossibleAutoUserScopeValues returns an array of possible values for the AutoUserScope const type.
65func PossibleAutoUserScopeValues() []AutoUserScope {
66	return []AutoUserScope{Pool, Task}
67}
68
69// CachingType enumerates the values for caching type.
70type CachingType string
71
72const (
73	// None The caching mode for the disk is not enabled.
74	None CachingType = "none"
75	// ReadOnly The caching mode for the disk is read only.
76	ReadOnly CachingType = "readonly"
77	// ReadWrite The caching mode for the disk is read and write.
78	ReadWrite CachingType = "readwrite"
79)
80
81// PossibleCachingTypeValues returns an array of possible values for the CachingType const type.
82func PossibleCachingTypeValues() []CachingType {
83	return []CachingType{None, ReadOnly, ReadWrite}
84}
85
86// CertificateFormat enumerates the values for certificate format.
87type CertificateFormat string
88
89const (
90	// Cer The certificate is a base64-encoded X.509 certificate.
91	Cer CertificateFormat = "cer"
92	// Pfx The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.
93	Pfx CertificateFormat = "pfx"
94)
95
96// PossibleCertificateFormatValues returns an array of possible values for the CertificateFormat const type.
97func PossibleCertificateFormatValues() []CertificateFormat {
98	return []CertificateFormat{Cer, Pfx}
99}
100
101// CertificateState enumerates the values for certificate state.
102type CertificateState string
103
104const (
105	// Active The certificate is available for use in pools.
106	Active CertificateState = "active"
107	// DeleteFailed The user requested that the certificate be deleted, but there are pools that still have
108	// references to the certificate, or it is still installed on one or more compute nodes. (The latter can
109	// occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes
110	// refresh their certificates only when they restart.) You may use the cancel certificate delete operation
111	// to cancel the delete, or the delete certificate operation to retry the delete.
112	DeleteFailed CertificateState = "deletefailed"
113	// Deleting The user has requested that the certificate be deleted, but the delete operation has not yet
114	// completed. You may not reference the certificate when creating or updating pools.
115	Deleting CertificateState = "deleting"
116)
117
118// PossibleCertificateStateValues returns an array of possible values for the CertificateState const type.
119func PossibleCertificateStateValues() []CertificateState {
120	return []CertificateState{Active, DeleteFailed, Deleting}
121}
122
123// CertificateStoreLocation enumerates the values for certificate store location.
124type CertificateStoreLocation string
125
126const (
127	// CurrentUser Certificates should be installed to the CurrentUser certificate store.
128	CurrentUser CertificateStoreLocation = "currentuser"
129	// LocalMachine Certificates should be installed to the LocalMachine certificate store.
130	LocalMachine CertificateStoreLocation = "localmachine"
131)
132
133// PossibleCertificateStoreLocationValues returns an array of possible values for the CertificateStoreLocation const type.
134func PossibleCertificateStoreLocationValues() []CertificateStoreLocation {
135	return []CertificateStoreLocation{CurrentUser, LocalMachine}
136}
137
138// CertificateVisibility enumerates the values for certificate visibility.
139type CertificateVisibility string
140
141const (
142	// CertificateVisibilityRemoteUser The certificate should be visible to the user accounts under which users
143	// remotely access the node.
144	CertificateVisibilityRemoteUser CertificateVisibility = "remoteuser"
145	// CertificateVisibilityStartTask The certificate should be visible to the user account under which the
146	// start task is run.
147	CertificateVisibilityStartTask CertificateVisibility = "starttask"
148	// CertificateVisibilityTask The certificate should be visible to the user accounts under which job tasks
149	// are run.
150	CertificateVisibilityTask CertificateVisibility = "task"
151)
152
153// PossibleCertificateVisibilityValues returns an array of possible values for the CertificateVisibility const type.
154func PossibleCertificateVisibilityValues() []CertificateVisibility {
155	return []CertificateVisibility{CertificateVisibilityRemoteUser, CertificateVisibilityStartTask, CertificateVisibilityTask}
156}
157
158// ComputeNodeDeallocationOption enumerates the values for compute node deallocation option.
159type ComputeNodeDeallocationOption string
160
161const (
162	// Requeue Terminate running task processes and requeue the tasks. The tasks will run again when a node is
163	// available. Remove nodes as soon as tasks have been terminated.
164	Requeue ComputeNodeDeallocationOption = "requeue"
165	// RetainedData Allow currently running tasks to complete, then wait for all task data retention periods to
166	// expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired.
167	RetainedData ComputeNodeDeallocationOption = "retaineddata"
168	// TaskCompletion Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove
169	// nodes when all tasks have completed.
170	TaskCompletion ComputeNodeDeallocationOption = "taskcompletion"
171	// Terminate Terminate running tasks. The tasks will be completed with failureInfo indicating that they
172	// were terminated, and will not run again. Remove nodes as soon as tasks have been terminated.
173	Terminate ComputeNodeDeallocationOption = "terminate"
174)
175
176// PossibleComputeNodeDeallocationOptionValues returns an array of possible values for the ComputeNodeDeallocationOption const type.
177func PossibleComputeNodeDeallocationOptionValues() []ComputeNodeDeallocationOption {
178	return []ComputeNodeDeallocationOption{Requeue, RetainedData, TaskCompletion, Terminate}
179}
180
181// ComputeNodeFillType enumerates the values for compute node fill type.
182type ComputeNodeFillType string
183
184const (
185	// Pack As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any
186	// tasks are assigned to the next node in the pool.
187	Pack ComputeNodeFillType = "pack"
188	// Spread Tasks should be assigned evenly across all nodes in the pool.
189	Spread ComputeNodeFillType = "spread"
190)
191
192// PossibleComputeNodeFillTypeValues returns an array of possible values for the ComputeNodeFillType const type.
193func PossibleComputeNodeFillTypeValues() []ComputeNodeFillType {
194	return []ComputeNodeFillType{Pack, Spread}
195}
196
197// ComputeNodeRebootOption enumerates the values for compute node reboot option.
198type ComputeNodeRebootOption string
199
200const (
201	// ComputeNodeRebootOptionRequeue Terminate running task processes and requeue the tasks. The tasks will
202	// run again when a node is available. Restart the node as soon as tasks have been terminated.
203	ComputeNodeRebootOptionRequeue ComputeNodeRebootOption = "requeue"
204	// ComputeNodeRebootOptionRetainedData Allow currently running tasks to complete, then wait for all task
205	// data retention periods to expire. Schedule no new tasks while waiting. Restart the node when all task
206	// retention periods have expired.
207	ComputeNodeRebootOptionRetainedData ComputeNodeRebootOption = "retaineddata"
208	// ComputeNodeRebootOptionTaskCompletion Allow currently running tasks to complete. Schedule no new tasks
209	// while waiting. Restart the node when all tasks have completed.
210	ComputeNodeRebootOptionTaskCompletion ComputeNodeRebootOption = "taskcompletion"
211	// ComputeNodeRebootOptionTerminate Terminate running tasks. The tasks will be completed with failureInfo
212	// indicating that they were terminated, and will not run again. Restart the node as soon as tasks have
213	// been terminated.
214	ComputeNodeRebootOptionTerminate ComputeNodeRebootOption = "terminate"
215)
216
217// PossibleComputeNodeRebootOptionValues returns an array of possible values for the ComputeNodeRebootOption const type.
218func PossibleComputeNodeRebootOptionValues() []ComputeNodeRebootOption {
219	return []ComputeNodeRebootOption{ComputeNodeRebootOptionRequeue, ComputeNodeRebootOptionRetainedData, ComputeNodeRebootOptionTaskCompletion, ComputeNodeRebootOptionTerminate}
220}
221
222// ComputeNodeReimageOption enumerates the values for compute node reimage option.
223type ComputeNodeReimageOption string
224
225const (
226	// ComputeNodeReimageOptionRequeue Terminate running task processes and requeue the tasks. The tasks will
227	// run again when a node is available. Reimage the node as soon as tasks have been terminated.
228	ComputeNodeReimageOptionRequeue ComputeNodeReimageOption = "requeue"
229	// ComputeNodeReimageOptionRetainedData Allow currently running tasks to complete, then wait for all task
230	// data retention periods to expire. Schedule no new tasks while waiting. Reimage the node when all task
231	// retention periods have expired.
232	ComputeNodeReimageOptionRetainedData ComputeNodeReimageOption = "retaineddata"
233	// ComputeNodeReimageOptionTaskCompletion Allow currently running tasks to complete. Schedule no new tasks
234	// while waiting. Reimage the node when all tasks have completed.
235	ComputeNodeReimageOptionTaskCompletion ComputeNodeReimageOption = "taskcompletion"
236	// ComputeNodeReimageOptionTerminate Terminate running tasks. The tasks will be completed with failureInfo
237	// indicating that they were terminated, and will not run again. Reimage the node as soon as tasks have
238	// been terminated.
239	ComputeNodeReimageOptionTerminate ComputeNodeReimageOption = "terminate"
240)
241
242// PossibleComputeNodeReimageOptionValues returns an array of possible values for the ComputeNodeReimageOption const type.
243func PossibleComputeNodeReimageOptionValues() []ComputeNodeReimageOption {
244	return []ComputeNodeReimageOption{ComputeNodeReimageOptionRequeue, ComputeNodeReimageOptionRetainedData, ComputeNodeReimageOptionTaskCompletion, ComputeNodeReimageOptionTerminate}
245}
246
247// ComputeNodeState enumerates the values for compute node state.
248type ComputeNodeState string
249
250const (
251	// Creating The Batch service has obtained the underlying virtual machine from Azure Compute, but it has
252	// not yet started to join the pool.
253	Creating ComputeNodeState = "creating"
254	// Idle The node is not currently running a task.
255	Idle ComputeNodeState = "idle"
256	// LeavingPool The node is leaving the pool, either because the user explicitly removed it or because the
257	// pool is resizing or autoscaling down.
258	LeavingPool ComputeNodeState = "leavingpool"
259	// Offline The node is not currently running a task, and scheduling of new tasks to the node is disabled.
260	Offline ComputeNodeState = "offline"
261	// Preempted The low-priority node has been preempted. Tasks which were running on the node when it was
262	// preempted will be rescheduled when another node becomes available.
263	Preempted ComputeNodeState = "preempted"
264	// Rebooting The node is rebooting.
265	Rebooting ComputeNodeState = "rebooting"
266	// Reimaging The node is reimaging.
267	Reimaging ComputeNodeState = "reimaging"
268	// Running The node is running one or more tasks (other than a start task).
269	Running ComputeNodeState = "running"
270	// Starting The Batch service is starting on the underlying virtual machine.
271	Starting ComputeNodeState = "starting"
272	// StartTaskFailed The start task has failed on the compute node (and exhausted all retries), and
273	// waitForSuccess is set. The node is not usable for running tasks.
274	StartTaskFailed ComputeNodeState = "starttaskfailed"
275	// Unknown The Batch service has lost contact with the node, and does not know its true state.
276	Unknown ComputeNodeState = "unknown"
277	// Unusable The node cannot be used for task execution due to errors.
278	Unusable ComputeNodeState = "unusable"
279	// WaitingForStartTask The start task has started running on the compute node, but waitForSuccess is set
280	// and the start task has not yet completed.
281	WaitingForStartTask ComputeNodeState = "waitingforstarttask"
282)
283
284// PossibleComputeNodeStateValues returns an array of possible values for the ComputeNodeState const type.
285func PossibleComputeNodeStateValues() []ComputeNodeState {
286	return []ComputeNodeState{Creating, Idle, LeavingPool, Offline, Preempted, Rebooting, Reimaging, Running, Starting, StartTaskFailed, Unknown, Unusable, WaitingForStartTask}
287}
288
289// DependencyAction enumerates the values for dependency action.
290type DependencyAction string
291
292const (
293	// Block Block the task's dependencies.
294	Block DependencyAction = "block"
295	// Satisfy Satisfy the task's dependencies.
296	Satisfy DependencyAction = "satisfy"
297)
298
299// PossibleDependencyActionValues returns an array of possible values for the DependencyAction const type.
300func PossibleDependencyActionValues() []DependencyAction {
301	return []DependencyAction{Block, Satisfy}
302}
303
304// DisableComputeNodeSchedulingOption enumerates the values for disable compute node scheduling option.
305type DisableComputeNodeSchedulingOption string
306
307const (
308	// DisableComputeNodeSchedulingOptionRequeue Terminate running task processes and requeue the tasks. The
309	// tasks may run again on other compute nodes, or when task scheduling is re-enabled on this node. Enter
310	// offline state as soon as tasks have been terminated.
311	DisableComputeNodeSchedulingOptionRequeue DisableComputeNodeSchedulingOption = "requeue"
312	// DisableComputeNodeSchedulingOptionTaskCompletion Allow currently running tasks to complete. Schedule no
313	// new tasks while waiting. Enter offline state when all tasks have completed.
314	DisableComputeNodeSchedulingOptionTaskCompletion DisableComputeNodeSchedulingOption = "taskcompletion"
315	// DisableComputeNodeSchedulingOptionTerminate Terminate running tasks. The tasks will be completed with
316	// failureInfo indicating that they were terminated, and will not run again. Enter offline state as soon as
317	// tasks have been terminated.
318	DisableComputeNodeSchedulingOptionTerminate DisableComputeNodeSchedulingOption = "terminate"
319)
320
321// PossibleDisableComputeNodeSchedulingOptionValues returns an array of possible values for the DisableComputeNodeSchedulingOption const type.
322func PossibleDisableComputeNodeSchedulingOptionValues() []DisableComputeNodeSchedulingOption {
323	return []DisableComputeNodeSchedulingOption{DisableComputeNodeSchedulingOptionRequeue, DisableComputeNodeSchedulingOptionTaskCompletion, DisableComputeNodeSchedulingOptionTerminate}
324}
325
326// DisableJobOption enumerates the values for disable job option.
327type DisableJobOption string
328
329const (
330	// DisableJobOptionRequeue Terminate running tasks and requeue them. The tasks will run again when the job
331	// is enabled.
332	DisableJobOptionRequeue DisableJobOption = "requeue"
333	// DisableJobOptionTerminate Terminate running tasks. The tasks will be completed with failureInfo
334	// indicating that they were terminated, and will not run again.
335	DisableJobOptionTerminate DisableJobOption = "terminate"
336	// DisableJobOptionWait Allow currently running tasks to complete.
337	DisableJobOptionWait DisableJobOption = "wait"
338)
339
340// PossibleDisableJobOptionValues returns an array of possible values for the DisableJobOption const type.
341func PossibleDisableJobOptionValues() []DisableJobOption {
342	return []DisableJobOption{DisableJobOptionRequeue, DisableJobOptionTerminate, DisableJobOptionWait}
343}
344
345// DynamicVNetAssignmentScope enumerates the values for dynamic v net assignment scope.
346type DynamicVNetAssignmentScope string
347
348const (
349	// DynamicVNetAssignmentScopeJob Dynamic VNet assignment is done per-job.
350	DynamicVNetAssignmentScopeJob DynamicVNetAssignmentScope = "job"
351	// DynamicVNetAssignmentScopeNone No dynamic VNet assignment is enabled.
352	DynamicVNetAssignmentScopeNone DynamicVNetAssignmentScope = "none"
353)
354
355// PossibleDynamicVNetAssignmentScopeValues returns an array of possible values for the DynamicVNetAssignmentScope const type.
356func PossibleDynamicVNetAssignmentScopeValues() []DynamicVNetAssignmentScope {
357	return []DynamicVNetAssignmentScope{DynamicVNetAssignmentScopeJob, DynamicVNetAssignmentScopeNone}
358}
359
360// ElevationLevel enumerates the values for elevation level.
361type ElevationLevel string
362
363const (
364	// Admin The user is a user with elevated access and operates with full Administrator permissions.
365	Admin ElevationLevel = "admin"
366	// NonAdmin The user is a standard user without elevated access.
367	NonAdmin ElevationLevel = "nonadmin"
368)
369
370// PossibleElevationLevelValues returns an array of possible values for the ElevationLevel const type.
371func PossibleElevationLevelValues() []ElevationLevel {
372	return []ElevationLevel{Admin, NonAdmin}
373}
374
375// ErrorCategory enumerates the values for error category.
376type ErrorCategory string
377
378const (
379	// ServerError The error is due to an internal server issue.
380	ServerError ErrorCategory = "servererror"
381	// UserError The error is due to a user issue, such as misconfiguration.
382	UserError ErrorCategory = "usererror"
383)
384
385// PossibleErrorCategoryValues returns an array of possible values for the ErrorCategory const type.
386func PossibleErrorCategoryValues() []ErrorCategory {
387	return []ErrorCategory{ServerError, UserError}
388}
389
390// InboundEndpointProtocol enumerates the values for inbound endpoint protocol.
391type InboundEndpointProtocol string
392
393const (
394	// TCP Use TCP for the endpoint.
395	TCP InboundEndpointProtocol = "tcp"
396	// UDP Use UDP for the endpoint.
397	UDP InboundEndpointProtocol = "udp"
398)
399
400// PossibleInboundEndpointProtocolValues returns an array of possible values for the InboundEndpointProtocol const type.
401func PossibleInboundEndpointProtocolValues() []InboundEndpointProtocol {
402	return []InboundEndpointProtocol{TCP, UDP}
403}
404
405// JobAction enumerates the values for job action.
406type JobAction string
407
408const (
409	// JobActionDisable Disable the job. This is equivalent to calling the disable job API, with a disableTasks
410	// value of requeue.
411	JobActionDisable JobAction = "disable"
412	// JobActionNone Take no action.
413	JobActionNone JobAction = "none"
414	// JobActionTerminate Terminate the job. The terminateReason in the job's executionInfo is set to
415	// "TaskFailed".
416	JobActionTerminate JobAction = "terminate"
417)
418
419// PossibleJobActionValues returns an array of possible values for the JobAction const type.
420func PossibleJobActionValues() []JobAction {
421	return []JobAction{JobActionDisable, JobActionNone, JobActionTerminate}
422}
423
424// JobPreparationTaskState enumerates the values for job preparation task state.
425type JobPreparationTaskState string
426
427const (
428	// JobPreparationTaskStateCompleted The task has exited with exit code 0, or the task has exhausted its
429	// retry limit, or the Batch service was unable to start the task due to task preparation errors (such as
430	// resource file download failures).
431	JobPreparationTaskStateCompleted JobPreparationTaskState = "completed"
432	// JobPreparationTaskStateRunning The task is currently running (including retrying).
433	JobPreparationTaskStateRunning JobPreparationTaskState = "running"
434)
435
436// PossibleJobPreparationTaskStateValues returns an array of possible values for the JobPreparationTaskState const type.
437func PossibleJobPreparationTaskStateValues() []JobPreparationTaskState {
438	return []JobPreparationTaskState{JobPreparationTaskStateCompleted, JobPreparationTaskStateRunning}
439}
440
441// JobReleaseTaskState enumerates the values for job release task state.
442type JobReleaseTaskState string
443
444const (
445	// JobReleaseTaskStateCompleted The task has exited with exit code 0, or the task has exhausted its retry
446	// limit, or the Batch service was unable to start the task due to task preparation errors (such as
447	// resource file download failures).
448	JobReleaseTaskStateCompleted JobReleaseTaskState = "completed"
449	// JobReleaseTaskStateRunning The task is currently running (including retrying).
450	JobReleaseTaskStateRunning JobReleaseTaskState = "running"
451)
452
453// PossibleJobReleaseTaskStateValues returns an array of possible values for the JobReleaseTaskState const type.
454func PossibleJobReleaseTaskStateValues() []JobReleaseTaskState {
455	return []JobReleaseTaskState{JobReleaseTaskStateCompleted, JobReleaseTaskStateRunning}
456}
457
458// JobScheduleState enumerates the values for job schedule state.
459type JobScheduleState string
460
461const (
462	// JobScheduleStateActive The job schedule is active and will create jobs as per its schedule.
463	JobScheduleStateActive JobScheduleState = "active"
464	// JobScheduleStateCompleted The schedule has terminated, either by reaching its end time or by the user
465	// terminating it explicitly.
466	JobScheduleStateCompleted JobScheduleState = "completed"
467	// JobScheduleStateDeleting The user has requested that the schedule be deleted, but the delete operation
468	// is still in progress. The scheduler will not initiate any new jobs for this schedule, and will delete
469	// any existing jobs and tasks under the schedule, including any active job. The schedule will be deleted
470	// when all jobs and tasks under the schedule have been deleted.
471	JobScheduleStateDeleting JobScheduleState = "deleting"
472	// JobScheduleStateDisabled The user has disabled the schedule. The scheduler will not initiate any new
473	// jobs will on this schedule, but any existing active job will continue to run.
474	JobScheduleStateDisabled JobScheduleState = "disabled"
475	// JobScheduleStateTerminating The schedule has no more work to do, or has been explicitly terminated by
476	// the user, but the termination operation is still in progress. The scheduler will not initiate any new
477	// jobs for this schedule, nor is any existing job active.
478	JobScheduleStateTerminating JobScheduleState = "terminating"
479)
480
481// PossibleJobScheduleStateValues returns an array of possible values for the JobScheduleState const type.
482func PossibleJobScheduleStateValues() []JobScheduleState {
483	return []JobScheduleState{JobScheduleStateActive, JobScheduleStateCompleted, JobScheduleStateDeleting, JobScheduleStateDisabled, JobScheduleStateTerminating}
484}
485
486// JobState enumerates the values for job state.
487type JobState string
488
489const (
490	// JobStateActive The job is available to have tasks scheduled.
491	JobStateActive JobState = "active"
492	// JobStateCompleted All tasks have terminated, and the system will not accept any more tasks or any
493	// further changes to the job.
494	JobStateCompleted JobState = "completed"
495	// JobStateDeleting A user has requested that the job be deleted, but the delete operation is still in
496	// progress (for example, because the system is still terminating running tasks).
497	JobStateDeleting JobState = "deleting"
498	// JobStateDisabled A user has disabled the job. No tasks are running, and no new tasks will be scheduled.
499	JobStateDisabled JobState = "disabled"
500	// JobStateDisabling A user has requested that the job be disabled, but the disable operation is still in
501	// progress (for example, waiting for tasks to terminate).
502	JobStateDisabling JobState = "disabling"
503	// JobStateEnabling A user has requested that the job be enabled, but the enable operation is still in
504	// progress.
505	JobStateEnabling JobState = "enabling"
506	// JobStateTerminating The job is about to complete, either because a Job Manager task has completed or
507	// because the user has terminated the job, but the terminate operation is still in progress (for example,
508	// because Job Release tasks are running).
509	JobStateTerminating JobState = "terminating"
510)
511
512// PossibleJobStateValues returns an array of possible values for the JobState const type.
513func PossibleJobStateValues() []JobState {
514	return []JobState{JobStateActive, JobStateCompleted, JobStateDeleting, JobStateDisabled, JobStateDisabling, JobStateEnabling, JobStateTerminating}
515}
516
517// LoginMode enumerates the values for login mode.
518type LoginMode string
519
520const (
521	// Batch The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running
522	// parallel processes.
523	Batch LoginMode = "batch"
524	// Interactive The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows
525	// VirtualMachineConfiguration pools. If this option is used with an elevated user identity in a Windows
526	// VirtualMachineConfiguration pool, the user session will not be elevated unless the application executed
527	// by the task command line is configured to always require administrative privilege or to always require
528	// maximum privilege.
529	Interactive LoginMode = "interactive"
530)
531
532// PossibleLoginModeValues returns an array of possible values for the LoginMode const type.
533func PossibleLoginModeValues() []LoginMode {
534	return []LoginMode{Batch, Interactive}
535}
536
537// NetworkSecurityGroupRuleAccess enumerates the values for network security group rule access.
538type NetworkSecurityGroupRuleAccess string
539
540const (
541	// Allow Allow access.
542	Allow NetworkSecurityGroupRuleAccess = "allow"
543	// Deny Deny access.
544	Deny NetworkSecurityGroupRuleAccess = "deny"
545)
546
547// PossibleNetworkSecurityGroupRuleAccessValues returns an array of possible values for the NetworkSecurityGroupRuleAccess const type.
548func PossibleNetworkSecurityGroupRuleAccessValues() []NetworkSecurityGroupRuleAccess {
549	return []NetworkSecurityGroupRuleAccess{Allow, Deny}
550}
551
552// OnAllTasksComplete enumerates the values for on all tasks complete.
553type OnAllTasksComplete string
554
555const (
556	// NoAction Do nothing. The job remains active unless terminated or disabled by some other means.
557	NoAction OnAllTasksComplete = "noaction"
558	// TerminateJob Terminate the job. The job's terminateReason is set to 'AllTasksComplete'.
559	TerminateJob OnAllTasksComplete = "terminatejob"
560)
561
562// PossibleOnAllTasksCompleteValues returns an array of possible values for the OnAllTasksComplete const type.
563func PossibleOnAllTasksCompleteValues() []OnAllTasksComplete {
564	return []OnAllTasksComplete{NoAction, TerminateJob}
565}
566
567// OnTaskFailure enumerates the values for on task failure.
568type OnTaskFailure string
569
570const (
571	// OnTaskFailureNoAction Do nothing. The job remains active unless terminated or disabled by some other
572	// means.
573	OnTaskFailureNoAction OnTaskFailure = "noaction"
574	// OnTaskFailurePerformExitOptionsJobAction Take the action associated with the task exit condition in the
575	// task's exitConditions collection. (This may still result in no action being taken, if that is what the
576	// task specifies.)
577	OnTaskFailurePerformExitOptionsJobAction OnTaskFailure = "performexitoptionsjobaction"
578)
579
580// PossibleOnTaskFailureValues returns an array of possible values for the OnTaskFailure const type.
581func PossibleOnTaskFailureValues() []OnTaskFailure {
582	return []OnTaskFailure{OnTaskFailureNoAction, OnTaskFailurePerformExitOptionsJobAction}
583}
584
585// OSType enumerates the values for os type.
586type OSType string
587
588const (
589	// Linux The Linux operating system.
590	Linux OSType = "linux"
591	// Windows The Windows operating system.
592	Windows OSType = "windows"
593)
594
595// PossibleOSTypeValues returns an array of possible values for the OSType const type.
596func PossibleOSTypeValues() []OSType {
597	return []OSType{Linux, Windows}
598}
599
600// OutputFileUploadCondition enumerates the values for output file upload condition.
601type OutputFileUploadCondition string
602
603const (
604	// OutputFileUploadConditionTaskCompletion Upload the file(s) after the task process exits, no matter what
605	// the exit code was.
606	OutputFileUploadConditionTaskCompletion OutputFileUploadCondition = "taskcompletion"
607	// OutputFileUploadConditionTaskFailure Upload the file(s) only after the task process exits with a nonzero
608	// exit code.
609	OutputFileUploadConditionTaskFailure OutputFileUploadCondition = "taskfailure"
610	// OutputFileUploadConditionTaskSuccess Upload the file(s) only after the task process exits with an exit
611	// code of 0.
612	OutputFileUploadConditionTaskSuccess OutputFileUploadCondition = "tasksuccess"
613)
614
615// PossibleOutputFileUploadConditionValues returns an array of possible values for the OutputFileUploadCondition const type.
616func PossibleOutputFileUploadConditionValues() []OutputFileUploadCondition {
617	return []OutputFileUploadCondition{OutputFileUploadConditionTaskCompletion, OutputFileUploadConditionTaskFailure, OutputFileUploadConditionTaskSuccess}
618}
619
620// PoolLifetimeOption enumerates the values for pool lifetime option.
621type PoolLifetimeOption string
622
623const (
624	// PoolLifetimeOptionJob The pool exists for the lifetime of the job to which it is dedicated. The Batch
625	// service creates the pool when it creates the job. If the 'job' option is applied to a job schedule, the
626	// Batch service creates a new auto pool for every job created on the schedule.
627	PoolLifetimeOptionJob PoolLifetimeOption = "job"
628	// PoolLifetimeOptionJobSchedule The pool exists for the lifetime of the job schedule. The Batch Service
629	// creates the pool when it creates the first job on the schedule. You may apply this option only to job
630	// schedules, not to jobs.
631	PoolLifetimeOptionJobSchedule PoolLifetimeOption = "jobschedule"
632)
633
634// PossiblePoolLifetimeOptionValues returns an array of possible values for the PoolLifetimeOption const type.
635func PossiblePoolLifetimeOptionValues() []PoolLifetimeOption {
636	return []PoolLifetimeOption{PoolLifetimeOptionJob, PoolLifetimeOptionJobSchedule}
637}
638
639// PoolState enumerates the values for pool state.
640type PoolState string
641
642const (
643	// PoolStateActive The pool is available to run tasks subject to the availability of compute nodes.
644	PoolStateActive PoolState = "active"
645	// PoolStateDeleting The user has requested that the pool be deleted, but the delete operation has not yet
646	// completed.
647	PoolStateDeleting PoolState = "deleting"
648)
649
650// PossiblePoolStateValues returns an array of possible values for the PoolState const type.
651func PossiblePoolStateValues() []PoolState {
652	return []PoolState{PoolStateActive, PoolStateDeleting}
653}
654
655// SchedulingState enumerates the values for scheduling state.
656type SchedulingState string
657
658const (
659	// Disabled No new tasks will be scheduled on the node. Tasks already running on the node may still run to
660	// completion. All nodes start with scheduling enabled.
661	Disabled SchedulingState = "disabled"
662	// Enabled Tasks can be scheduled on the node.
663	Enabled SchedulingState = "enabled"
664)
665
666// PossibleSchedulingStateValues returns an array of possible values for the SchedulingState const type.
667func PossibleSchedulingStateValues() []SchedulingState {
668	return []SchedulingState{Disabled, Enabled}
669}
670
671// StartTaskState enumerates the values for start task state.
672type StartTaskState string
673
674const (
675	// StartTaskStateCompleted The start task has exited with exit code 0, or the start task has failed and the
676	// retry limit has reached, or the start task process did not run due to task preparation errors (such as
677	// resource file download failures).
678	StartTaskStateCompleted StartTaskState = "completed"
679	// StartTaskStateRunning The start task is currently running.
680	StartTaskStateRunning StartTaskState = "running"
681)
682
683// PossibleStartTaskStateValues returns an array of possible values for the StartTaskState const type.
684func PossibleStartTaskStateValues() []StartTaskState {
685	return []StartTaskState{StartTaskStateCompleted, StartTaskStateRunning}
686}
687
688// StorageAccountType enumerates the values for storage account type.
689type StorageAccountType string
690
691const (
692	// PremiumLRS The data disk should use premium locally redundant storage.
693	PremiumLRS StorageAccountType = "premium_lrs"
694	// StandardLRS The data disk should use standard locally redundant storage.
695	StandardLRS StorageAccountType = "standard_lrs"
696)
697
698// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type.
699func PossibleStorageAccountTypeValues() []StorageAccountType {
700	return []StorageAccountType{PremiumLRS, StandardLRS}
701}
702
703// SubtaskState enumerates the values for subtask state.
704type SubtaskState string
705
706const (
707	// SubtaskStateCompleted The task is no longer eligible to run, usually because the task has finished
708	// successfully, or the task has finished unsuccessfully and has exhausted its retry limit. A task is also
709	// marked as completed if an error occurred launching the task, or when the task has been terminated.
710	SubtaskStateCompleted SubtaskState = "completed"
711	// SubtaskStatePreparing The task has been assigned to a compute node, but is waiting for a required Job
712	// Preparation task to complete on the node. If the Job Preparation task succeeds, the task will move to
713	// running. If the Job Preparation task fails, the task will return to active and will be eligible to be
714	// assigned to a different node.
715	SubtaskStatePreparing SubtaskState = "preparing"
716	// SubtaskStateRunning The task is running on a compute node. This includes task-level preparation such as
717	// downloading resource files or deploying application packages specified on the task - it does not
718	// necessarily mean that the task command line has started executing.
719	SubtaskStateRunning SubtaskState = "running"
720)
721
722// PossibleSubtaskStateValues returns an array of possible values for the SubtaskState const type.
723func PossibleSubtaskStateValues() []SubtaskState {
724	return []SubtaskState{SubtaskStateCompleted, SubtaskStatePreparing, SubtaskStateRunning}
725}
726
727// TaskAddStatus enumerates the values for task add status.
728type TaskAddStatus string
729
730const (
731	// TaskAddStatusClientError The task failed to add due to a client error and should not be retried without
732	// modifying the request as appropriate.
733	TaskAddStatusClientError TaskAddStatus = "clienterror"
734	// TaskAddStatusServerError Task failed to add due to a server error and can be retried without
735	// modification.
736	TaskAddStatusServerError TaskAddStatus = "servererror"
737	// TaskAddStatusSuccess The task was added successfully.
738	TaskAddStatusSuccess TaskAddStatus = "success"
739)
740
741// PossibleTaskAddStatusValues returns an array of possible values for the TaskAddStatus const type.
742func PossibleTaskAddStatusValues() []TaskAddStatus {
743	return []TaskAddStatus{TaskAddStatusClientError, TaskAddStatusServerError, TaskAddStatusSuccess}
744}
745
746// TaskExecutionResult enumerates the values for task execution result.
747type TaskExecutionResult string
748
749const (
750	// Failure There was an error during processing of the task. The failure may have occurred before the task
751	// process was launched, while the task process was executing, or after the task process exited.
752	Failure TaskExecutionResult = "failure"
753	// Success The task ran successfully.
754	Success TaskExecutionResult = "success"
755)
756
757// PossibleTaskExecutionResultValues returns an array of possible values for the TaskExecutionResult const type.
758func PossibleTaskExecutionResultValues() []TaskExecutionResult {
759	return []TaskExecutionResult{Failure, Success}
760}
761
762// TaskState enumerates the values for task state.
763type TaskState string
764
765const (
766	// TaskStateActive The task is queued and able to run, but is not currently assigned to a compute node. A
767	// task enters this state when it is created, when it is enabled after being disabled, or when it is
768	// awaiting a retry after a failed run.
769	TaskStateActive TaskState = "active"
770	// TaskStateCompleted The task is no longer eligible to run, usually because the task has finished
771	// successfully, or the task has finished unsuccessfully and has exhausted its retry limit. A task is also
772	// marked as completed if an error occurred launching the task, or when the task has been terminated.
773	TaskStateCompleted TaskState = "completed"
774	// TaskStatePreparing The task has been assigned to a compute node, but is waiting for a required Job
775	// Preparation task to complete on the node. If the Job Preparation task succeeds, the task will move to
776	// running. If the Job Preparation task fails, the task will return to active and will be eligible to be
777	// assigned to a different node.
778	TaskStatePreparing TaskState = "preparing"
779	// TaskStateRunning The task is running on a compute node. This includes task-level preparation such as
780	// downloading resource files or deploying application packages specified on the task - it does not
781	// necessarily mean that the task command line has started executing.
782	TaskStateRunning TaskState = "running"
783)
784
785// PossibleTaskStateValues returns an array of possible values for the TaskState const type.
786func PossibleTaskStateValues() []TaskState {
787	return []TaskState{TaskStateActive, TaskStateCompleted, TaskStatePreparing, TaskStateRunning}
788}
789