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