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// ElevationLevel enumerates the values for elevation level. 335type ElevationLevel string 336 337const ( 338 // Admin The user is a user with elevated access and operates with full Administrator permissions. 339 Admin ElevationLevel = "admin" 340 // NonAdmin The user is a standard user without elevated access. 341 NonAdmin ElevationLevel = "nonadmin" 342) 343 344// PossibleElevationLevelValues returns an array of possible values for the ElevationLevel const type. 345func PossibleElevationLevelValues() []ElevationLevel { 346 return []ElevationLevel{Admin, NonAdmin} 347} 348 349// ErrorCategory enumerates the values for error category. 350type ErrorCategory string 351 352const ( 353 // ServerError The error is due to an internal server issue. 354 ServerError ErrorCategory = "servererror" 355 // UserError The error is due to a user issue, such as misconfiguration. 356 UserError ErrorCategory = "usererror" 357) 358 359// PossibleErrorCategoryValues returns an array of possible values for the ErrorCategory const type. 360func PossibleErrorCategoryValues() []ErrorCategory { 361 return []ErrorCategory{ServerError, UserError} 362} 363 364// InboundEndpointProtocol enumerates the values for inbound endpoint protocol. 365type InboundEndpointProtocol string 366 367const ( 368 // TCP Use TCP for the endpoint. 369 TCP InboundEndpointProtocol = "tcp" 370 // UDP Use UDP for the endpoint. 371 UDP InboundEndpointProtocol = "udp" 372) 373 374// PossibleInboundEndpointProtocolValues returns an array of possible values for the InboundEndpointProtocol const type. 375func PossibleInboundEndpointProtocolValues() []InboundEndpointProtocol { 376 return []InboundEndpointProtocol{TCP, UDP} 377} 378 379// JobAction enumerates the values for job action. 380type JobAction string 381 382const ( 383 // JobActionDisable Disable the job. This is equivalent to calling the disable job API, with a disableTasks 384 // value of requeue. 385 JobActionDisable JobAction = "disable" 386 // JobActionNone Take no action. 387 JobActionNone JobAction = "none" 388 // JobActionTerminate Terminate the job. The terminateReason in the job's executionInfo is set to 389 // "TaskFailed". 390 JobActionTerminate JobAction = "terminate" 391) 392 393// PossibleJobActionValues returns an array of possible values for the JobAction const type. 394func PossibleJobActionValues() []JobAction { 395 return []JobAction{JobActionDisable, JobActionNone, JobActionTerminate} 396} 397 398// JobPreparationTaskState enumerates the values for job preparation task state. 399type JobPreparationTaskState string 400 401const ( 402 // JobPreparationTaskStateCompleted The task has exited with exit code 0, or the task has exhausted its 403 // retry limit, or the Batch service was unable to start the task due to task preparation errors (such as 404 // resource file download failures). 405 JobPreparationTaskStateCompleted JobPreparationTaskState = "completed" 406 // JobPreparationTaskStateRunning The task is currently running (including retrying). 407 JobPreparationTaskStateRunning JobPreparationTaskState = "running" 408) 409 410// PossibleJobPreparationTaskStateValues returns an array of possible values for the JobPreparationTaskState const type. 411func PossibleJobPreparationTaskStateValues() []JobPreparationTaskState { 412 return []JobPreparationTaskState{JobPreparationTaskStateCompleted, JobPreparationTaskStateRunning} 413} 414 415// JobReleaseTaskState enumerates the values for job release task state. 416type JobReleaseTaskState string 417 418const ( 419 // JobReleaseTaskStateCompleted The task has exited with exit code 0, or the task has exhausted its retry 420 // limit, or the Batch service was unable to start the task due to task preparation errors (such as 421 // resource file download failures). 422 JobReleaseTaskStateCompleted JobReleaseTaskState = "completed" 423 // JobReleaseTaskStateRunning The task is currently running (including retrying). 424 JobReleaseTaskStateRunning JobReleaseTaskState = "running" 425) 426 427// PossibleJobReleaseTaskStateValues returns an array of possible values for the JobReleaseTaskState const type. 428func PossibleJobReleaseTaskStateValues() []JobReleaseTaskState { 429 return []JobReleaseTaskState{JobReleaseTaskStateCompleted, JobReleaseTaskStateRunning} 430} 431 432// JobScheduleState enumerates the values for job schedule state. 433type JobScheduleState string 434 435const ( 436 // JobScheduleStateActive The job schedule is active and will create jobs as per its schedule. 437 JobScheduleStateActive JobScheduleState = "active" 438 // JobScheduleStateCompleted The schedule has terminated, either by reaching its end time or by the user 439 // terminating it explicitly. 440 JobScheduleStateCompleted JobScheduleState = "completed" 441 // JobScheduleStateDeleting The user has requested that the schedule be deleted, but the delete operation 442 // is still in progress. The scheduler will not initiate any new jobs for this schedule, and will delete 443 // any existing jobs and tasks under the schedule, including any active job. The schedule will be deleted 444 // when all jobs and tasks under the schedule have been deleted. 445 JobScheduleStateDeleting JobScheduleState = "deleting" 446 // JobScheduleStateDisabled The user has disabled the schedule. The scheduler will not initiate any new 447 // jobs will on this schedule, but any existing active job will continue to run. 448 JobScheduleStateDisabled JobScheduleState = "disabled" 449 // JobScheduleStateTerminating The schedule has no more work to do, or has been explicitly terminated by 450 // the user, but the termination operation is still in progress. The scheduler will not initiate any new 451 // jobs for this schedule, nor is any existing job active. 452 JobScheduleStateTerminating JobScheduleState = "terminating" 453) 454 455// PossibleJobScheduleStateValues returns an array of possible values for the JobScheduleState const type. 456func PossibleJobScheduleStateValues() []JobScheduleState { 457 return []JobScheduleState{JobScheduleStateActive, JobScheduleStateCompleted, JobScheduleStateDeleting, JobScheduleStateDisabled, JobScheduleStateTerminating} 458} 459 460// JobState enumerates the values for job state. 461type JobState string 462 463const ( 464 // JobStateActive The job is available to have tasks scheduled. 465 JobStateActive JobState = "active" 466 // JobStateCompleted All tasks have terminated, and the system will not accept any more tasks or any 467 // further changes to the job. 468 JobStateCompleted JobState = "completed" 469 // JobStateDeleting A user has requested that the job be deleted, but the delete operation is still in 470 // progress (for example, because the system is still terminating running tasks). 471 JobStateDeleting JobState = "deleting" 472 // JobStateDisabled A user has disabled the job. No tasks are running, and no new tasks will be scheduled. 473 JobStateDisabled JobState = "disabled" 474 // JobStateDisabling A user has requested that the job be disabled, but the disable operation is still in 475 // progress (for example, waiting for tasks to terminate). 476 JobStateDisabling JobState = "disabling" 477 // JobStateEnabling A user has requested that the job be enabled, but the enable operation is still in 478 // progress. 479 JobStateEnabling JobState = "enabling" 480 // JobStateTerminating The job is about to complete, either because a Job Manager task has completed or 481 // because the user has terminated the job, but the terminate operation is still in progress (for example, 482 // because Job Release tasks are running). 483 JobStateTerminating JobState = "terminating" 484) 485 486// PossibleJobStateValues returns an array of possible values for the JobState const type. 487func PossibleJobStateValues() []JobState { 488 return []JobState{JobStateActive, JobStateCompleted, JobStateDeleting, JobStateDisabled, JobStateDisabling, JobStateEnabling, JobStateTerminating} 489} 490 491// NetworkSecurityGroupRuleAccess enumerates the values for network security group rule access. 492type NetworkSecurityGroupRuleAccess string 493 494const ( 495 // Allow Allow access. 496 Allow NetworkSecurityGroupRuleAccess = "allow" 497 // Deny Deny access. 498 Deny NetworkSecurityGroupRuleAccess = "deny" 499) 500 501// PossibleNetworkSecurityGroupRuleAccessValues returns an array of possible values for the NetworkSecurityGroupRuleAccess const type. 502func PossibleNetworkSecurityGroupRuleAccessValues() []NetworkSecurityGroupRuleAccess { 503 return []NetworkSecurityGroupRuleAccess{Allow, Deny} 504} 505 506// OnAllTasksComplete enumerates the values for on all tasks complete. 507type OnAllTasksComplete string 508 509const ( 510 // NoAction Do nothing. The job remains active unless terminated or disabled by some other means. 511 NoAction OnAllTasksComplete = "noaction" 512 // TerminateJob Terminate the job. The job's terminateReason is set to 'AllTasksComplete'. 513 TerminateJob OnAllTasksComplete = "terminatejob" 514) 515 516// PossibleOnAllTasksCompleteValues returns an array of possible values for the OnAllTasksComplete const type. 517func PossibleOnAllTasksCompleteValues() []OnAllTasksComplete { 518 return []OnAllTasksComplete{NoAction, TerminateJob} 519} 520 521// OnTaskFailure enumerates the values for on task failure. 522type OnTaskFailure string 523 524const ( 525 // OnTaskFailureNoAction Do nothing. The job remains active unless terminated or disabled by some other 526 // means. 527 OnTaskFailureNoAction OnTaskFailure = "noaction" 528 // OnTaskFailurePerformExitOptionsJobAction Take the action associated with the task exit condition in the 529 // task's exitConditions collection. (This may still result in no action being taken, if that is what the 530 // task specifies.) 531 OnTaskFailurePerformExitOptionsJobAction OnTaskFailure = "performexitoptionsjobaction" 532) 533 534// PossibleOnTaskFailureValues returns an array of possible values for the OnTaskFailure const type. 535func PossibleOnTaskFailureValues() []OnTaskFailure { 536 return []OnTaskFailure{OnTaskFailureNoAction, OnTaskFailurePerformExitOptionsJobAction} 537} 538 539// OSType enumerates the values for os type. 540type OSType string 541 542const ( 543 // Linux The Linux operating system. 544 Linux OSType = "linux" 545 // Windows The Windows operating system. 546 Windows OSType = "windows" 547) 548 549// PossibleOSTypeValues returns an array of possible values for the OSType const type. 550func PossibleOSTypeValues() []OSType { 551 return []OSType{Linux, Windows} 552} 553 554// OutputFileUploadCondition enumerates the values for output file upload condition. 555type OutputFileUploadCondition string 556 557const ( 558 // OutputFileUploadConditionTaskCompletion Upload the file(s) after the task process exits, no matter what 559 // the exit code was. 560 OutputFileUploadConditionTaskCompletion OutputFileUploadCondition = "taskcompletion" 561 // OutputFileUploadConditionTaskFailure Upload the file(s) only after the task process exits with a nonzero 562 // exit code. 563 OutputFileUploadConditionTaskFailure OutputFileUploadCondition = "taskfailure" 564 // OutputFileUploadConditionTaskSuccess Upload the file(s) only after the task process exits with an exit 565 // code of 0. 566 OutputFileUploadConditionTaskSuccess OutputFileUploadCondition = "tasksuccess" 567) 568 569// PossibleOutputFileUploadConditionValues returns an array of possible values for the OutputFileUploadCondition const type. 570func PossibleOutputFileUploadConditionValues() []OutputFileUploadCondition { 571 return []OutputFileUploadCondition{OutputFileUploadConditionTaskCompletion, OutputFileUploadConditionTaskFailure, OutputFileUploadConditionTaskSuccess} 572} 573 574// PoolLifetimeOption enumerates the values for pool lifetime option. 575type PoolLifetimeOption string 576 577const ( 578 // PoolLifetimeOptionJob The pool exists for the lifetime of the job to which it is dedicated. The Batch 579 // service creates the pool when it creates the job. If the 'job' option is applied to a job schedule, the 580 // Batch service creates a new auto pool for every job created on the schedule. 581 PoolLifetimeOptionJob PoolLifetimeOption = "job" 582 // PoolLifetimeOptionJobSchedule The pool exists for the lifetime of the job schedule. The Batch Service 583 // creates the pool when it creates the first job on the schedule. You may apply this option only to job 584 // schedules, not to jobs. 585 PoolLifetimeOptionJobSchedule PoolLifetimeOption = "jobschedule" 586) 587 588// PossiblePoolLifetimeOptionValues returns an array of possible values for the PoolLifetimeOption const type. 589func PossiblePoolLifetimeOptionValues() []PoolLifetimeOption { 590 return []PoolLifetimeOption{PoolLifetimeOptionJob, PoolLifetimeOptionJobSchedule} 591} 592 593// PoolState enumerates the values for pool state. 594type PoolState string 595 596const ( 597 // PoolStateActive The pool is available to run tasks subject to the availability of compute nodes. 598 PoolStateActive PoolState = "active" 599 // PoolStateDeleting The user has requested that the pool be deleted, but the delete operation has not yet 600 // completed. 601 PoolStateDeleting PoolState = "deleting" 602 // PoolStateUpgrading The user has requested that the operating system of the pool's nodes be upgraded, but 603 // the upgrade operation has not yet completed (that is, some nodes in the pool have not yet been 604 // upgraded). While upgrading, the pool may be able to run tasks (with reduced capacity) but this is not 605 // guaranteed. 606 PoolStateUpgrading PoolState = "upgrading" 607) 608 609// PossiblePoolStateValues returns an array of possible values for the PoolState const type. 610func PossiblePoolStateValues() []PoolState { 611 return []PoolState{PoolStateActive, PoolStateDeleting, PoolStateUpgrading} 612} 613 614// SchedulingState enumerates the values for scheduling state. 615type SchedulingState string 616 617const ( 618 // Disabled No new tasks will be scheduled on the node. Tasks already running on the node may still run to 619 // completion. All nodes start with scheduling enabled. 620 Disabled SchedulingState = "disabled" 621 // Enabled Tasks can be scheduled on the node. 622 Enabled SchedulingState = "enabled" 623) 624 625// PossibleSchedulingStateValues returns an array of possible values for the SchedulingState const type. 626func PossibleSchedulingStateValues() []SchedulingState { 627 return []SchedulingState{Disabled, Enabled} 628} 629 630// StartTaskState enumerates the values for start task state. 631type StartTaskState string 632 633const ( 634 // StartTaskStateCompleted The start task has exited with exit code 0, or the start task has failed and the 635 // retry limit has reached, or the start task process did not run due to task preparation errors (such as 636 // resource file download failures). 637 StartTaskStateCompleted StartTaskState = "completed" 638 // StartTaskStateRunning The start task is currently running. 639 StartTaskStateRunning StartTaskState = "running" 640) 641 642// PossibleStartTaskStateValues returns an array of possible values for the StartTaskState const type. 643func PossibleStartTaskStateValues() []StartTaskState { 644 return []StartTaskState{StartTaskStateCompleted, StartTaskStateRunning} 645} 646 647// StorageAccountType enumerates the values for storage account type. 648type StorageAccountType string 649 650const ( 651 // PremiumLRS The data disk should use premium locally redundant storage. 652 PremiumLRS StorageAccountType = "premium_lrs" 653 // StandardLRS The data disk should use standard locally redundant storage. 654 StandardLRS StorageAccountType = "standard_lrs" 655) 656 657// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. 658func PossibleStorageAccountTypeValues() []StorageAccountType { 659 return []StorageAccountType{PremiumLRS, StandardLRS} 660} 661 662// SubtaskState enumerates the values for subtask state. 663type SubtaskState string 664 665const ( 666 // SubtaskStateCompleted The task is no longer eligible to run, usually because the task has finished 667 // successfully, or the task has finished unsuccessfully and has exhausted its retry limit. A task is also 668 // marked as completed if an error occurred launching the task, or when the task has been terminated. 669 SubtaskStateCompleted SubtaskState = "completed" 670 // SubtaskStatePreparing The task has been assigned to a compute node, but is waiting for a required Job 671 // Preparation task to complete on the node. If the Job Preparation task succeeds, the task will move to 672 // running. If the Job Preparation task fails, the task will return to active and will be eligible to be 673 // assigned to a different node. 674 SubtaskStatePreparing SubtaskState = "preparing" 675 // SubtaskStateRunning The task is running on a compute node. This includes task-level preparation such as 676 // downloading resource files or deploying application packages specified on the task - it does not 677 // necessarily mean that the task command line has started executing. 678 SubtaskStateRunning SubtaskState = "running" 679) 680 681// PossibleSubtaskStateValues returns an array of possible values for the SubtaskState const type. 682func PossibleSubtaskStateValues() []SubtaskState { 683 return []SubtaskState{SubtaskStateCompleted, SubtaskStatePreparing, SubtaskStateRunning} 684} 685 686// TaskAddStatus enumerates the values for task add status. 687type TaskAddStatus string 688 689const ( 690 // TaskAddStatusClientError The task failed to add due to a client error and should not be retried without 691 // modifying the request as appropriate. 692 TaskAddStatusClientError TaskAddStatus = "clienterror" 693 // TaskAddStatusServerError Task failed to add due to a server error and can be retried without 694 // modification. 695 TaskAddStatusServerError TaskAddStatus = "servererror" 696 // TaskAddStatusSuccess The task was added successfully. 697 TaskAddStatusSuccess TaskAddStatus = "success" 698) 699 700// PossibleTaskAddStatusValues returns an array of possible values for the TaskAddStatus const type. 701func PossibleTaskAddStatusValues() []TaskAddStatus { 702 return []TaskAddStatus{TaskAddStatusClientError, TaskAddStatusServerError, TaskAddStatusSuccess} 703} 704 705// TaskCountValidationStatus enumerates the values for task count validation status. 706type TaskCountValidationStatus string 707 708const ( 709 // Unvalidated The Batch service has not been able to check state counts against the task states as 710 // reported in the List Tasks API. The validationStatus may be unvalidated if the job contains more than 711 // 200,000 tasks. 712 Unvalidated TaskCountValidationStatus = "unvalidated" 713 // Validated The Batch service has validated the state counts against the task states as reported in the 714 // List Tasks API. 715 Validated TaskCountValidationStatus = "validated" 716) 717 718// PossibleTaskCountValidationStatusValues returns an array of possible values for the TaskCountValidationStatus const type. 719func PossibleTaskCountValidationStatusValues() []TaskCountValidationStatus { 720 return []TaskCountValidationStatus{Unvalidated, Validated} 721} 722 723// TaskExecutionResult enumerates the values for task execution result. 724type TaskExecutionResult string 725 726const ( 727 // Failure There was an error during processing of the task. The failure may have occurred before the task 728 // process was launched, while the task process was executing, or after the task process exited. 729 Failure TaskExecutionResult = "failure" 730 // Success The task ran successfully. 731 Success TaskExecutionResult = "success" 732) 733 734// PossibleTaskExecutionResultValues returns an array of possible values for the TaskExecutionResult const type. 735func PossibleTaskExecutionResultValues() []TaskExecutionResult { 736 return []TaskExecutionResult{Failure, Success} 737} 738 739// TaskState enumerates the values for task state. 740type TaskState string 741 742const ( 743 // TaskStateActive The task is queued and able to run, but is not currently assigned to a compute node. A 744 // task enters this state when it is created, when it is enabled after being disabled, or when it is 745 // awaiting a retry after a failed run. 746 TaskStateActive TaskState = "active" 747 // TaskStateCompleted The task is no longer eligible to run, usually because the task has finished 748 // successfully, or the task has finished unsuccessfully and has exhausted its retry limit. A task is also 749 // marked as completed if an error occurred launching the task, or when the task has been terminated. 750 TaskStateCompleted TaskState = "completed" 751 // TaskStatePreparing The task has been assigned to a compute node, but is waiting for a required Job 752 // Preparation task to complete on the node. If the Job Preparation task succeeds, the task will move to 753 // running. If the Job Preparation task fails, the task will return to active and will be eligible to be 754 // assigned to a different node. 755 TaskStatePreparing TaskState = "preparing" 756 // TaskStateRunning The task is running on a compute node. This includes task-level preparation such as 757 // downloading resource files or deploying application packages specified on the task - it does not 758 // necessarily mean that the task command line has started executing. 759 TaskStateRunning TaskState = "running" 760) 761 762// PossibleTaskStateValues returns an array of possible values for the TaskState const type. 763func PossibleTaskStateValues() []TaskState { 764 return []TaskState{TaskStateActive, TaskStateCompleted, TaskStatePreparing, TaskStateRunning} 765} 766