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 9import ( 10 "context" 11 "github.com/Azure/go-autorest/autorest" 12 "github.com/Azure/go-autorest/autorest/date" 13 "github.com/Azure/go-autorest/autorest/to" 14 "github.com/Azure/go-autorest/tracing" 15 "io" 16 "net/http" 17) 18 19// The package's fully qualified name. 20const fqdn = "github.com/Azure/azure-sdk-for-go/services/batch/2018-12-01.8.0/batch" 21 22// AccountListNodeAgentSkusResult ... 23type AccountListNodeAgentSkusResult struct { 24 autorest.Response `json:"-"` 25 Value *[]NodeAgentSku `json:"value,omitempty"` 26 OdataNextLink *string `json:"odata.nextLink,omitempty"` 27} 28 29// AccountListNodeAgentSkusResultIterator provides access to a complete listing of NodeAgentSku values. 30type AccountListNodeAgentSkusResultIterator struct { 31 i int 32 page AccountListNodeAgentSkusResultPage 33} 34 35// NextWithContext advances to the next value. If there was an error making 36// the request the iterator does not advance and the error is returned. 37func (iter *AccountListNodeAgentSkusResultIterator) NextWithContext(ctx context.Context) (err error) { 38 if tracing.IsEnabled() { 39 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListNodeAgentSkusResultIterator.NextWithContext") 40 defer func() { 41 sc := -1 42 if iter.Response().Response.Response != nil { 43 sc = iter.Response().Response.Response.StatusCode 44 } 45 tracing.EndSpan(ctx, sc, err) 46 }() 47 } 48 iter.i++ 49 if iter.i < len(iter.page.Values()) { 50 return nil 51 } 52 err = iter.page.NextWithContext(ctx) 53 if err != nil { 54 iter.i-- 55 return err 56 } 57 iter.i = 0 58 return nil 59} 60 61// Next advances to the next value. If there was an error making 62// the request the iterator does not advance and the error is returned. 63// Deprecated: Use NextWithContext() instead. 64func (iter *AccountListNodeAgentSkusResultIterator) Next() error { 65 return iter.NextWithContext(context.Background()) 66} 67 68// NotDone returns true if the enumeration should be started or is not yet complete. 69func (iter AccountListNodeAgentSkusResultIterator) NotDone() bool { 70 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 71} 72 73// Response returns the raw server response from the last page request. 74func (iter AccountListNodeAgentSkusResultIterator) Response() AccountListNodeAgentSkusResult { 75 return iter.page.Response() 76} 77 78// Value returns the current value or a zero-initialized value if the 79// iterator has advanced beyond the end of the collection. 80func (iter AccountListNodeAgentSkusResultIterator) Value() NodeAgentSku { 81 if !iter.page.NotDone() { 82 return NodeAgentSku{} 83 } 84 return iter.page.Values()[iter.i] 85} 86 87// Creates a new instance of the AccountListNodeAgentSkusResultIterator type. 88func NewAccountListNodeAgentSkusResultIterator(page AccountListNodeAgentSkusResultPage) AccountListNodeAgentSkusResultIterator { 89 return AccountListNodeAgentSkusResultIterator{page: page} 90} 91 92// IsEmpty returns true if the ListResult contains no values. 93func (alnasr AccountListNodeAgentSkusResult) IsEmpty() bool { 94 return alnasr.Value == nil || len(*alnasr.Value) == 0 95} 96 97// hasNextLink returns true if the NextLink is not empty. 98func (alnasr AccountListNodeAgentSkusResult) hasNextLink() bool { 99 return alnasr.OdataNextLink != nil && len(*alnasr.OdataNextLink) != 0 100} 101 102// accountListNodeAgentSkusResultPreparer prepares a request to retrieve the next set of results. 103// It returns nil if no more results exist. 104func (alnasr AccountListNodeAgentSkusResult) accountListNodeAgentSkusResultPreparer(ctx context.Context) (*http.Request, error) { 105 if !alnasr.hasNextLink() { 106 return nil, nil 107 } 108 return autorest.Prepare((&http.Request{}).WithContext(ctx), 109 autorest.AsJSON(), 110 autorest.AsGet(), 111 autorest.WithBaseURL(to.String(alnasr.OdataNextLink))) 112} 113 114// AccountListNodeAgentSkusResultPage contains a page of NodeAgentSku values. 115type AccountListNodeAgentSkusResultPage struct { 116 fn func(context.Context, AccountListNodeAgentSkusResult) (AccountListNodeAgentSkusResult, error) 117 alnasr AccountListNodeAgentSkusResult 118} 119 120// NextWithContext advances to the next page of values. If there was an error making 121// the request the page does not advance and the error is returned. 122func (page *AccountListNodeAgentSkusResultPage) NextWithContext(ctx context.Context) (err error) { 123 if tracing.IsEnabled() { 124 ctx = tracing.StartSpan(ctx, fqdn+"/AccountListNodeAgentSkusResultPage.NextWithContext") 125 defer func() { 126 sc := -1 127 if page.Response().Response.Response != nil { 128 sc = page.Response().Response.Response.StatusCode 129 } 130 tracing.EndSpan(ctx, sc, err) 131 }() 132 } 133 for { 134 next, err := page.fn(ctx, page.alnasr) 135 if err != nil { 136 return err 137 } 138 page.alnasr = next 139 if !next.hasNextLink() || !next.IsEmpty() { 140 break 141 } 142 } 143 return nil 144} 145 146// Next advances to the next page of values. If there was an error making 147// the request the page does not advance and the error is returned. 148// Deprecated: Use NextWithContext() instead. 149func (page *AccountListNodeAgentSkusResultPage) Next() error { 150 return page.NextWithContext(context.Background()) 151} 152 153// NotDone returns true if the page enumeration should be started or is not yet complete. 154func (page AccountListNodeAgentSkusResultPage) NotDone() bool { 155 return !page.alnasr.IsEmpty() 156} 157 158// Response returns the raw server response from the last page request. 159func (page AccountListNodeAgentSkusResultPage) Response() AccountListNodeAgentSkusResult { 160 return page.alnasr 161} 162 163// Values returns the slice of values for the current page or nil if there are no values. 164func (page AccountListNodeAgentSkusResultPage) Values() []NodeAgentSku { 165 if page.alnasr.IsEmpty() { 166 return nil 167 } 168 return *page.alnasr.Value 169} 170 171// Creates a new instance of the AccountListNodeAgentSkusResultPage type. 172func NewAccountListNodeAgentSkusResultPage(cur AccountListNodeAgentSkusResult, getNextPage func(context.Context, AccountListNodeAgentSkusResult) (AccountListNodeAgentSkusResult, error)) AccountListNodeAgentSkusResultPage { 173 return AccountListNodeAgentSkusResultPage{ 174 fn: getNextPage, 175 alnasr: cur, 176 } 177} 178 179// AffinityInformation ... 180type AffinityInformation struct { 181 // AffinityID - You can pass the affinityId of a compute node to indicate that this task needs to run on that compute node. Note that this is just a soft affinity. If the target node is busy or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere. 182 AffinityID *string `json:"affinityId,omitempty"` 183} 184 185// ApplicationListResult ... 186type ApplicationListResult struct { 187 autorest.Response `json:"-"` 188 Value *[]ApplicationSummary `json:"value,omitempty"` 189 OdataNextLink *string `json:"odata.nextLink,omitempty"` 190} 191 192// ApplicationListResultIterator provides access to a complete listing of ApplicationSummary values. 193type ApplicationListResultIterator struct { 194 i int 195 page ApplicationListResultPage 196} 197 198// NextWithContext advances to the next value. If there was an error making 199// the request the iterator does not advance and the error is returned. 200func (iter *ApplicationListResultIterator) NextWithContext(ctx context.Context) (err error) { 201 if tracing.IsEnabled() { 202 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultIterator.NextWithContext") 203 defer func() { 204 sc := -1 205 if iter.Response().Response.Response != nil { 206 sc = iter.Response().Response.Response.StatusCode 207 } 208 tracing.EndSpan(ctx, sc, err) 209 }() 210 } 211 iter.i++ 212 if iter.i < len(iter.page.Values()) { 213 return nil 214 } 215 err = iter.page.NextWithContext(ctx) 216 if err != nil { 217 iter.i-- 218 return err 219 } 220 iter.i = 0 221 return nil 222} 223 224// Next advances to the next value. If there was an error making 225// the request the iterator does not advance and the error is returned. 226// Deprecated: Use NextWithContext() instead. 227func (iter *ApplicationListResultIterator) Next() error { 228 return iter.NextWithContext(context.Background()) 229} 230 231// NotDone returns true if the enumeration should be started or is not yet complete. 232func (iter ApplicationListResultIterator) NotDone() bool { 233 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 234} 235 236// Response returns the raw server response from the last page request. 237func (iter ApplicationListResultIterator) Response() ApplicationListResult { 238 return iter.page.Response() 239} 240 241// Value returns the current value or a zero-initialized value if the 242// iterator has advanced beyond the end of the collection. 243func (iter ApplicationListResultIterator) Value() ApplicationSummary { 244 if !iter.page.NotDone() { 245 return ApplicationSummary{} 246 } 247 return iter.page.Values()[iter.i] 248} 249 250// Creates a new instance of the ApplicationListResultIterator type. 251func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator { 252 return ApplicationListResultIterator{page: page} 253} 254 255// IsEmpty returns true if the ListResult contains no values. 256func (alr ApplicationListResult) IsEmpty() bool { 257 return alr.Value == nil || len(*alr.Value) == 0 258} 259 260// hasNextLink returns true if the NextLink is not empty. 261func (alr ApplicationListResult) hasNextLink() bool { 262 return alr.OdataNextLink != nil && len(*alr.OdataNextLink) != 0 263} 264 265// applicationListResultPreparer prepares a request to retrieve the next set of results. 266// It returns nil if no more results exist. 267func (alr ApplicationListResult) applicationListResultPreparer(ctx context.Context) (*http.Request, error) { 268 if !alr.hasNextLink() { 269 return nil, nil 270 } 271 return autorest.Prepare((&http.Request{}).WithContext(ctx), 272 autorest.AsJSON(), 273 autorest.AsGet(), 274 autorest.WithBaseURL(to.String(alr.OdataNextLink))) 275} 276 277// ApplicationListResultPage contains a page of ApplicationSummary values. 278type ApplicationListResultPage struct { 279 fn func(context.Context, ApplicationListResult) (ApplicationListResult, error) 280 alr ApplicationListResult 281} 282 283// NextWithContext advances to the next page of values. If there was an error making 284// the request the page does not advance and the error is returned. 285func (page *ApplicationListResultPage) NextWithContext(ctx context.Context) (err error) { 286 if tracing.IsEnabled() { 287 ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultPage.NextWithContext") 288 defer func() { 289 sc := -1 290 if page.Response().Response.Response != nil { 291 sc = page.Response().Response.Response.StatusCode 292 } 293 tracing.EndSpan(ctx, sc, err) 294 }() 295 } 296 for { 297 next, err := page.fn(ctx, page.alr) 298 if err != nil { 299 return err 300 } 301 page.alr = next 302 if !next.hasNextLink() || !next.IsEmpty() { 303 break 304 } 305 } 306 return nil 307} 308 309// Next advances to the next page of values. If there was an error making 310// the request the page does not advance and the error is returned. 311// Deprecated: Use NextWithContext() instead. 312func (page *ApplicationListResultPage) Next() error { 313 return page.NextWithContext(context.Background()) 314} 315 316// NotDone returns true if the page enumeration should be started or is not yet complete. 317func (page ApplicationListResultPage) NotDone() bool { 318 return !page.alr.IsEmpty() 319} 320 321// Response returns the raw server response from the last page request. 322func (page ApplicationListResultPage) Response() ApplicationListResult { 323 return page.alr 324} 325 326// Values returns the slice of values for the current page or nil if there are no values. 327func (page ApplicationListResultPage) Values() []ApplicationSummary { 328 if page.alr.IsEmpty() { 329 return nil 330 } 331 return *page.alr.Value 332} 333 334// Creates a new instance of the ApplicationListResultPage type. 335func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { 336 return ApplicationListResultPage{ 337 fn: getNextPage, 338 alr: cur, 339 } 340} 341 342// ApplicationPackageReference ... 343type ApplicationPackageReference struct { 344 ApplicationID *string `json:"applicationId,omitempty"` 345 // Version - If this is omitted on a pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a task, and no default version is specified for this application, the task fails with a pre-processing error. 346 Version *string `json:"version,omitempty"` 347} 348 349// ApplicationSummary ... 350type ApplicationSummary struct { 351 autorest.Response `json:"-"` 352 ID *string `json:"id,omitempty"` 353 DisplayName *string `json:"displayName,omitempty"` 354 Versions *[]string `json:"versions,omitempty"` 355} 356 357// AuthenticationTokenSettings ... 358type AuthenticationTokenSettings struct { 359 // Access - The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the job which contains the task. 360 Access *[]AccessScope `json:"access,omitempty"` 361} 362 363// AutoPoolSpecification ... 364type AutoPoolSpecification struct { 365 // AutoPoolIDPrefix - The Batch service assigns each auto pool a unique identifier on creation. To distinguish between pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long. 366 AutoPoolIDPrefix *string `json:"autoPoolIdPrefix,omitempty"` 367 // PoolLifetimeOption - Possible values include: 'PoolLifetimeOptionJobSchedule', 'PoolLifetimeOptionJob' 368 PoolLifetimeOption PoolLifetimeOption `json:"poolLifetimeOption,omitempty"` 369 // KeepAlive - If false, the Batch service deletes the pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the job or job schedule completes. If true, the Batch service does not delete the pool automatically. It is up to the user to delete auto pools created with this option. 370 KeepAlive *bool `json:"keepAlive,omitempty"` 371 Pool *PoolSpecification `json:"pool,omitempty"` 372} 373 374// AutoScaleRun ... 375type AutoScaleRun struct { 376 autorest.Response `json:"-"` 377 Timestamp *date.Time `json:"timestamp,omitempty"` 378 // Results - Each variable value is returned in the form $variable=value, and variables are separated by semicolons. 379 Results *string `json:"results,omitempty"` 380 Error *AutoScaleRunError `json:"error,omitempty"` 381} 382 383// AutoScaleRunError ... 384type AutoScaleRunError struct { 385 Code *string `json:"code,omitempty"` 386 Message *string `json:"message,omitempty"` 387 Values *[]NameValuePair `json:"values,omitempty"` 388} 389 390// AutoUserSpecification ... 391type AutoUserSpecification struct { 392 // Scope - The default value is task. Possible values include: 'Task', 'Pool' 393 Scope AutoUserScope `json:"scope,omitempty"` 394 // ElevationLevel - The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' 395 ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"` 396} 397 398// Certificate a certificate that can be installed on compute nodes and can be used to authenticate 399// operations on the machine. 400type Certificate struct { 401 autorest.Response `json:"-"` 402 Thumbprint *string `json:"thumbprint,omitempty"` 403 ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"` 404 URL *string `json:"url,omitempty"` 405 // State - Possible values include: 'Active', 'Deleting', 'DeleteFailed' 406 State CertificateState `json:"state,omitempty"` 407 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 408 // PreviousState - This property is not set if the certificate is in its initial active state. Possible values include: 'Active', 'Deleting', 'DeleteFailed' 409 PreviousState CertificateState `json:"previousState,omitempty"` 410 // PreviousStateTransitionTime - This property is not set if the certificate is in its initial Active state. 411 PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"` 412 PublicData *string `json:"publicData,omitempty"` 413 // DeleteCertificateError - This property is set only if the certificate is in the DeleteFailed state. 414 DeleteCertificateError *DeleteCertificateError `json:"deleteCertificateError,omitempty"` 415} 416 417// CertificateAddParameter ... 418type CertificateAddParameter struct { 419 Thumbprint *string `json:"thumbprint,omitempty"` 420 ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"` 421 Data *string `json:"data,omitempty"` 422 // CertificateFormat - Possible values include: 'Pfx', 'Cer' 423 CertificateFormat CertificateFormat `json:"certificateFormat,omitempty"` 424 // Password - This is required if the certificate format is pfx. It should be omitted if the certificate format is cer. 425 Password *string `json:"password,omitempty"` 426} 427 428// CertificateListResult ... 429type CertificateListResult struct { 430 autorest.Response `json:"-"` 431 Value *[]Certificate `json:"value,omitempty"` 432 OdataNextLink *string `json:"odata.nextLink,omitempty"` 433} 434 435// CertificateListResultIterator provides access to a complete listing of Certificate values. 436type CertificateListResultIterator struct { 437 i int 438 page CertificateListResultPage 439} 440 441// NextWithContext advances to the next value. If there was an error making 442// the request the iterator does not advance and the error is returned. 443func (iter *CertificateListResultIterator) NextWithContext(ctx context.Context) (err error) { 444 if tracing.IsEnabled() { 445 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultIterator.NextWithContext") 446 defer func() { 447 sc := -1 448 if iter.Response().Response.Response != nil { 449 sc = iter.Response().Response.Response.StatusCode 450 } 451 tracing.EndSpan(ctx, sc, err) 452 }() 453 } 454 iter.i++ 455 if iter.i < len(iter.page.Values()) { 456 return nil 457 } 458 err = iter.page.NextWithContext(ctx) 459 if err != nil { 460 iter.i-- 461 return err 462 } 463 iter.i = 0 464 return nil 465} 466 467// Next advances to the next value. If there was an error making 468// the request the iterator does not advance and the error is returned. 469// Deprecated: Use NextWithContext() instead. 470func (iter *CertificateListResultIterator) Next() error { 471 return iter.NextWithContext(context.Background()) 472} 473 474// NotDone returns true if the enumeration should be started or is not yet complete. 475func (iter CertificateListResultIterator) NotDone() bool { 476 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 477} 478 479// Response returns the raw server response from the last page request. 480func (iter CertificateListResultIterator) Response() CertificateListResult { 481 return iter.page.Response() 482} 483 484// Value returns the current value or a zero-initialized value if the 485// iterator has advanced beyond the end of the collection. 486func (iter CertificateListResultIterator) Value() Certificate { 487 if !iter.page.NotDone() { 488 return Certificate{} 489 } 490 return iter.page.Values()[iter.i] 491} 492 493// Creates a new instance of the CertificateListResultIterator type. 494func NewCertificateListResultIterator(page CertificateListResultPage) CertificateListResultIterator { 495 return CertificateListResultIterator{page: page} 496} 497 498// IsEmpty returns true if the ListResult contains no values. 499func (clr CertificateListResult) IsEmpty() bool { 500 return clr.Value == nil || len(*clr.Value) == 0 501} 502 503// hasNextLink returns true if the NextLink is not empty. 504func (clr CertificateListResult) hasNextLink() bool { 505 return clr.OdataNextLink != nil && len(*clr.OdataNextLink) != 0 506} 507 508// certificateListResultPreparer prepares a request to retrieve the next set of results. 509// It returns nil if no more results exist. 510func (clr CertificateListResult) certificateListResultPreparer(ctx context.Context) (*http.Request, error) { 511 if !clr.hasNextLink() { 512 return nil, nil 513 } 514 return autorest.Prepare((&http.Request{}).WithContext(ctx), 515 autorest.AsJSON(), 516 autorest.AsGet(), 517 autorest.WithBaseURL(to.String(clr.OdataNextLink))) 518} 519 520// CertificateListResultPage contains a page of Certificate values. 521type CertificateListResultPage struct { 522 fn func(context.Context, CertificateListResult) (CertificateListResult, error) 523 clr CertificateListResult 524} 525 526// NextWithContext advances to the next page of values. If there was an error making 527// the request the page does not advance and the error is returned. 528func (page *CertificateListResultPage) NextWithContext(ctx context.Context) (err error) { 529 if tracing.IsEnabled() { 530 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultPage.NextWithContext") 531 defer func() { 532 sc := -1 533 if page.Response().Response.Response != nil { 534 sc = page.Response().Response.Response.StatusCode 535 } 536 tracing.EndSpan(ctx, sc, err) 537 }() 538 } 539 for { 540 next, err := page.fn(ctx, page.clr) 541 if err != nil { 542 return err 543 } 544 page.clr = next 545 if !next.hasNextLink() || !next.IsEmpty() { 546 break 547 } 548 } 549 return nil 550} 551 552// Next advances to the next page of values. If there was an error making 553// the request the page does not advance and the error is returned. 554// Deprecated: Use NextWithContext() instead. 555func (page *CertificateListResultPage) Next() error { 556 return page.NextWithContext(context.Background()) 557} 558 559// NotDone returns true if the page enumeration should be started or is not yet complete. 560func (page CertificateListResultPage) NotDone() bool { 561 return !page.clr.IsEmpty() 562} 563 564// Response returns the raw server response from the last page request. 565func (page CertificateListResultPage) Response() CertificateListResult { 566 return page.clr 567} 568 569// Values returns the slice of values for the current page or nil if there are no values. 570func (page CertificateListResultPage) Values() []Certificate { 571 if page.clr.IsEmpty() { 572 return nil 573 } 574 return *page.clr.Value 575} 576 577// Creates a new instance of the CertificateListResultPage type. 578func NewCertificateListResultPage(cur CertificateListResult, getNextPage func(context.Context, CertificateListResult) (CertificateListResult, error)) CertificateListResultPage { 579 return CertificateListResultPage{ 580 fn: getNextPage, 581 clr: cur, 582 } 583} 584 585// CertificateReference ... 586type CertificateReference struct { 587 Thumbprint *string `json:"thumbprint,omitempty"` 588 ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"` 589 // StoreLocation - The default value is currentuser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: 'CurrentUser', 'LocalMachine' 590 StoreLocation CertificateStoreLocation `json:"storeLocation,omitempty"` 591 // StoreName - This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My. 592 StoreName *string `json:"storeName,omitempty"` 593 // Visibility - You can specify more than one visibility in this collection. The default is all accounts. 594 Visibility *[]CertificateVisibility `json:"visibility,omitempty"` 595} 596 597// CloudJob ... 598type CloudJob struct { 599 autorest.Response `json:"-"` 600 // ID - The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case). 601 ID *string `json:"id,omitempty"` 602 DisplayName *string `json:"displayName,omitempty"` 603 UsesTaskDependencies *bool `json:"usesTaskDependencies,omitempty"` 604 URL *string `json:"url,omitempty"` 605 // ETag - This is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime. 606 ETag *string `json:"eTag,omitempty"` 607 // LastModified - This is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state. 608 LastModified *date.Time `json:"lastModified,omitempty"` 609 CreationTime *date.Time `json:"creationTime,omitempty"` 610 // State - Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting' 611 State JobState `json:"state,omitempty"` 612 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 613 // PreviousState - This property is not set if the job is in its initial Active state. Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting' 614 PreviousState JobState `json:"previousState,omitempty"` 615 // PreviousStateTransitionTime - This property is not set if the job is in its initial Active state. 616 PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"` 617 // Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. 618 Priority *int32 `json:"priority,omitempty"` 619 Constraints *JobConstraints `json:"constraints,omitempty"` 620 JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"` 621 // JobPreparationTask - The Job Preparation task is a special task run on each node before any other task of the job. 622 JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"` 623 // JobReleaseTask - The Job Release task is a special task run at the end of the job on each node that has run any other task of the job. 624 JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"` 625 // CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value. 626 CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"` 627 PoolInfo *PoolInformation `json:"poolInfo,omitempty"` 628 // OnAllTasksComplete - The default is noaction. Possible values include: 'NoAction', 'TerminateJob' 629 OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"` 630 // OnTaskFailure - A task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction' 631 OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"` 632 NetworkConfiguration *JobNetworkConfiguration `json:"networkConfiguration,omitempty"` 633 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 634 Metadata *[]MetadataItem `json:"metadata,omitempty"` 635 ExecutionInfo *JobExecutionInformation `json:"executionInfo,omitempty"` 636 // Stats - This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. 637 Stats *JobStatistics `json:"stats,omitempty"` 638} 639 640// CloudJobListPreparationAndReleaseTaskStatusResult ... 641type CloudJobListPreparationAndReleaseTaskStatusResult struct { 642 autorest.Response `json:"-"` 643 Value *[]JobPreparationAndReleaseTaskExecutionInformation `json:"value,omitempty"` 644 OdataNextLink *string `json:"odata.nextLink,omitempty"` 645} 646 647// CloudJobListPreparationAndReleaseTaskStatusResultIterator provides access to a complete listing of 648// JobPreparationAndReleaseTaskExecutionInformation values. 649type CloudJobListPreparationAndReleaseTaskStatusResultIterator struct { 650 i int 651 page CloudJobListPreparationAndReleaseTaskStatusResultPage 652} 653 654// NextWithContext advances to the next value. If there was an error making 655// the request the iterator does not advance and the error is returned. 656func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) NextWithContext(ctx context.Context) (err error) { 657 if tracing.IsEnabled() { 658 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListPreparationAndReleaseTaskStatusResultIterator.NextWithContext") 659 defer func() { 660 sc := -1 661 if iter.Response().Response.Response != nil { 662 sc = iter.Response().Response.Response.StatusCode 663 } 664 tracing.EndSpan(ctx, sc, err) 665 }() 666 } 667 iter.i++ 668 if iter.i < len(iter.page.Values()) { 669 return nil 670 } 671 err = iter.page.NextWithContext(ctx) 672 if err != nil { 673 iter.i-- 674 return err 675 } 676 iter.i = 0 677 return nil 678} 679 680// Next advances to the next value. If there was an error making 681// the request the iterator does not advance and the error is returned. 682// Deprecated: Use NextWithContext() instead. 683func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) Next() error { 684 return iter.NextWithContext(context.Background()) 685} 686 687// NotDone returns true if the enumeration should be started or is not yet complete. 688func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) NotDone() bool { 689 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 690} 691 692// Response returns the raw server response from the last page request. 693func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Response() CloudJobListPreparationAndReleaseTaskStatusResult { 694 return iter.page.Response() 695} 696 697// Value returns the current value or a zero-initialized value if the 698// iterator has advanced beyond the end of the collection. 699func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Value() JobPreparationAndReleaseTaskExecutionInformation { 700 if !iter.page.NotDone() { 701 return JobPreparationAndReleaseTaskExecutionInformation{} 702 } 703 return iter.page.Values()[iter.i] 704} 705 706// Creates a new instance of the CloudJobListPreparationAndReleaseTaskStatusResultIterator type. 707func NewCloudJobListPreparationAndReleaseTaskStatusResultIterator(page CloudJobListPreparationAndReleaseTaskStatusResultPage) CloudJobListPreparationAndReleaseTaskStatusResultIterator { 708 return CloudJobListPreparationAndReleaseTaskStatusResultIterator{page: page} 709} 710 711// IsEmpty returns true if the ListResult contains no values. 712func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) IsEmpty() bool { 713 return cjlpartsr.Value == nil || len(*cjlpartsr.Value) == 0 714} 715 716// hasNextLink returns true if the NextLink is not empty. 717func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) hasNextLink() bool { 718 return cjlpartsr.OdataNextLink != nil && len(*cjlpartsr.OdataNextLink) != 0 719} 720 721// cloudJobListPreparationAndReleaseTaskStatusResultPreparer prepares a request to retrieve the next set of results. 722// It returns nil if no more results exist. 723func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) cloudJobListPreparationAndReleaseTaskStatusResultPreparer(ctx context.Context) (*http.Request, error) { 724 if !cjlpartsr.hasNextLink() { 725 return nil, nil 726 } 727 return autorest.Prepare((&http.Request{}).WithContext(ctx), 728 autorest.AsJSON(), 729 autorest.AsGet(), 730 autorest.WithBaseURL(to.String(cjlpartsr.OdataNextLink))) 731} 732 733// CloudJobListPreparationAndReleaseTaskStatusResultPage contains a page of 734// JobPreparationAndReleaseTaskExecutionInformation values. 735type CloudJobListPreparationAndReleaseTaskStatusResultPage struct { 736 fn func(context.Context, CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error) 737 cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult 738} 739 740// NextWithContext advances to the next page of values. If there was an error making 741// the request the page does not advance and the error is returned. 742func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) NextWithContext(ctx context.Context) (err error) { 743 if tracing.IsEnabled() { 744 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListPreparationAndReleaseTaskStatusResultPage.NextWithContext") 745 defer func() { 746 sc := -1 747 if page.Response().Response.Response != nil { 748 sc = page.Response().Response.Response.StatusCode 749 } 750 tracing.EndSpan(ctx, sc, err) 751 }() 752 } 753 for { 754 next, err := page.fn(ctx, page.cjlpartsr) 755 if err != nil { 756 return err 757 } 758 page.cjlpartsr = next 759 if !next.hasNextLink() || !next.IsEmpty() { 760 break 761 } 762 } 763 return nil 764} 765 766// Next advances to the next page of values. If there was an error making 767// the request the page does not advance and the error is returned. 768// Deprecated: Use NextWithContext() instead. 769func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) Next() error { 770 return page.NextWithContext(context.Background()) 771} 772 773// NotDone returns true if the page enumeration should be started or is not yet complete. 774func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) NotDone() bool { 775 return !page.cjlpartsr.IsEmpty() 776} 777 778// Response returns the raw server response from the last page request. 779func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Response() CloudJobListPreparationAndReleaseTaskStatusResult { 780 return page.cjlpartsr 781} 782 783// Values returns the slice of values for the current page or nil if there are no values. 784func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Values() []JobPreparationAndReleaseTaskExecutionInformation { 785 if page.cjlpartsr.IsEmpty() { 786 return nil 787 } 788 return *page.cjlpartsr.Value 789} 790 791// Creates a new instance of the CloudJobListPreparationAndReleaseTaskStatusResultPage type. 792func NewCloudJobListPreparationAndReleaseTaskStatusResultPage(cur CloudJobListPreparationAndReleaseTaskStatusResult, getNextPage func(context.Context, CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error)) CloudJobListPreparationAndReleaseTaskStatusResultPage { 793 return CloudJobListPreparationAndReleaseTaskStatusResultPage{ 794 fn: getNextPage, 795 cjlpartsr: cur, 796 } 797} 798 799// CloudJobListResult ... 800type CloudJobListResult struct { 801 autorest.Response `json:"-"` 802 Value *[]CloudJob `json:"value,omitempty"` 803 OdataNextLink *string `json:"odata.nextLink,omitempty"` 804} 805 806// CloudJobListResultIterator provides access to a complete listing of CloudJob values. 807type CloudJobListResultIterator struct { 808 i int 809 page CloudJobListResultPage 810} 811 812// NextWithContext advances to the next value. If there was an error making 813// the request the iterator does not advance and the error is returned. 814func (iter *CloudJobListResultIterator) NextWithContext(ctx context.Context) (err error) { 815 if tracing.IsEnabled() { 816 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListResultIterator.NextWithContext") 817 defer func() { 818 sc := -1 819 if iter.Response().Response.Response != nil { 820 sc = iter.Response().Response.Response.StatusCode 821 } 822 tracing.EndSpan(ctx, sc, err) 823 }() 824 } 825 iter.i++ 826 if iter.i < len(iter.page.Values()) { 827 return nil 828 } 829 err = iter.page.NextWithContext(ctx) 830 if err != nil { 831 iter.i-- 832 return err 833 } 834 iter.i = 0 835 return nil 836} 837 838// Next advances to the next value. If there was an error making 839// the request the iterator does not advance and the error is returned. 840// Deprecated: Use NextWithContext() instead. 841func (iter *CloudJobListResultIterator) Next() error { 842 return iter.NextWithContext(context.Background()) 843} 844 845// NotDone returns true if the enumeration should be started or is not yet complete. 846func (iter CloudJobListResultIterator) NotDone() bool { 847 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 848} 849 850// Response returns the raw server response from the last page request. 851func (iter CloudJobListResultIterator) Response() CloudJobListResult { 852 return iter.page.Response() 853} 854 855// Value returns the current value or a zero-initialized value if the 856// iterator has advanced beyond the end of the collection. 857func (iter CloudJobListResultIterator) Value() CloudJob { 858 if !iter.page.NotDone() { 859 return CloudJob{} 860 } 861 return iter.page.Values()[iter.i] 862} 863 864// Creates a new instance of the CloudJobListResultIterator type. 865func NewCloudJobListResultIterator(page CloudJobListResultPage) CloudJobListResultIterator { 866 return CloudJobListResultIterator{page: page} 867} 868 869// IsEmpty returns true if the ListResult contains no values. 870func (cjlr CloudJobListResult) IsEmpty() bool { 871 return cjlr.Value == nil || len(*cjlr.Value) == 0 872} 873 874// hasNextLink returns true if the NextLink is not empty. 875func (cjlr CloudJobListResult) hasNextLink() bool { 876 return cjlr.OdataNextLink != nil && len(*cjlr.OdataNextLink) != 0 877} 878 879// cloudJobListResultPreparer prepares a request to retrieve the next set of results. 880// It returns nil if no more results exist. 881func (cjlr CloudJobListResult) cloudJobListResultPreparer(ctx context.Context) (*http.Request, error) { 882 if !cjlr.hasNextLink() { 883 return nil, nil 884 } 885 return autorest.Prepare((&http.Request{}).WithContext(ctx), 886 autorest.AsJSON(), 887 autorest.AsGet(), 888 autorest.WithBaseURL(to.String(cjlr.OdataNextLink))) 889} 890 891// CloudJobListResultPage contains a page of CloudJob values. 892type CloudJobListResultPage struct { 893 fn func(context.Context, CloudJobListResult) (CloudJobListResult, error) 894 cjlr CloudJobListResult 895} 896 897// NextWithContext advances to the next page of values. If there was an error making 898// the request the page does not advance and the error is returned. 899func (page *CloudJobListResultPage) NextWithContext(ctx context.Context) (err error) { 900 if tracing.IsEnabled() { 901 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobListResultPage.NextWithContext") 902 defer func() { 903 sc := -1 904 if page.Response().Response.Response != nil { 905 sc = page.Response().Response.Response.StatusCode 906 } 907 tracing.EndSpan(ctx, sc, err) 908 }() 909 } 910 for { 911 next, err := page.fn(ctx, page.cjlr) 912 if err != nil { 913 return err 914 } 915 page.cjlr = next 916 if !next.hasNextLink() || !next.IsEmpty() { 917 break 918 } 919 } 920 return nil 921} 922 923// Next advances to the next page of values. If there was an error making 924// the request the page does not advance and the error is returned. 925// Deprecated: Use NextWithContext() instead. 926func (page *CloudJobListResultPage) Next() error { 927 return page.NextWithContext(context.Background()) 928} 929 930// NotDone returns true if the page enumeration should be started or is not yet complete. 931func (page CloudJobListResultPage) NotDone() bool { 932 return !page.cjlr.IsEmpty() 933} 934 935// Response returns the raw server response from the last page request. 936func (page CloudJobListResultPage) Response() CloudJobListResult { 937 return page.cjlr 938} 939 940// Values returns the slice of values for the current page or nil if there are no values. 941func (page CloudJobListResultPage) Values() []CloudJob { 942 if page.cjlr.IsEmpty() { 943 return nil 944 } 945 return *page.cjlr.Value 946} 947 948// Creates a new instance of the CloudJobListResultPage type. 949func NewCloudJobListResultPage(cur CloudJobListResult, getNextPage func(context.Context, CloudJobListResult) (CloudJobListResult, error)) CloudJobListResultPage { 950 return CloudJobListResultPage{ 951 fn: getNextPage, 952 cjlr: cur, 953 } 954} 955 956// CloudJobSchedule ... 957type CloudJobSchedule struct { 958 autorest.Response `json:"-"` 959 ID *string `json:"id,omitempty"` 960 DisplayName *string `json:"displayName,omitempty"` 961 URL *string `json:"url,omitempty"` 962 // ETag - This is an opaque string. You can use it to detect whether the job schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. 963 ETag *string `json:"eTag,omitempty"` 964 // LastModified - This is the last time at which the schedule level data, such as the job specification or recurrence information, changed. It does not factor in job-level changes such as new jobs being created or jobs changing state. 965 LastModified *date.Time `json:"lastModified,omitempty"` 966 CreationTime *date.Time `json:"creationTime,omitempty"` 967 // State - Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting' 968 State JobScheduleState `json:"state,omitempty"` 969 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 970 // PreviousState - This property is not present if the job schedule is in its initial active state. Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting' 971 PreviousState JobScheduleState `json:"previousState,omitempty"` 972 // PreviousStateTransitionTime - This property is not present if the job schedule is in its initial active state. 973 PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"` 974 Schedule *Schedule `json:"schedule,omitempty"` 975 JobSpecification *JobSpecification `json:"jobSpecification,omitempty"` 976 ExecutionInfo *JobScheduleExecutionInformation `json:"executionInfo,omitempty"` 977 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 978 Metadata *[]MetadataItem `json:"metadata,omitempty"` 979 Stats *JobScheduleStatistics `json:"stats,omitempty"` 980} 981 982// CloudJobScheduleListResult ... 983type CloudJobScheduleListResult struct { 984 autorest.Response `json:"-"` 985 Value *[]CloudJobSchedule `json:"value,omitempty"` 986 OdataNextLink *string `json:"odata.nextLink,omitempty"` 987} 988 989// CloudJobScheduleListResultIterator provides access to a complete listing of CloudJobSchedule values. 990type CloudJobScheduleListResultIterator struct { 991 i int 992 page CloudJobScheduleListResultPage 993} 994 995// NextWithContext advances to the next value. If there was an error making 996// the request the iterator does not advance and the error is returned. 997func (iter *CloudJobScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) { 998 if tracing.IsEnabled() { 999 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobScheduleListResultIterator.NextWithContext") 1000 defer func() { 1001 sc := -1 1002 if iter.Response().Response.Response != nil { 1003 sc = iter.Response().Response.Response.StatusCode 1004 } 1005 tracing.EndSpan(ctx, sc, err) 1006 }() 1007 } 1008 iter.i++ 1009 if iter.i < len(iter.page.Values()) { 1010 return nil 1011 } 1012 err = iter.page.NextWithContext(ctx) 1013 if err != nil { 1014 iter.i-- 1015 return err 1016 } 1017 iter.i = 0 1018 return nil 1019} 1020 1021// Next advances to the next value. If there was an error making 1022// the request the iterator does not advance and the error is returned. 1023// Deprecated: Use NextWithContext() instead. 1024func (iter *CloudJobScheduleListResultIterator) Next() error { 1025 return iter.NextWithContext(context.Background()) 1026} 1027 1028// NotDone returns true if the enumeration should be started or is not yet complete. 1029func (iter CloudJobScheduleListResultIterator) NotDone() bool { 1030 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1031} 1032 1033// Response returns the raw server response from the last page request. 1034func (iter CloudJobScheduleListResultIterator) Response() CloudJobScheduleListResult { 1035 return iter.page.Response() 1036} 1037 1038// Value returns the current value or a zero-initialized value if the 1039// iterator has advanced beyond the end of the collection. 1040func (iter CloudJobScheduleListResultIterator) Value() CloudJobSchedule { 1041 if !iter.page.NotDone() { 1042 return CloudJobSchedule{} 1043 } 1044 return iter.page.Values()[iter.i] 1045} 1046 1047// Creates a new instance of the CloudJobScheduleListResultIterator type. 1048func NewCloudJobScheduleListResultIterator(page CloudJobScheduleListResultPage) CloudJobScheduleListResultIterator { 1049 return CloudJobScheduleListResultIterator{page: page} 1050} 1051 1052// IsEmpty returns true if the ListResult contains no values. 1053func (cjslr CloudJobScheduleListResult) IsEmpty() bool { 1054 return cjslr.Value == nil || len(*cjslr.Value) == 0 1055} 1056 1057// hasNextLink returns true if the NextLink is not empty. 1058func (cjslr CloudJobScheduleListResult) hasNextLink() bool { 1059 return cjslr.OdataNextLink != nil && len(*cjslr.OdataNextLink) != 0 1060} 1061 1062// cloudJobScheduleListResultPreparer prepares a request to retrieve the next set of results. 1063// It returns nil if no more results exist. 1064func (cjslr CloudJobScheduleListResult) cloudJobScheduleListResultPreparer(ctx context.Context) (*http.Request, error) { 1065 if !cjslr.hasNextLink() { 1066 return nil, nil 1067 } 1068 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1069 autorest.AsJSON(), 1070 autorest.AsGet(), 1071 autorest.WithBaseURL(to.String(cjslr.OdataNextLink))) 1072} 1073 1074// CloudJobScheduleListResultPage contains a page of CloudJobSchedule values. 1075type CloudJobScheduleListResultPage struct { 1076 fn func(context.Context, CloudJobScheduleListResult) (CloudJobScheduleListResult, error) 1077 cjslr CloudJobScheduleListResult 1078} 1079 1080// NextWithContext advances to the next page of values. If there was an error making 1081// the request the page does not advance and the error is returned. 1082func (page *CloudJobScheduleListResultPage) NextWithContext(ctx context.Context) (err error) { 1083 if tracing.IsEnabled() { 1084 ctx = tracing.StartSpan(ctx, fqdn+"/CloudJobScheduleListResultPage.NextWithContext") 1085 defer func() { 1086 sc := -1 1087 if page.Response().Response.Response != nil { 1088 sc = page.Response().Response.Response.StatusCode 1089 } 1090 tracing.EndSpan(ctx, sc, err) 1091 }() 1092 } 1093 for { 1094 next, err := page.fn(ctx, page.cjslr) 1095 if err != nil { 1096 return err 1097 } 1098 page.cjslr = next 1099 if !next.hasNextLink() || !next.IsEmpty() { 1100 break 1101 } 1102 } 1103 return nil 1104} 1105 1106// Next advances to the next page of values. If there was an error making 1107// the request the page does not advance and the error is returned. 1108// Deprecated: Use NextWithContext() instead. 1109func (page *CloudJobScheduleListResultPage) Next() error { 1110 return page.NextWithContext(context.Background()) 1111} 1112 1113// NotDone returns true if the page enumeration should be started or is not yet complete. 1114func (page CloudJobScheduleListResultPage) NotDone() bool { 1115 return !page.cjslr.IsEmpty() 1116} 1117 1118// Response returns the raw server response from the last page request. 1119func (page CloudJobScheduleListResultPage) Response() CloudJobScheduleListResult { 1120 return page.cjslr 1121} 1122 1123// Values returns the slice of values for the current page or nil if there are no values. 1124func (page CloudJobScheduleListResultPage) Values() []CloudJobSchedule { 1125 if page.cjslr.IsEmpty() { 1126 return nil 1127 } 1128 return *page.cjslr.Value 1129} 1130 1131// Creates a new instance of the CloudJobScheduleListResultPage type. 1132func NewCloudJobScheduleListResultPage(cur CloudJobScheduleListResult, getNextPage func(context.Context, CloudJobScheduleListResult) (CloudJobScheduleListResult, error)) CloudJobScheduleListResultPage { 1133 return CloudJobScheduleListResultPage{ 1134 fn: getNextPage, 1135 cjslr: cur, 1136 } 1137} 1138 1139// CloudPool ... 1140type CloudPool struct { 1141 autorest.Response `json:"-"` 1142 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case). 1143 ID *string `json:"id,omitempty"` 1144 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 1145 DisplayName *string `json:"displayName,omitempty"` 1146 URL *string `json:"url,omitempty"` 1147 // ETag - This is an opaque string. You can use it to detect whether the pool has changed between requests. In particular, you can be pass the ETag when updating a pool to specify that your changes should take effect only if nobody else has modified the pool in the meantime. 1148 ETag *string `json:"eTag,omitempty"` 1149 // LastModified - This is the last time at which the pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a compute node changing state. 1150 LastModified *date.Time `json:"lastModified,omitempty"` 1151 CreationTime *date.Time `json:"creationTime,omitempty"` 1152 // State - Possible values include: 'PoolStateActive', 'PoolStateDeleting' 1153 State PoolState `json:"state,omitempty"` 1154 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 1155 // AllocationState - Possible values include: 'Steady', 'Resizing', 'Stopping' 1156 AllocationState AllocationState `json:"allocationState,omitempty"` 1157 AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"` 1158 // VMSize - For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). 1159 VMSize *string `json:"vmSize,omitempty"` 1160 // CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'. 1161 CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"` 1162 // VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. 1163 VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"` 1164 // ResizeTimeout - This is the timeout for the most recent resize operation. (The initial sizing when the pool is created counts as a resize.) The default value is 15 minutes. 1165 ResizeTimeout *string `json:"resizeTimeout,omitempty"` 1166 // ResizeErrors - This property is set only if one or more errors occurred during the last pool resize, and only when the pool allocationState is Steady. 1167 ResizeErrors *[]ResizeError `json:"resizeErrors,omitempty"` 1168 CurrentDedicatedNodes *int32 `json:"currentDedicatedNodes,omitempty"` 1169 // CurrentLowPriorityNodes - Low-priority compute nodes which have been preempted are included in this count. 1170 CurrentLowPriorityNodes *int32 `json:"currentLowPriorityNodes,omitempty"` 1171 TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"` 1172 TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` 1173 // EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the pool automatically resizes according to the formula. The default value is false. 1174 EnableAutoScale *bool `json:"enableAutoScale,omitempty"` 1175 // AutoScaleFormula - This property is set only if the pool automatically scales, i.e. enableAutoScale is true. 1176 AutoScaleFormula *string `json:"autoScaleFormula,omitempty"` 1177 // AutoScaleEvaluationInterval - This property is set only if the pool automatically scales, i.e. enableAutoScale is true. 1178 AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"` 1179 // AutoScaleRun - This property is set only if the pool automatically scales, i.e. enableAutoScale is true. 1180 AutoScaleRun *AutoScaleRun `json:"autoScaleRun,omitempty"` 1181 // EnableInterNodeCommunication - This imposes restrictions on which nodes can be assigned to the pool. Specifying this value can reduce the chance of the requested number of nodes to be allocated in the pool. 1182 EnableInterNodeCommunication *bool `json:"enableInterNodeCommunication,omitempty"` 1183 NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` 1184 StartTask *StartTask `json:"startTask,omitempty"` 1185 // CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 1186 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 1187 // ApplicationPackageReferences - Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. 1188 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 1189 // ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. 1190 ApplicationLicenses *[]string `json:"applicationLicenses,omitempty"` 1191 // MaxTasksPerNode - The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. 1192 MaxTasksPerNode *int32 `json:"maxTasksPerNode,omitempty"` 1193 // TaskSchedulingPolicy - If not specified, the default is spread. 1194 TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"` 1195 UserAccounts *[]UserAccount `json:"userAccounts,omitempty"` 1196 Metadata *[]MetadataItem `json:"metadata,omitempty"` 1197 // Stats - This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. 1198 Stats *PoolStatistics `json:"stats,omitempty"` 1199} 1200 1201// CloudPoolListResult ... 1202type CloudPoolListResult struct { 1203 autorest.Response `json:"-"` 1204 Value *[]CloudPool `json:"value,omitempty"` 1205 OdataNextLink *string `json:"odata.nextLink,omitempty"` 1206} 1207 1208// CloudPoolListResultIterator provides access to a complete listing of CloudPool values. 1209type CloudPoolListResultIterator struct { 1210 i int 1211 page CloudPoolListResultPage 1212} 1213 1214// NextWithContext advances to the next value. If there was an error making 1215// the request the iterator does not advance and the error is returned. 1216func (iter *CloudPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { 1217 if tracing.IsEnabled() { 1218 ctx = tracing.StartSpan(ctx, fqdn+"/CloudPoolListResultIterator.NextWithContext") 1219 defer func() { 1220 sc := -1 1221 if iter.Response().Response.Response != nil { 1222 sc = iter.Response().Response.Response.StatusCode 1223 } 1224 tracing.EndSpan(ctx, sc, err) 1225 }() 1226 } 1227 iter.i++ 1228 if iter.i < len(iter.page.Values()) { 1229 return nil 1230 } 1231 err = iter.page.NextWithContext(ctx) 1232 if err != nil { 1233 iter.i-- 1234 return err 1235 } 1236 iter.i = 0 1237 return nil 1238} 1239 1240// Next advances to the next value. If there was an error making 1241// the request the iterator does not advance and the error is returned. 1242// Deprecated: Use NextWithContext() instead. 1243func (iter *CloudPoolListResultIterator) Next() error { 1244 return iter.NextWithContext(context.Background()) 1245} 1246 1247// NotDone returns true if the enumeration should be started or is not yet complete. 1248func (iter CloudPoolListResultIterator) NotDone() bool { 1249 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1250} 1251 1252// Response returns the raw server response from the last page request. 1253func (iter CloudPoolListResultIterator) Response() CloudPoolListResult { 1254 return iter.page.Response() 1255} 1256 1257// Value returns the current value or a zero-initialized value if the 1258// iterator has advanced beyond the end of the collection. 1259func (iter CloudPoolListResultIterator) Value() CloudPool { 1260 if !iter.page.NotDone() { 1261 return CloudPool{} 1262 } 1263 return iter.page.Values()[iter.i] 1264} 1265 1266// Creates a new instance of the CloudPoolListResultIterator type. 1267func NewCloudPoolListResultIterator(page CloudPoolListResultPage) CloudPoolListResultIterator { 1268 return CloudPoolListResultIterator{page: page} 1269} 1270 1271// IsEmpty returns true if the ListResult contains no values. 1272func (cplr CloudPoolListResult) IsEmpty() bool { 1273 return cplr.Value == nil || len(*cplr.Value) == 0 1274} 1275 1276// hasNextLink returns true if the NextLink is not empty. 1277func (cplr CloudPoolListResult) hasNextLink() bool { 1278 return cplr.OdataNextLink != nil && len(*cplr.OdataNextLink) != 0 1279} 1280 1281// cloudPoolListResultPreparer prepares a request to retrieve the next set of results. 1282// It returns nil if no more results exist. 1283func (cplr CloudPoolListResult) cloudPoolListResultPreparer(ctx context.Context) (*http.Request, error) { 1284 if !cplr.hasNextLink() { 1285 return nil, nil 1286 } 1287 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1288 autorest.AsJSON(), 1289 autorest.AsGet(), 1290 autorest.WithBaseURL(to.String(cplr.OdataNextLink))) 1291} 1292 1293// CloudPoolListResultPage contains a page of CloudPool values. 1294type CloudPoolListResultPage struct { 1295 fn func(context.Context, CloudPoolListResult) (CloudPoolListResult, error) 1296 cplr CloudPoolListResult 1297} 1298 1299// NextWithContext advances to the next page of values. If there was an error making 1300// the request the page does not advance and the error is returned. 1301func (page *CloudPoolListResultPage) NextWithContext(ctx context.Context) (err error) { 1302 if tracing.IsEnabled() { 1303 ctx = tracing.StartSpan(ctx, fqdn+"/CloudPoolListResultPage.NextWithContext") 1304 defer func() { 1305 sc := -1 1306 if page.Response().Response.Response != nil { 1307 sc = page.Response().Response.Response.StatusCode 1308 } 1309 tracing.EndSpan(ctx, sc, err) 1310 }() 1311 } 1312 for { 1313 next, err := page.fn(ctx, page.cplr) 1314 if err != nil { 1315 return err 1316 } 1317 page.cplr = next 1318 if !next.hasNextLink() || !next.IsEmpty() { 1319 break 1320 } 1321 } 1322 return nil 1323} 1324 1325// Next advances to the next page of values. If there was an error making 1326// the request the page does not advance and the error is returned. 1327// Deprecated: Use NextWithContext() instead. 1328func (page *CloudPoolListResultPage) Next() error { 1329 return page.NextWithContext(context.Background()) 1330} 1331 1332// NotDone returns true if the page enumeration should be started or is not yet complete. 1333func (page CloudPoolListResultPage) NotDone() bool { 1334 return !page.cplr.IsEmpty() 1335} 1336 1337// Response returns the raw server response from the last page request. 1338func (page CloudPoolListResultPage) Response() CloudPoolListResult { 1339 return page.cplr 1340} 1341 1342// Values returns the slice of values for the current page or nil if there are no values. 1343func (page CloudPoolListResultPage) Values() []CloudPool { 1344 if page.cplr.IsEmpty() { 1345 return nil 1346 } 1347 return *page.cplr.Value 1348} 1349 1350// Creates a new instance of the CloudPoolListResultPage type. 1351func NewCloudPoolListResultPage(cur CloudPoolListResult, getNextPage func(context.Context, CloudPoolListResult) (CloudPoolListResult, error)) CloudPoolListResultPage { 1352 return CloudPoolListResultPage{ 1353 fn: getNextPage, 1354 cplr: cur, 1355 } 1356} 1357 1358// CloudServiceConfiguration ... 1359type CloudServiceConfiguration struct { 1360 // OsFamily - Possible values are: 1361 // 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 1362 // 3 - OS Family 3, equivalent to Windows Server 2012. 1363 // 4 - OS Family 4, equivalent to Windows Server 2012 R2. 1364 // 5 - OS Family 5, equivalent to Windows Server 2016. 1365 // 6 - OS Family 6, equivalent to Windows Server 2019. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). 1366 OsFamily *string `json:"osFamily,omitempty"` 1367 // OsVersion - The default value is * which specifies the latest operating system version for the specified OS family. 1368 OsVersion *string `json:"osVersion,omitempty"` 1369} 1370 1371// CloudTask batch will retry tasks when a recovery operation is triggered on a compute node. Examples of 1372// recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a 1373// compute node disappeared due to host failure. Retries due to recovery operations are independent of and 1374// are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due 1375// to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks 1376// need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The 1377// best practice for long running tasks is to use some form of checkpointing. 1378type CloudTask struct { 1379 autorest.Response `json:"-"` 1380 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. 1381 ID *string `json:"id,omitempty"` 1382 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 1383 DisplayName *string `json:"displayName,omitempty"` 1384 URL *string `json:"url,omitempty"` 1385 // ETag - This is an opaque string. You can use it to detect whether the task has changed between requests. In particular, you can be pass the ETag when updating a task to specify that your changes should take effect only if nobody else has modified the task in the meantime. 1386 ETag *string `json:"eTag,omitempty"` 1387 LastModified *date.Time `json:"lastModified,omitempty"` 1388 CreationTime *date.Time `json:"creationTime,omitempty"` 1389 // ExitConditions - How the Batch service should respond when the task completes. 1390 ExitConditions *ExitConditions `json:"exitConditions,omitempty"` 1391 // State - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted' 1392 State TaskState `json:"state,omitempty"` 1393 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 1394 // PreviousState - This property is not set if the task is in its initial Active state. Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted' 1395 PreviousState TaskState `json:"previousState,omitempty"` 1396 // PreviousStateTransitionTime - This property is not set if the task is in its initial Active state. 1397 PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"` 1398 // CommandLine - For multi-instance tasks, the command line is executed as the primary task, after the primary task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 1399 CommandLine *string `json:"commandLine,omitempty"` 1400 // ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 1401 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 1402 // ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. 1403 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 1404 // OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed. 1405 OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` 1406 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 1407 AffinityInfo *AffinityInformation `json:"affinityInfo,omitempty"` 1408 Constraints *TaskConstraints `json:"constraints,omitempty"` 1409 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task. 1410 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 1411 ExecutionInfo *TaskExecutionInformation `json:"executionInfo,omitempty"` 1412 NodeInfo *ComputeNodeInformation `json:"nodeInfo,omitempty"` 1413 MultiInstanceSettings *MultiInstanceSettings `json:"multiInstanceSettings,omitempty"` 1414 Stats *TaskStatistics `json:"stats,omitempty"` 1415 // DependsOn - This task will not be scheduled until all tasks that it depends on have completed successfully. If any of those tasks fail and exhaust their retry counts, this task will never be scheduled. 1416 DependsOn *TaskDependencies `json:"dependsOn,omitempty"` 1417 // ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working directory. Therefore, if a referenced package is already on the compute node, and is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If a referenced application package cannot be installed, for example because the package has been deleted or because download failed, the task fails. 1418 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 1419 // AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job. 1420 AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"` 1421} 1422 1423// CloudTaskListResult ... 1424type CloudTaskListResult struct { 1425 autorest.Response `json:"-"` 1426 Value *[]CloudTask `json:"value,omitempty"` 1427 OdataNextLink *string `json:"odata.nextLink,omitempty"` 1428} 1429 1430// CloudTaskListResultIterator provides access to a complete listing of CloudTask values. 1431type CloudTaskListResultIterator struct { 1432 i int 1433 page CloudTaskListResultPage 1434} 1435 1436// NextWithContext advances to the next value. If there was an error making 1437// the request the iterator does not advance and the error is returned. 1438func (iter *CloudTaskListResultIterator) NextWithContext(ctx context.Context) (err error) { 1439 if tracing.IsEnabled() { 1440 ctx = tracing.StartSpan(ctx, fqdn+"/CloudTaskListResultIterator.NextWithContext") 1441 defer func() { 1442 sc := -1 1443 if iter.Response().Response.Response != nil { 1444 sc = iter.Response().Response.Response.StatusCode 1445 } 1446 tracing.EndSpan(ctx, sc, err) 1447 }() 1448 } 1449 iter.i++ 1450 if iter.i < len(iter.page.Values()) { 1451 return nil 1452 } 1453 err = iter.page.NextWithContext(ctx) 1454 if err != nil { 1455 iter.i-- 1456 return err 1457 } 1458 iter.i = 0 1459 return nil 1460} 1461 1462// Next advances to the next value. If there was an error making 1463// the request the iterator does not advance and the error is returned. 1464// Deprecated: Use NextWithContext() instead. 1465func (iter *CloudTaskListResultIterator) Next() error { 1466 return iter.NextWithContext(context.Background()) 1467} 1468 1469// NotDone returns true if the enumeration should be started or is not yet complete. 1470func (iter CloudTaskListResultIterator) NotDone() bool { 1471 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1472} 1473 1474// Response returns the raw server response from the last page request. 1475func (iter CloudTaskListResultIterator) Response() CloudTaskListResult { 1476 return iter.page.Response() 1477} 1478 1479// Value returns the current value or a zero-initialized value if the 1480// iterator has advanced beyond the end of the collection. 1481func (iter CloudTaskListResultIterator) Value() CloudTask { 1482 if !iter.page.NotDone() { 1483 return CloudTask{} 1484 } 1485 return iter.page.Values()[iter.i] 1486} 1487 1488// Creates a new instance of the CloudTaskListResultIterator type. 1489func NewCloudTaskListResultIterator(page CloudTaskListResultPage) CloudTaskListResultIterator { 1490 return CloudTaskListResultIterator{page: page} 1491} 1492 1493// IsEmpty returns true if the ListResult contains no values. 1494func (ctlr CloudTaskListResult) IsEmpty() bool { 1495 return ctlr.Value == nil || len(*ctlr.Value) == 0 1496} 1497 1498// hasNextLink returns true if the NextLink is not empty. 1499func (ctlr CloudTaskListResult) hasNextLink() bool { 1500 return ctlr.OdataNextLink != nil && len(*ctlr.OdataNextLink) != 0 1501} 1502 1503// cloudTaskListResultPreparer prepares a request to retrieve the next set of results. 1504// It returns nil if no more results exist. 1505func (ctlr CloudTaskListResult) cloudTaskListResultPreparer(ctx context.Context) (*http.Request, error) { 1506 if !ctlr.hasNextLink() { 1507 return nil, nil 1508 } 1509 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1510 autorest.AsJSON(), 1511 autorest.AsGet(), 1512 autorest.WithBaseURL(to.String(ctlr.OdataNextLink))) 1513} 1514 1515// CloudTaskListResultPage contains a page of CloudTask values. 1516type CloudTaskListResultPage struct { 1517 fn func(context.Context, CloudTaskListResult) (CloudTaskListResult, error) 1518 ctlr CloudTaskListResult 1519} 1520 1521// NextWithContext advances to the next page of values. If there was an error making 1522// the request the page does not advance and the error is returned. 1523func (page *CloudTaskListResultPage) NextWithContext(ctx context.Context) (err error) { 1524 if tracing.IsEnabled() { 1525 ctx = tracing.StartSpan(ctx, fqdn+"/CloudTaskListResultPage.NextWithContext") 1526 defer func() { 1527 sc := -1 1528 if page.Response().Response.Response != nil { 1529 sc = page.Response().Response.Response.StatusCode 1530 } 1531 tracing.EndSpan(ctx, sc, err) 1532 }() 1533 } 1534 for { 1535 next, err := page.fn(ctx, page.ctlr) 1536 if err != nil { 1537 return err 1538 } 1539 page.ctlr = next 1540 if !next.hasNextLink() || !next.IsEmpty() { 1541 break 1542 } 1543 } 1544 return nil 1545} 1546 1547// Next advances to the next page of values. If there was an error making 1548// the request the page does not advance and the error is returned. 1549// Deprecated: Use NextWithContext() instead. 1550func (page *CloudTaskListResultPage) Next() error { 1551 return page.NextWithContext(context.Background()) 1552} 1553 1554// NotDone returns true if the page enumeration should be started or is not yet complete. 1555func (page CloudTaskListResultPage) NotDone() bool { 1556 return !page.ctlr.IsEmpty() 1557} 1558 1559// Response returns the raw server response from the last page request. 1560func (page CloudTaskListResultPage) Response() CloudTaskListResult { 1561 return page.ctlr 1562} 1563 1564// Values returns the slice of values for the current page or nil if there are no values. 1565func (page CloudTaskListResultPage) Values() []CloudTask { 1566 if page.ctlr.IsEmpty() { 1567 return nil 1568 } 1569 return *page.ctlr.Value 1570} 1571 1572// Creates a new instance of the CloudTaskListResultPage type. 1573func NewCloudTaskListResultPage(cur CloudTaskListResult, getNextPage func(context.Context, CloudTaskListResult) (CloudTaskListResult, error)) CloudTaskListResultPage { 1574 return CloudTaskListResultPage{ 1575 fn: getNextPage, 1576 ctlr: cur, 1577 } 1578} 1579 1580// CloudTaskListSubtasksResult ... 1581type CloudTaskListSubtasksResult struct { 1582 autorest.Response `json:"-"` 1583 Value *[]SubtaskInformation `json:"value,omitempty"` 1584} 1585 1586// ComputeNode ... 1587type ComputeNode struct { 1588 autorest.Response `json:"-"` 1589 // ID - Every node that is added to a pool is assigned a unique ID. Whenever a node is removed from a pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new nodes. 1590 ID *string `json:"id,omitempty"` 1591 URL *string `json:"url,omitempty"` 1592 // State - The low-priority node has been preempted. Tasks which were running on the node when it was preempted will be rescheduled when another node becomes available. Possible values include: 'Idle', 'Rebooting', 'Reimaging', 'Running', 'Unusable', 'Creating', 'Starting', 'WaitingForStartTask', 'StartTaskFailed', 'Unknown', 'LeavingPool', 'Offline', 'Preempted' 1593 State ComputeNodeState `json:"state,omitempty"` 1594 // SchedulingState - Possible values include: 'Enabled', 'Disabled' 1595 SchedulingState SchedulingState `json:"schedulingState,omitempty"` 1596 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 1597 // LastBootTime - This property may not be present if the node state is unusable. 1598 LastBootTime *date.Time `json:"lastBootTime,omitempty"` 1599 // AllocationTime - This is the time when the node was initially allocated and doesn't change once set. It is not updated when the node is service healed or preempted. 1600 AllocationTime *date.Time `json:"allocationTime,omitempty"` 1601 // IPAddress - Every node that is added to a pool is assigned a unique IP address. Whenever a node is removed from a pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new nodes. 1602 IPAddress *string `json:"ipAddress,omitempty"` 1603 // AffinityID - Note that this is just a soft affinity. If the target node is busy or unavailable at the time the task is scheduled, then the task will be scheduled elsewhere. 1604 AffinityID *string `json:"affinityId,omitempty"` 1605 // VMSize - For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). 1606 VMSize *string `json:"vmSize,omitempty"` 1607 TotalTasksRun *int32 `json:"totalTasksRun,omitempty"` 1608 RunningTasksCount *int32 `json:"runningTasksCount,omitempty"` 1609 TotalTasksSucceeded *int32 `json:"totalTasksSucceeded,omitempty"` 1610 // RecentTasks - This property is present only if at least one task has run on this node since it was assigned to the pool. 1611 RecentTasks *[]TaskInformation `json:"recentTasks,omitempty"` 1612 StartTask *StartTask `json:"startTask,omitempty"` 1613 StartTaskInfo *StartTaskInformation `json:"startTaskInfo,omitempty"` 1614 // CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 1615 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 1616 Errors *[]ComputeNodeError `json:"errors,omitempty"` 1617 IsDedicated *bool `json:"isDedicated,omitempty"` 1618 EndpointConfiguration *ComputeNodeEndpointConfiguration `json:"endpointConfiguration,omitempty"` 1619 NodeAgentInfo *NodeAgentInformation `json:"nodeAgentInfo,omitempty"` 1620} 1621 1622// ComputeNodeEndpointConfiguration ... 1623type ComputeNodeEndpointConfiguration struct { 1624 InboundEndpoints *[]InboundEndpoint `json:"inboundEndpoints,omitempty"` 1625} 1626 1627// ComputeNodeError ... 1628type ComputeNodeError struct { 1629 Code *string `json:"code,omitempty"` 1630 Message *string `json:"message,omitempty"` 1631 ErrorDetails *[]NameValuePair `json:"errorDetails,omitempty"` 1632} 1633 1634// ComputeNodeGetRemoteLoginSettingsResult ... 1635type ComputeNodeGetRemoteLoginSettingsResult struct { 1636 autorest.Response `json:"-"` 1637 RemoteLoginIPAddress *string `json:"remoteLoginIPAddress,omitempty"` 1638 RemoteLoginPort *int32 `json:"remoteLoginPort,omitempty"` 1639} 1640 1641// ComputeNodeInformation ... 1642type ComputeNodeInformation struct { 1643 AffinityID *string `json:"affinityId,omitempty"` 1644 NodeURL *string `json:"nodeUrl,omitempty"` 1645 PoolID *string `json:"poolId,omitempty"` 1646 NodeID *string `json:"nodeId,omitempty"` 1647 TaskRootDirectory *string `json:"taskRootDirectory,omitempty"` 1648 TaskRootDirectoryURL *string `json:"taskRootDirectoryUrl,omitempty"` 1649} 1650 1651// ComputeNodeListResult ... 1652type ComputeNodeListResult struct { 1653 autorest.Response `json:"-"` 1654 Value *[]ComputeNode `json:"value,omitempty"` 1655 OdataNextLink *string `json:"odata.nextLink,omitempty"` 1656} 1657 1658// ComputeNodeListResultIterator provides access to a complete listing of ComputeNode values. 1659type ComputeNodeListResultIterator struct { 1660 i int 1661 page ComputeNodeListResultPage 1662} 1663 1664// NextWithContext advances to the next value. If there was an error making 1665// the request the iterator does not advance and the error is returned. 1666func (iter *ComputeNodeListResultIterator) NextWithContext(ctx context.Context) (err error) { 1667 if tracing.IsEnabled() { 1668 ctx = tracing.StartSpan(ctx, fqdn+"/ComputeNodeListResultIterator.NextWithContext") 1669 defer func() { 1670 sc := -1 1671 if iter.Response().Response.Response != nil { 1672 sc = iter.Response().Response.Response.StatusCode 1673 } 1674 tracing.EndSpan(ctx, sc, err) 1675 }() 1676 } 1677 iter.i++ 1678 if iter.i < len(iter.page.Values()) { 1679 return nil 1680 } 1681 err = iter.page.NextWithContext(ctx) 1682 if err != nil { 1683 iter.i-- 1684 return err 1685 } 1686 iter.i = 0 1687 return nil 1688} 1689 1690// Next advances to the next value. If there was an error making 1691// the request the iterator does not advance and the error is returned. 1692// Deprecated: Use NextWithContext() instead. 1693func (iter *ComputeNodeListResultIterator) Next() error { 1694 return iter.NextWithContext(context.Background()) 1695} 1696 1697// NotDone returns true if the enumeration should be started or is not yet complete. 1698func (iter ComputeNodeListResultIterator) NotDone() bool { 1699 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1700} 1701 1702// Response returns the raw server response from the last page request. 1703func (iter ComputeNodeListResultIterator) Response() ComputeNodeListResult { 1704 return iter.page.Response() 1705} 1706 1707// Value returns the current value or a zero-initialized value if the 1708// iterator has advanced beyond the end of the collection. 1709func (iter ComputeNodeListResultIterator) Value() ComputeNode { 1710 if !iter.page.NotDone() { 1711 return ComputeNode{} 1712 } 1713 return iter.page.Values()[iter.i] 1714} 1715 1716// Creates a new instance of the ComputeNodeListResultIterator type. 1717func NewComputeNodeListResultIterator(page ComputeNodeListResultPage) ComputeNodeListResultIterator { 1718 return ComputeNodeListResultIterator{page: page} 1719} 1720 1721// IsEmpty returns true if the ListResult contains no values. 1722func (cnlr ComputeNodeListResult) IsEmpty() bool { 1723 return cnlr.Value == nil || len(*cnlr.Value) == 0 1724} 1725 1726// hasNextLink returns true if the NextLink is not empty. 1727func (cnlr ComputeNodeListResult) hasNextLink() bool { 1728 return cnlr.OdataNextLink != nil && len(*cnlr.OdataNextLink) != 0 1729} 1730 1731// computeNodeListResultPreparer prepares a request to retrieve the next set of results. 1732// It returns nil if no more results exist. 1733func (cnlr ComputeNodeListResult) computeNodeListResultPreparer(ctx context.Context) (*http.Request, error) { 1734 if !cnlr.hasNextLink() { 1735 return nil, nil 1736 } 1737 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1738 autorest.AsJSON(), 1739 autorest.AsGet(), 1740 autorest.WithBaseURL(to.String(cnlr.OdataNextLink))) 1741} 1742 1743// ComputeNodeListResultPage contains a page of ComputeNode values. 1744type ComputeNodeListResultPage struct { 1745 fn func(context.Context, ComputeNodeListResult) (ComputeNodeListResult, error) 1746 cnlr ComputeNodeListResult 1747} 1748 1749// NextWithContext advances to the next page of values. If there was an error making 1750// the request the page does not advance and the error is returned. 1751func (page *ComputeNodeListResultPage) NextWithContext(ctx context.Context) (err error) { 1752 if tracing.IsEnabled() { 1753 ctx = tracing.StartSpan(ctx, fqdn+"/ComputeNodeListResultPage.NextWithContext") 1754 defer func() { 1755 sc := -1 1756 if page.Response().Response.Response != nil { 1757 sc = page.Response().Response.Response.StatusCode 1758 } 1759 tracing.EndSpan(ctx, sc, err) 1760 }() 1761 } 1762 for { 1763 next, err := page.fn(ctx, page.cnlr) 1764 if err != nil { 1765 return err 1766 } 1767 page.cnlr = next 1768 if !next.hasNextLink() || !next.IsEmpty() { 1769 break 1770 } 1771 } 1772 return nil 1773} 1774 1775// Next advances to the next page of values. If there was an error making 1776// the request the page does not advance and the error is returned. 1777// Deprecated: Use NextWithContext() instead. 1778func (page *ComputeNodeListResultPage) Next() error { 1779 return page.NextWithContext(context.Background()) 1780} 1781 1782// NotDone returns true if the page enumeration should be started or is not yet complete. 1783func (page ComputeNodeListResultPage) NotDone() bool { 1784 return !page.cnlr.IsEmpty() 1785} 1786 1787// Response returns the raw server response from the last page request. 1788func (page ComputeNodeListResultPage) Response() ComputeNodeListResult { 1789 return page.cnlr 1790} 1791 1792// Values returns the slice of values for the current page or nil if there are no values. 1793func (page ComputeNodeListResultPage) Values() []ComputeNode { 1794 if page.cnlr.IsEmpty() { 1795 return nil 1796 } 1797 return *page.cnlr.Value 1798} 1799 1800// Creates a new instance of the ComputeNodeListResultPage type. 1801func NewComputeNodeListResultPage(cur ComputeNodeListResult, getNextPage func(context.Context, ComputeNodeListResult) (ComputeNodeListResult, error)) ComputeNodeListResultPage { 1802 return ComputeNodeListResultPage{ 1803 fn: getNextPage, 1804 cnlr: cur, 1805 } 1806} 1807 1808// ComputeNodeUser ... 1809type ComputeNodeUser struct { 1810 Name *string `json:"name,omitempty"` 1811 // IsAdmin - The default value is false. 1812 IsAdmin *bool `json:"isAdmin,omitempty"` 1813 // ExpiryTime - If omitted, the default is 1 day from the current time. For Linux compute nodes, the expiryTime has a precision up to a day. 1814 ExpiryTime *date.Time `json:"expiryTime,omitempty"` 1815 // Password - The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property. 1816 Password *string `json:"password,omitempty"` 1817 // SSHPublicKey - The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 1818 SSHPublicKey *string `json:"sshPublicKey,omitempty"` 1819} 1820 1821// ContainerConfiguration ... 1822type ContainerConfiguration struct { 1823 Type *string `json:"type,omitempty"` 1824 // ContainerImageNames - This is the full image reference, as would be specified to "docker pull". An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative registry. 1825 ContainerImageNames *[]string `json:"containerImageNames,omitempty"` 1826 // ContainerRegistries - If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. 1827 ContainerRegistries *[]ContainerRegistry `json:"containerRegistries,omitempty"` 1828} 1829 1830// ContainerRegistry ... 1831type ContainerRegistry struct { 1832 // RegistryServer - If omitted, the default is "docker.io". 1833 RegistryServer *string `json:"registryServer,omitempty"` 1834 UserName *string `json:"username,omitempty"` 1835 Password *string `json:"password,omitempty"` 1836} 1837 1838// DataDisk ... 1839type DataDisk struct { 1840 // Lun - The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. 1841 Lun *int32 `json:"lun,omitempty"` 1842 // Caching - The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' 1843 Caching CachingType `json:"caching,omitempty"` 1844 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 1845 // StorageAccountType - If omitted, the default is "standard_lrs". Possible values include: 'StandardLRS', 'PremiumLRS' 1846 StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` 1847} 1848 1849// DeleteCertificateError ... 1850type DeleteCertificateError struct { 1851 Code *string `json:"code,omitempty"` 1852 Message *string `json:"message,omitempty"` 1853 // Values - This list includes details such as the active pools and nodes referencing this certificate. However, if a large number of resources reference the certificate, the list contains only about the first hundred. 1854 Values *[]NameValuePair `json:"values,omitempty"` 1855} 1856 1857// EnvironmentSetting ... 1858type EnvironmentSetting struct { 1859 Name *string `json:"name,omitempty"` 1860 Value *string `json:"value,omitempty"` 1861} 1862 1863// Error ... 1864type Error struct { 1865 Code *string `json:"code,omitempty"` 1866 Message *ErrorMessage `json:"message,omitempty"` 1867 Values *[]ErrorDetail `json:"values,omitempty"` 1868} 1869 1870// ErrorDetail ... 1871type ErrorDetail struct { 1872 Key *string `json:"key,omitempty"` 1873 Value *string `json:"value,omitempty"` 1874} 1875 1876// ErrorMessage ... 1877type ErrorMessage struct { 1878 Lang *string `json:"lang,omitempty"` 1879 Value *string `json:"value,omitempty"` 1880} 1881 1882// ExitCodeMapping ... 1883type ExitCodeMapping struct { 1884 Code *int32 `json:"code,omitempty"` 1885 ExitOptions *ExitOptions `json:"exitOptions,omitempty"` 1886} 1887 1888// ExitCodeRangeMapping ... 1889type ExitCodeRangeMapping struct { 1890 Start *int32 `json:"start,omitempty"` 1891 End *int32 `json:"end,omitempty"` 1892 ExitOptions *ExitOptions `json:"exitOptions,omitempty"` 1893} 1894 1895// ExitConditions ... 1896type ExitConditions struct { 1897 ExitCodes *[]ExitCodeMapping `json:"exitCodes,omitempty"` 1898 ExitCodeRanges *[]ExitCodeRangeMapping `json:"exitCodeRanges,omitempty"` 1899 PreProcessingError *ExitOptions `json:"preProcessingError,omitempty"` 1900 // FileUploadError - If the task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence. 1901 FileUploadError *ExitOptions `json:"fileUploadError,omitempty"` 1902 // Default - This value is used if the task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection. 1903 Default *ExitOptions `json:"default,omitempty"` 1904} 1905 1906// ExitOptions ... 1907type ExitOptions struct { 1908 // JobAction - The default is none for exit code 0 and terminate for all other exit conditions. If the job's onTaskFailed property is noaction, then specifying this property returns an error and the add task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'JobActionNone', 'JobActionDisable', 'JobActionTerminate' 1909 JobAction JobAction `json:"jobAction,omitempty"` 1910 // DependencyAction - The default is 'satisfy' for exit code 0, and 'block' for all other exit conditions. If the job's usesTaskDependencies property is set to false, then specifying the dependencyAction property returns an error and the add task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'Satisfy', 'Block' 1911 DependencyAction DependencyAction `json:"dependencyAction,omitempty"` 1912} 1913 1914// FileProperties ... 1915type FileProperties struct { 1916 // CreationTime - The creation time is not returned for files on Linux compute nodes. 1917 CreationTime *date.Time `json:"creationTime,omitempty"` 1918 LastModified *date.Time `json:"lastModified,omitempty"` 1919 ContentLength *int64 `json:"contentLength,omitempty"` 1920 ContentType *string `json:"contentType,omitempty"` 1921 // FileMode - The file mode is returned only for files on Linux compute nodes. 1922 FileMode *string `json:"fileMode,omitempty"` 1923} 1924 1925// ImageReference ... 1926type ImageReference struct { 1927 // Publisher - For example, Canonical or MicrosoftWindowsServer. 1928 Publisher *string `json:"publisher,omitempty"` 1929 // Offer - For example, UbuntuServer or WindowsServer. 1930 Offer *string `json:"offer,omitempty"` 1931 // Sku - For example, 14.04.0-LTS or 2012-R2-Datacenter. 1932 Sku *string `json:"sku,omitempty"` 1933 // Version - A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. 1934 Version *string `json:"version,omitempty"` 1935 // VirtualMachineImageID - This property is mutually exclusive with other ImageReference properties. The virtual machine image must be in the same region and subscription as the Azure Batch account. For more details, see https://docs.microsoft.com/azure/batch/batch-custom-images. 1936 VirtualMachineImageID *string `json:"virtualMachineImageId,omitempty"` 1937} 1938 1939// InboundEndpoint ... 1940type InboundEndpoint struct { 1941 Name *string `json:"name,omitempty"` 1942 // Protocol - Possible values include: 'TCP', 'UDP' 1943 Protocol InboundEndpointProtocol `json:"protocol,omitempty"` 1944 PublicIPAddress *string `json:"publicIPAddress,omitempty"` 1945 PublicFQDN *string `json:"publicFQDN,omitempty"` 1946 FrontendPort *int32 `json:"frontendPort,omitempty"` 1947 BackendPort *int32 `json:"backendPort,omitempty"` 1948} 1949 1950// InboundNATPool ... 1951type InboundNATPool struct { 1952 // Name - The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. 1953 Name *string `json:"name,omitempty"` 1954 // Protocol - Possible values include: 'TCP', 'UDP' 1955 Protocol InboundEndpointProtocol `json:"protocol,omitempty"` 1956 // BackendPort - This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. 1957 BackendPort *int32 `json:"backendPort,omitempty"` 1958 // FrontendPortRangeStart - Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. 1959 FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` 1960 // FrontendPortRangeEnd - Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. 1961 FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` 1962 // NetworkSecurityGroupRules - The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. 1963 NetworkSecurityGroupRules *[]NetworkSecurityGroupRule `json:"networkSecurityGroupRules,omitempty"` 1964} 1965 1966// JobAddParameter ... 1967type JobAddParameter struct { 1968 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case). 1969 ID *string `json:"id,omitempty"` 1970 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 1971 DisplayName *string `json:"displayName,omitempty"` 1972 // Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. 1973 Priority *int32 `json:"priority,omitempty"` 1974 // Constraints - The execution constraints for the job. 1975 Constraints *JobConstraints `json:"constraints,omitempty"` 1976 // JobManagerTask - If the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities - it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents. 1977 JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"` 1978 // JobPreparationTask - If a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node. 1979 JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"` 1980 // JobReleaseTask - A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. 1981 JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"` 1982 // CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value. 1983 CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"` 1984 PoolInfo *PoolInformation `json:"poolInfo,omitempty"` 1985 // OnAllTasksComplete - Note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'NoAction', 'TerminateJob' 1986 OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"` 1987 // OnTaskFailure - A task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction' 1988 OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"` 1989 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 1990 Metadata *[]MetadataItem `json:"metadata,omitempty"` 1991 UsesTaskDependencies *bool `json:"usesTaskDependencies,omitempty"` 1992 NetworkConfiguration *JobNetworkConfiguration `json:"networkConfiguration,omitempty"` 1993} 1994 1995// JobConstraints ... 1996type JobConstraints struct { 1997 // MaxWallClockTime - If the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run. 1998 MaxWallClockTime *string `json:"maxWallClockTime,omitempty"` 1999 // MaxTaskRetryCount - Note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries). 2000 MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"` 2001} 2002 2003// JobDisableParameter ... 2004type JobDisableParameter struct { 2005 // DisableTasks - Possible values include: 'DisableJobOptionRequeue', 'DisableJobOptionTerminate', 'DisableJobOptionWait' 2006 DisableTasks DisableJobOption `json:"disableTasks,omitempty"` 2007} 2008 2009// JobExecutionInformation ... 2010type JobExecutionInformation struct { 2011 // StartTime - This is the time at which the job was created. 2012 StartTime *date.Time `json:"startTime,omitempty"` 2013 // EndTime - This property is set only if the job is in the completed state. 2014 EndTime *date.Time `json:"endTime,omitempty"` 2015 // PoolID - This element contains the actual pool where the job is assigned. When you get job details from the service, they also contain a poolInfo element, which contains the pool configuration data from when the job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the job ran on an auto pool, and this property contains the ID of that auto pool. 2016 PoolID *string `json:"poolId,omitempty"` 2017 // SchedulingError - This property is not set if there was no error starting the job. 2018 SchedulingError *JobSchedulingError `json:"schedulingError,omitempty"` 2019 // TerminateReason - This property is set only if the job is in the completed state. If the Batch service terminates the job, it sets the reason as follows: JMComplete - the Job Manager task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the job reached its maxWallClockTime constraint. TerminateJobSchedule - the job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the job's onAllTasksComplete attribute is set to terminatejob, and all tasks in the job are complete. TaskFailed - the job's onTaskFailure attribute is set to performExitOptionsJobAction, and a task in the job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a job' operation. 2020 TerminateReason *string `json:"terminateReason,omitempty"` 2021} 2022 2023// JobManagerTask the Job Manager task is automatically started when the job is created. The Batch service 2024// tries to schedule the Job Manager task before any other tasks in the job. When shrinking a pool, the 2025// Batch service tries to preserve compute nodes where Job Manager tasks are running for as long as 2026// possible (that is, nodes running 'normal' tasks are removed before nodes running Job Manager tasks). 2027// When a Job Manager task fails and needs to be restarted, the system tries to schedule it at the highest 2028// priority. If there are no idle nodes available, the system may terminate one of the running tasks in the 2029// pool and return it to the queue in order to make room for the Job Manager task to restart. Note that a 2030// Job Manager task in one job does not have priority over tasks in other jobs. Across jobs, only job level 2031// priorities are observed. For example, if a Job Manager in a priority 0 job needs to be restarted, it 2032// will not displace tasks of a priority 1 job. Batch will retry tasks when a recovery operation is 2033// triggered on a compute node. Examples of recovery operations include (but are not limited to) when an 2034// unhealthy compute node is rebooted or a compute node disappeared due to host failure. Retries due to 2035// recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the 2036// maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all 2037// tasks should be idempotent. This means tasks need to tolerate being interrupted and restarted without 2038// causing any corruption or duplicate data. The best practice for long running tasks is to use some form 2039// of checkpointing. 2040type JobManagerTask struct { 2041 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. 2042 ID *string `json:"id,omitempty"` 2043 // DisplayName - It need not be unique and can contain any Unicode characters up to a maximum length of 1024. 2044 DisplayName *string `json:"displayName,omitempty"` 2045 // CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 2046 CommandLine *string `json:"commandLine,omitempty"` 2047 // ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 2048 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 2049 // ResourceFiles - Files listed under this element are located in the task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. 2050 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 2051 // OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed. 2052 OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` 2053 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 2054 Constraints *TaskConstraints `json:"constraints,omitempty"` 2055 // KillJobOnCompletion - If true, when the Job Manager task completes, the Batch service marks the job as complete. If any tasks are still running at this time (other than Job Release), those tasks are terminated. If false, the completion of the Job Manager task does not affect the job status. In this case, you should either use the onAllTasksComplete attribute to terminate the job, or have a client or user terminate the job explicitly. An example of this is if the Job Manager creates a set of tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control job lifetime, and using the Job Manager task only to create the tasks for the job (not to monitor progress), then it is important to set killJobOnCompletion to false. 2056 KillJobOnCompletion *bool `json:"killJobOnCompletion,omitempty"` 2057 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task. 2058 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 2059 // RunExclusive - If true, no other tasks will run on the same compute node for as long as the Job Manager is running. If false, other tasks can run simultaneously with the Job Manager on a compute node. The Job Manager task counts normally against the node's concurrent task limit, so this is only relevant if the node allows multiple concurrent tasks. The default value is true. 2060 RunExclusive *bool `json:"runExclusive,omitempty"` 2061 // ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working directory. Therefore, if a referenced package is already on the compute node, and is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If a referenced application package cannot be installed, for example because the package has been deleted or because download failed, the task fails. 2062 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 2063 // AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job. 2064 AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"` 2065 // AllowLowPriorityNode - The default value is true. 2066 AllowLowPriorityNode *bool `json:"allowLowPriorityNode,omitempty"` 2067} 2068 2069// JobNetworkConfiguration ... 2070type JobNetworkConfiguration struct { 2071 // SubnetID - This is only supported for jobs running on VirtualMachineConfiguration pools. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes which will run tasks from the job. For more details, see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. 2072 SubnetID *string `json:"subnetId,omitempty"` 2073} 2074 2075// JobPatchParameter ... 2076type JobPatchParameter struct { 2077 // Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the job is left unchanged. 2078 Priority *int32 `json:"priority,omitempty"` 2079 // OnAllTasksComplete - If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'NoAction', 'TerminateJob' 2080 OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"` 2081 // Constraints - If omitted, the existing execution constraints are left unchanged. 2082 Constraints *JobConstraints `json:"constraints,omitempty"` 2083 // PoolInfo - You may change the pool for a job only when the job is disabled. The Patch Job call will fail if you include the poolInfo element and the job is not disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. If omitted, the job continues to run on its current pool. 2084 PoolInfo *PoolInformation `json:"poolInfo,omitempty"` 2085 // Metadata - If omitted, the existing job metadata is left unchanged. 2086 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2087} 2088 2089// JobPreparationAndReleaseTaskExecutionInformation ... 2090type JobPreparationAndReleaseTaskExecutionInformation struct { 2091 PoolID *string `json:"poolId,omitempty"` 2092 NodeID *string `json:"nodeId,omitempty"` 2093 NodeURL *string `json:"nodeUrl,omitempty"` 2094 JobPreparationTaskExecutionInfo *JobPreparationTaskExecutionInformation `json:"jobPreparationTaskExecutionInfo,omitempty"` 2095 // JobReleaseTaskExecutionInfo - This property is set only if the Job Release task has run on the node. 2096 JobReleaseTaskExecutionInfo *JobReleaseTaskExecutionInformation `json:"jobReleaseTaskExecutionInfo,omitempty"` 2097} 2098 2099// JobPreparationTask you can use Job Preparation to prepare a compute node to run tasks for the job. 2100// Activities commonly performed in Job Preparation include: Downloading common resource files used by all 2101// the tasks in the job. The Job Preparation task can download these common resource files to the shared 2102// location on the compute node. (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the 2103// compute node so that all tasks of that job can communicate with it. If the Job Preparation task fails 2104// (that is, exhausts its retry count before exiting with exit code 0), Batch will not run tasks of this 2105// job on the compute node. The node remains ineligible to run tasks of this job until it is reimaged. The 2106// node remains active and can be used for other jobs. The Job Preparation task can run multiple times on 2107// the same compute node. Therefore, you should write the Job Preparation task to handle re-execution. If 2108// the compute node is rebooted, the Job Preparation task is run again on the node before scheduling any 2109// other task of the job, if rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did not 2110// previously complete. If the compute node is reimaged, the Job Preparation task is run again before 2111// scheduling any task of the job. Batch will retry tasks when a recovery operation is triggered on a 2112// compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute 2113// node is rebooted or a compute node disappeared due to host failure. Retries due to recovery operations 2114// are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 2115// 0, an internal retry due to a recovery operation may occur. Because of this, all tasks should be 2116// idempotent. This means tasks need to tolerate being interrupted and restarted without causing any 2117// corruption or duplicate data. The best practice for long running tasks is to use some form of 2118// checkpointing. 2119type JobPreparationTask struct { 2120 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other task in the job can have the same ID as the Job Preparation task. If you try to submit a task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). 2121 ID *string `json:"id,omitempty"` 2122 // CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 2123 CommandLine *string `json:"commandLine,omitempty"` 2124 // ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 2125 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 2126 // ResourceFiles - Files listed under this element are located in the task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. 2127 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 2128 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 2129 Constraints *TaskConstraints `json:"constraints,omitempty"` 2130 // WaitForSuccess - If true and the Job Preparation task fails on a compute node, the Batch service retries the Job Preparation task up to its maximum retry count (as specified in the constraints element). If the task has still not completed successfully after all retries, then the Batch service will not schedule tasks of the job to the compute node. The compute node remains active and eligible to run tasks of other jobs. If false, the Batch service will not wait for the Job Preparation task to complete. In this case, other tasks of the job can start executing on the compute node while the Job Preparation task is still running; and even if the Job Preparation task fails, new tasks will continue to be scheduled on the node. The default value is true. 2131 WaitForSuccess *bool `json:"waitForSuccess,omitempty"` 2132 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task on Windows nodes, or a non-administrative user unique to the pool on Linux nodes. 2133 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 2134 // RerunOnNodeRebootAfterSuccess - The Job Preparation task is always rerun if a compute node is reimaged, or if the Job Preparation task did not complete (e.g. because the reboot occurred while the task was running). Therefore, you should always write a Job Preparation task to be idempotent and to behave correctly if run multiple times. The default value is true. 2135 RerunOnNodeRebootAfterSuccess *bool `json:"rerunOnNodeRebootAfterSuccess,omitempty"` 2136} 2137 2138// JobPreparationTaskExecutionInformation ... 2139type JobPreparationTaskExecutionInformation struct { 2140 // StartTime - If the task has been restarted or retried, this is the most recent time at which the task started running. 2141 StartTime *date.Time `json:"startTime,omitempty"` 2142 // EndTime - This property is set only if the task is in the Completed state. 2143 EndTime *date.Time `json:"endTime,omitempty"` 2144 // State - Possible values include: 'JobPreparationTaskStateRunning', 'JobPreparationTaskStateCompleted' 2145 State JobPreparationTaskState `json:"state,omitempty"` 2146 TaskRootDirectory *string `json:"taskRootDirectory,omitempty"` 2147 TaskRootDirectoryURL *string `json:"taskRootDirectoryUrl,omitempty"` 2148 // ExitCode - This parameter is returned only if the task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the compute node operating system, such as when a process is forcibly terminated. 2149 ExitCode *int32 `json:"exitCode,omitempty"` 2150 // ContainerInfo - This property is set only if the task runs in a container context. 2151 ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"` 2152 // FailureInfo - This property is set only if the task is in the completed state and encountered a failure. 2153 FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"` 2154 // RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints. 2155 RetryCount *int32 `json:"retryCount,omitempty"` 2156 // LastRetryTime - This property is set only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. 2157 LastRetryTime *date.Time `json:"lastRetryTime,omitempty"` 2158 // Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure' 2159 Result TaskExecutionResult `json:"result,omitempty"` 2160} 2161 2162// JobReleaseTask the Job Release task runs when the job ends, because of one of the following: The user 2163// calls the Terminate Job API, or the Delete Job API while the job is still active, the job's maximum wall 2164// clock time constraint is reached, and the job is still active, or the job's Job Manager task completed, 2165// and the job is configured to terminate when the Job Manager completes. The Job Release task runs on each 2166// compute node where tasks of the job have run and the Job Preparation task ran and completed. If you 2167// reimage a compute node after it has run the Job Preparation task, and the job ends without any further 2168// tasks of the job running on that compute node (and hence the Job Preparation task does not re-run), then 2169// the Job Release task does not run on that node. If a compute node reboots while the Job Release task is 2170// still running, the Job Release task runs again when the compute node starts up. The job is not marked as 2171// complete until all Job Release tasks have completed. The Job Release task runs in the background. It 2172// does not occupy a scheduling slot; that is, it does not count towards the maxTasksPerNode limit 2173// specified on the pool. 2174type JobReleaseTask struct { 2175 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other task in the job can have the same ID as the Job Release task. If you try to submit a task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). 2176 ID *string `json:"id,omitempty"` 2177 // CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 2178 CommandLine *string `json:"commandLine,omitempty"` 2179 // ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 2180 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 2181 // ResourceFiles - Files listed under this element are located in the task's working directory. 2182 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 2183 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 2184 MaxWallClockTime *string `json:"maxWallClockTime,omitempty"` 2185 // RetentionTime - The default is 7 days, i.e. the task directory will be retained for 7 days unless the compute node is removed or the job is deleted. 2186 RetentionTime *string `json:"retentionTime,omitempty"` 2187 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task. 2188 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 2189} 2190 2191// JobReleaseTaskExecutionInformation ... 2192type JobReleaseTaskExecutionInformation struct { 2193 // StartTime - If the task has been restarted or retried, this is the most recent time at which the task started running. 2194 StartTime *date.Time `json:"startTime,omitempty"` 2195 // EndTime - This property is set only if the task is in the Completed state. 2196 EndTime *date.Time `json:"endTime,omitempty"` 2197 // State - Possible values include: 'JobReleaseTaskStateRunning', 'JobReleaseTaskStateCompleted' 2198 State JobReleaseTaskState `json:"state,omitempty"` 2199 TaskRootDirectory *string `json:"taskRootDirectory,omitempty"` 2200 TaskRootDirectoryURL *string `json:"taskRootDirectoryUrl,omitempty"` 2201 // ExitCode - This parameter is returned only if the task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the compute node operating system, such as when a process is forcibly terminated. 2202 ExitCode *int32 `json:"exitCode,omitempty"` 2203 // ContainerInfo - This property is set only if the task runs in a container context. 2204 ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"` 2205 // FailureInfo - This property is set only if the task is in the completed state and encountered a failure. 2206 FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"` 2207 // Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure' 2208 Result TaskExecutionResult `json:"result,omitempty"` 2209} 2210 2211// JobScheduleAddParameter ... 2212type JobScheduleAddParameter struct { 2213 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case). 2214 ID *string `json:"id,omitempty"` 2215 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 2216 DisplayName *string `json:"displayName,omitempty"` 2217 Schedule *Schedule `json:"schedule,omitempty"` 2218 JobSpecification *JobSpecification `json:"jobSpecification,omitempty"` 2219 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 2220 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2221} 2222 2223// JobScheduleExecutionInformation ... 2224type JobScheduleExecutionInformation struct { 2225 // NextRunTime - This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no job will be created at nextRunTime unless the job is enabled before then. 2226 NextRunTime *date.Time `json:"nextRunTime,omitempty"` 2227 // RecentJob - This property is present only if the at least one job has run under the schedule. 2228 RecentJob *RecentJob `json:"recentJob,omitempty"` 2229 // EndTime - This property is set only if the job schedule is in the completed state. 2230 EndTime *date.Time `json:"endTime,omitempty"` 2231} 2232 2233// JobSchedulePatchParameter ... 2234type JobSchedulePatchParameter struct { 2235 // Schedule - If you do not specify this element, the existing schedule is left unchanged. 2236 Schedule *Schedule `json:"schedule,omitempty"` 2237 // JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. 2238 JobSpecification *JobSpecification `json:"jobSpecification,omitempty"` 2239 // Metadata - If you do not specify this element, existing metadata is left unchanged. 2240 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2241} 2242 2243// JobScheduleStatistics ... 2244type JobScheduleStatistics struct { 2245 URL *string `json:"url,omitempty"` 2246 StartTime *date.Time `json:"startTime,omitempty"` 2247 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 2248 UserCPUTime *string `json:"userCPUTime,omitempty"` 2249 KernelCPUTime *string `json:"kernelCPUTime,omitempty"` 2250 // WallClockTime - The wall clock time is the elapsed time from when the task started running on a compute node to when it finished (or to the last time the statistics were updated, if the task had not finished by then). If a task was retried, this includes the wall clock time of all the task retries. 2251 WallClockTime *string `json:"wallClockTime,omitempty"` 2252 ReadIOps *int64 `json:"readIOps,omitempty"` 2253 WriteIOps *int64 `json:"writeIOps,omitempty"` 2254 ReadIOGiB *float64 `json:"readIOGiB,omitempty"` 2255 WriteIOGiB *float64 `json:"writeIOGiB,omitempty"` 2256 NumSucceededTasks *int64 `json:"numSucceededTasks,omitempty"` 2257 NumFailedTasks *int64 `json:"numFailedTasks,omitempty"` 2258 NumTaskRetries *int64 `json:"numTaskRetries,omitempty"` 2259 // WaitTime - This value is only reported in the account lifetime statistics; it is not included in the job statistics. 2260 WaitTime *string `json:"waitTime,omitempty"` 2261} 2262 2263// JobScheduleUpdateParameter ... 2264type JobScheduleUpdateParameter struct { 2265 // Schedule - If you do not specify this element, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately. 2266 Schedule *Schedule `json:"schedule,omitempty"` 2267 // JobSpecification - Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. 2268 JobSpecification *JobSpecification `json:"jobSpecification,omitempty"` 2269 // Metadata - If you do not specify this element, it takes the default value of an empty list; in effect, any existing metadata is deleted. 2270 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2271} 2272 2273// JobSchedulingError ... 2274type JobSchedulingError struct { 2275 // Category - Possible values include: 'UserError', 'ServerError' 2276 Category ErrorCategory `json:"category,omitempty"` 2277 Code *string `json:"code,omitempty"` 2278 Message *string `json:"message,omitempty"` 2279 Details *[]NameValuePair `json:"details,omitempty"` 2280} 2281 2282// JobSpecification ... 2283type JobSpecification struct { 2284 // Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API. 2285 Priority *int32 `json:"priority,omitempty"` 2286 // DisplayName - The name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 2287 DisplayName *string `json:"displayName,omitempty"` 2288 UsesTaskDependencies *bool `json:"usesTaskDependencies,omitempty"` 2289 // OnAllTasksComplete - Note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'NoAction', 'TerminateJob' 2290 OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"` 2291 // OnTaskFailure - The default is noaction. Possible values include: 'OnTaskFailureNoAction', 'OnTaskFailurePerformExitOptionsJobAction' 2292 OnTaskFailure OnTaskFailure `json:"onTaskFailure,omitempty"` 2293 NetworkConfiguration *JobNetworkConfiguration `json:"networkConfiguration,omitempty"` 2294 Constraints *JobConstraints `json:"constraints,omitempty"` 2295 // JobManagerTask - If the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. 2296 JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"` 2297 // JobPreparationTask - If a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node. 2298 JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"` 2299 // JobReleaseTask - The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. 2300 JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"` 2301 // CommonEnvironmentSettings - Individual tasks can override an environment setting specified here by specifying the same setting name with a different value. 2302 CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"` 2303 PoolInfo *PoolInformation `json:"poolInfo,omitempty"` 2304 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 2305 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2306} 2307 2308// JobStatistics ... 2309type JobStatistics struct { 2310 autorest.Response `json:"-"` 2311 URL *string `json:"url,omitempty"` 2312 StartTime *date.Time `json:"startTime,omitempty"` 2313 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 2314 UserCPUTime *string `json:"userCPUTime,omitempty"` 2315 KernelCPUTime *string `json:"kernelCPUTime,omitempty"` 2316 // WallClockTime - The wall clock time is the elapsed time from when the task started running on a compute node to when it finished (or to the last time the statistics were updated, if the task had not finished by then). If a task was retried, this includes the wall clock time of all the task retries. 2317 WallClockTime *string `json:"wallClockTime,omitempty"` 2318 ReadIOps *int64 `json:"readIOps,omitempty"` 2319 WriteIOps *int64 `json:"writeIOps,omitempty"` 2320 ReadIOGiB *float64 `json:"readIOGiB,omitempty"` 2321 WriteIOGiB *float64 `json:"writeIOGiB,omitempty"` 2322 // NumSucceededTasks - A task completes successfully if it returns exit code 0. 2323 NumSucceededTasks *int64 `json:"numSucceededTasks,omitempty"` 2324 // NumFailedTasks - A task fails if it exhausts its maximum retry count without returning exit code 0. 2325 NumFailedTasks *int64 `json:"numFailedTasks,omitempty"` 2326 NumTaskRetries *int64 `json:"numTaskRetries,omitempty"` 2327 // WaitTime - The wait time for a task is defined as the elapsed time between the creation of the task and the start of task execution. (If the task is retried due to failures, the wait time is the time to the most recent task execution.) This value is only reported in the account lifetime statistics; it is not included in the job statistics. 2328 WaitTime *string `json:"waitTime,omitempty"` 2329} 2330 2331// JobTerminateParameter ... 2332type JobTerminateParameter struct { 2333 TerminateReason *string `json:"terminateReason,omitempty"` 2334} 2335 2336// JobUpdateParameter ... 2337type JobUpdateParameter struct { 2338 // Priority - Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, it is set to the default value 0. 2339 Priority *int32 `json:"priority,omitempty"` 2340 // Constraints - If omitted, the constraints are cleared. 2341 Constraints *JobConstraints `json:"constraints,omitempty"` 2342 // PoolInfo - You may change the pool for a job only when the job is disabled. The Update Job call will fail if you include the poolInfo element and the job is not disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. 2343 PoolInfo *PoolInformation `json:"poolInfo,omitempty"` 2344 // Metadata - If omitted, it takes the default value of an empty list; in effect, any existing metadata is deleted. 2345 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2346 // OnAllTasksComplete - If omitted, the completion behavior is set to noaction. If the current value is terminatejob, this is an error because a job's completion behavior may not be changed from terminatejob to noaction. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic job termination, you cannot turn it off again. If you try to do this, the request fails and Batch returns status code 400 (Bad Request) and an 'invalid property value' error response. If you do not specify this element in a PUT request, it is equivalent to passing noaction. This is an error if the current value is terminatejob. Possible values include: 'NoAction', 'TerminateJob' 2347 OnAllTasksComplete OnAllTasksComplete `json:"onAllTasksComplete,omitempty"` 2348} 2349 2350// LinuxUserConfiguration ... 2351type LinuxUserConfiguration struct { 2352 // UID - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. 2353 UID *int32 `json:"uid,omitempty"` 2354 // Gid - The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. 2355 Gid *int32 `json:"gid,omitempty"` 2356 // SSHPrivateKey - The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done). 2357 SSHPrivateKey *string `json:"sshPrivateKey,omitempty"` 2358} 2359 2360// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of 2361// user code. 2362type MetadataItem struct { 2363 Name *string `json:"name,omitempty"` 2364 Value *string `json:"value,omitempty"` 2365} 2366 2367// MultiInstanceSettings multi-instance tasks are commonly used to support MPI tasks. In the MPI case, if 2368// any of the subtasks fail (for example due to exiting with a non-zero exit code) the entire 2369// multi-instance task fails. The multi-instance task is then terminated and retried, up to its retry 2370// limit. 2371type MultiInstanceSettings struct { 2372 // NumberOfInstances - If omitted, the default is 1. 2373 NumberOfInstances *int32 `json:"numberOfInstances,omitempty"` 2374 // CoordinationCommandLine - A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. 2375 CoordinationCommandLine *string `json:"coordinationCommandLine,omitempty"` 2376 // CommonResourceFiles - The difference between common resource files and task resource files is that common resource files are downloaded for all subtasks including the primary, whereas task resource files are downloaded only for the primary. Also note that these resource files are not downloaded to the task working directory, but instead are downloaded to the task root directory (one directory above the working directory). There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. 2377 CommonResourceFiles *[]ResourceFile `json:"commonResourceFiles,omitempty"` 2378} 2379 2380// NameValuePair ... 2381type NameValuePair struct { 2382 Name *string `json:"name,omitempty"` 2383 Value *string `json:"value,omitempty"` 2384} 2385 2386// NetworkConfiguration the network configuration for a pool. 2387type NetworkConfiguration struct { 2388 // SubnetID - This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. For pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for pools created with cloudServiceConfiguration both ARM and classic virtual networks are supported. For more details, see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration 2389 SubnetID *string `json:"subnetId,omitempty"` 2390 // DynamicVNetAssignmentScope - Possible values include: 'DynamicVNetAssignmentScopeNone', 'DynamicVNetAssignmentScopeJob' 2391 DynamicVNetAssignmentScope DynamicVNetAssignmentScope `json:"dynamicVNetAssignmentScope,omitempty"` 2392 // EndpointConfiguration - Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property. 2393 EndpointConfiguration *PoolEndpointConfiguration `json:"endpointConfiguration,omitempty"` 2394} 2395 2396// NetworkSecurityGroupRule ... 2397type NetworkSecurityGroupRule struct { 2398 // Priority - Priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400. 2399 Priority *int32 `json:"priority,omitempty"` 2400 // Access - Possible values include: 'Allow', 'Deny' 2401 Access NetworkSecurityGroupRuleAccess `json:"access,omitempty"` 2402 // SourceAddressPrefix - Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. 2403 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 2404} 2405 2406// NodeAgentInformation the Batch node agent is a program that runs on each node in the pool and provides 2407// Batch capability on the compute node. 2408type NodeAgentInformation struct { 2409 // Version - This version number can be checked against the node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. 2410 Version *string `json:"version,omitempty"` 2411 // LastUpdateTime - This is the most recent time that the node agent was updated to a new version. 2412 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 2413} 2414 2415// NodeAgentSku the Batch node agent is a program that runs on each node in the pool, and provides the 2416// command-and-control interface between the node and the Batch service. There are different 2417// implementations of the node agent, known as SKUs, for different operating systems. 2418type NodeAgentSku struct { 2419 ID *string `json:"id,omitempty"` 2420 // VerifiedImageReferences - This collection is not exhaustive (the node agent may be compatible with other images). 2421 VerifiedImageReferences *[]ImageReference `json:"verifiedImageReferences,omitempty"` 2422 // OsType - Possible values include: 'Linux', 'Windows' 2423 OsType OSType `json:"osType,omitempty"` 2424} 2425 2426// NodeCounts ... 2427type NodeCounts struct { 2428 Creating *int32 `json:"creating,omitempty"` 2429 Idle *int32 `json:"idle,omitempty"` 2430 Offline *int32 `json:"offline,omitempty"` 2431 Preempted *int32 `json:"preempted,omitempty"` 2432 Rebooting *int32 `json:"rebooting,omitempty"` 2433 Reimaging *int32 `json:"reimaging,omitempty"` 2434 Running *int32 `json:"running,omitempty"` 2435 Starting *int32 `json:"starting,omitempty"` 2436 StartTaskFailed *int32 `json:"startTaskFailed,omitempty"` 2437 LeavingPool *int32 `json:"leavingPool,omitempty"` 2438 Unknown *int32 `json:"unknown,omitempty"` 2439 Unusable *int32 `json:"unusable,omitempty"` 2440 WaitingForStartTask *int32 `json:"waitingForStartTask,omitempty"` 2441 Total *int32 `json:"total,omitempty"` 2442} 2443 2444// NodeDisableSchedulingParameter ... 2445type NodeDisableSchedulingParameter struct { 2446 // NodeDisableSchedulingOption - The default value is requeue. Possible values include: 'DisableComputeNodeSchedulingOptionRequeue', 'DisableComputeNodeSchedulingOptionTerminate', 'DisableComputeNodeSchedulingOptionTaskCompletion' 2447 NodeDisableSchedulingOption DisableComputeNodeSchedulingOption `json:"nodeDisableSchedulingOption,omitempty"` 2448} 2449 2450// NodeFile ... 2451type NodeFile struct { 2452 Name *string `json:"name,omitempty"` 2453 URL *string `json:"url,omitempty"` 2454 IsDirectory *bool `json:"isDirectory,omitempty"` 2455 Properties *FileProperties `json:"properties,omitempty"` 2456} 2457 2458// NodeFileListResult ... 2459type NodeFileListResult struct { 2460 autorest.Response `json:"-"` 2461 Value *[]NodeFile `json:"value,omitempty"` 2462 OdataNextLink *string `json:"odata.nextLink,omitempty"` 2463} 2464 2465// NodeFileListResultIterator provides access to a complete listing of NodeFile values. 2466type NodeFileListResultIterator struct { 2467 i int 2468 page NodeFileListResultPage 2469} 2470 2471// NextWithContext advances to the next value. If there was an error making 2472// the request the iterator does not advance and the error is returned. 2473func (iter *NodeFileListResultIterator) NextWithContext(ctx context.Context) (err error) { 2474 if tracing.IsEnabled() { 2475 ctx = tracing.StartSpan(ctx, fqdn+"/NodeFileListResultIterator.NextWithContext") 2476 defer func() { 2477 sc := -1 2478 if iter.Response().Response.Response != nil { 2479 sc = iter.Response().Response.Response.StatusCode 2480 } 2481 tracing.EndSpan(ctx, sc, err) 2482 }() 2483 } 2484 iter.i++ 2485 if iter.i < len(iter.page.Values()) { 2486 return nil 2487 } 2488 err = iter.page.NextWithContext(ctx) 2489 if err != nil { 2490 iter.i-- 2491 return err 2492 } 2493 iter.i = 0 2494 return nil 2495} 2496 2497// Next advances to the next value. If there was an error making 2498// the request the iterator does not advance and the error is returned. 2499// Deprecated: Use NextWithContext() instead. 2500func (iter *NodeFileListResultIterator) Next() error { 2501 return iter.NextWithContext(context.Background()) 2502} 2503 2504// NotDone returns true if the enumeration should be started or is not yet complete. 2505func (iter NodeFileListResultIterator) NotDone() bool { 2506 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2507} 2508 2509// Response returns the raw server response from the last page request. 2510func (iter NodeFileListResultIterator) Response() NodeFileListResult { 2511 return iter.page.Response() 2512} 2513 2514// Value returns the current value or a zero-initialized value if the 2515// iterator has advanced beyond the end of the collection. 2516func (iter NodeFileListResultIterator) Value() NodeFile { 2517 if !iter.page.NotDone() { 2518 return NodeFile{} 2519 } 2520 return iter.page.Values()[iter.i] 2521} 2522 2523// Creates a new instance of the NodeFileListResultIterator type. 2524func NewNodeFileListResultIterator(page NodeFileListResultPage) NodeFileListResultIterator { 2525 return NodeFileListResultIterator{page: page} 2526} 2527 2528// IsEmpty returns true if the ListResult contains no values. 2529func (nflr NodeFileListResult) IsEmpty() bool { 2530 return nflr.Value == nil || len(*nflr.Value) == 0 2531} 2532 2533// hasNextLink returns true if the NextLink is not empty. 2534func (nflr NodeFileListResult) hasNextLink() bool { 2535 return nflr.OdataNextLink != nil && len(*nflr.OdataNextLink) != 0 2536} 2537 2538// nodeFileListResultPreparer prepares a request to retrieve the next set of results. 2539// It returns nil if no more results exist. 2540func (nflr NodeFileListResult) nodeFileListResultPreparer(ctx context.Context) (*http.Request, error) { 2541 if !nflr.hasNextLink() { 2542 return nil, nil 2543 } 2544 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2545 autorest.AsJSON(), 2546 autorest.AsGet(), 2547 autorest.WithBaseURL(to.String(nflr.OdataNextLink))) 2548} 2549 2550// NodeFileListResultPage contains a page of NodeFile values. 2551type NodeFileListResultPage struct { 2552 fn func(context.Context, NodeFileListResult) (NodeFileListResult, error) 2553 nflr NodeFileListResult 2554} 2555 2556// NextWithContext advances to the next page of values. If there was an error making 2557// the request the page does not advance and the error is returned. 2558func (page *NodeFileListResultPage) NextWithContext(ctx context.Context) (err error) { 2559 if tracing.IsEnabled() { 2560 ctx = tracing.StartSpan(ctx, fqdn+"/NodeFileListResultPage.NextWithContext") 2561 defer func() { 2562 sc := -1 2563 if page.Response().Response.Response != nil { 2564 sc = page.Response().Response.Response.StatusCode 2565 } 2566 tracing.EndSpan(ctx, sc, err) 2567 }() 2568 } 2569 for { 2570 next, err := page.fn(ctx, page.nflr) 2571 if err != nil { 2572 return err 2573 } 2574 page.nflr = next 2575 if !next.hasNextLink() || !next.IsEmpty() { 2576 break 2577 } 2578 } 2579 return nil 2580} 2581 2582// Next advances to the next page of values. If there was an error making 2583// the request the page does not advance and the error is returned. 2584// Deprecated: Use NextWithContext() instead. 2585func (page *NodeFileListResultPage) Next() error { 2586 return page.NextWithContext(context.Background()) 2587} 2588 2589// NotDone returns true if the page enumeration should be started or is not yet complete. 2590func (page NodeFileListResultPage) NotDone() bool { 2591 return !page.nflr.IsEmpty() 2592} 2593 2594// Response returns the raw server response from the last page request. 2595func (page NodeFileListResultPage) Response() NodeFileListResult { 2596 return page.nflr 2597} 2598 2599// Values returns the slice of values for the current page or nil if there are no values. 2600func (page NodeFileListResultPage) Values() []NodeFile { 2601 if page.nflr.IsEmpty() { 2602 return nil 2603 } 2604 return *page.nflr.Value 2605} 2606 2607// Creates a new instance of the NodeFileListResultPage type. 2608func NewNodeFileListResultPage(cur NodeFileListResult, getNextPage func(context.Context, NodeFileListResult) (NodeFileListResult, error)) NodeFileListResultPage { 2609 return NodeFileListResultPage{ 2610 fn: getNextPage, 2611 nflr: cur, 2612 } 2613} 2614 2615// NodeRebootParameter ... 2616type NodeRebootParameter struct { 2617 // NodeRebootOption - The default value is requeue. Possible values include: 'ComputeNodeRebootOptionRequeue', 'ComputeNodeRebootOptionTerminate', 'ComputeNodeRebootOptionTaskCompletion', 'ComputeNodeRebootOptionRetainedData' 2618 NodeRebootOption ComputeNodeRebootOption `json:"nodeRebootOption,omitempty"` 2619} 2620 2621// NodeReimageParameter ... 2622type NodeReimageParameter struct { 2623 // NodeReimageOption - The default value is requeue. Possible values include: 'ComputeNodeReimageOptionRequeue', 'ComputeNodeReimageOptionTerminate', 'ComputeNodeReimageOptionTaskCompletion', 'ComputeNodeReimageOptionRetainedData' 2624 NodeReimageOption ComputeNodeReimageOption `json:"nodeReimageOption,omitempty"` 2625} 2626 2627// NodeRemoveParameter ... 2628type NodeRemoveParameter struct { 2629 NodeList *[]string `json:"nodeList,omitempty"` 2630 // ResizeTimeout - The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 2631 ResizeTimeout *string `json:"resizeTimeout,omitempty"` 2632 // NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' 2633 NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"` 2634} 2635 2636// NodeUpdateUserParameter ... 2637type NodeUpdateUserParameter struct { 2638 // Password - The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. 2639 Password *string `json:"password,omitempty"` 2640 // ExpiryTime - If omitted, the default is 1 day from the current time. For Linux compute nodes, the expiryTime has a precision up to a day. 2641 ExpiryTime *date.Time `json:"expiryTime,omitempty"` 2642 // SSHPublicKey - The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. 2643 SSHPublicKey *string `json:"sshPublicKey,omitempty"` 2644} 2645 2646// OutputFile ... 2647type OutputFile struct { 2648 // FilePattern - Both relative and absolute paths are supported. Relative paths are relative to the task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. 2649 FilePattern *string `json:"filePattern,omitempty"` 2650 Destination *OutputFileDestination `json:"destination,omitempty"` 2651 UploadOptions *OutputFileUploadOptions `json:"uploadOptions,omitempty"` 2652} 2653 2654// OutputFileBlobContainerDestination ... 2655type OutputFileBlobContainerDestination struct { 2656 // Path - If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. 2657 Path *string `json:"path,omitempty"` 2658 // ContainerURL - The URL must include a Shared Access Signature (SAS) granting write permissions to the container. 2659 ContainerURL *string `json:"containerUrl,omitempty"` 2660} 2661 2662// OutputFileDestination ... 2663type OutputFileDestination struct { 2664 Container *OutputFileBlobContainerDestination `json:"container,omitempty"` 2665} 2666 2667// OutputFileUploadOptions ... 2668type OutputFileUploadOptions struct { 2669 // UploadCondition - The default is taskcompletion. Possible values include: 'OutputFileUploadConditionTaskSuccess', 'OutputFileUploadConditionTaskFailure', 'OutputFileUploadConditionTaskCompletion' 2670 UploadCondition OutputFileUploadCondition `json:"uploadCondition,omitempty"` 2671} 2672 2673// PoolAddParameter ... 2674type PoolAddParameter struct { 2675 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two pool IDs within an account that differ only by case). 2676 ID *string `json:"id,omitempty"` 2677 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 2678 DisplayName *string `json:"displayName,omitempty"` 2679 // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). 2680 VMSize *string `json:"vmSize,omitempty"` 2681 // CloudServiceConfiguration - This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'. 2682 CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"` 2683 // VirtualMachineConfiguration - This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. 2684 VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"` 2685 // ResizeTimeout - This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 2686 ResizeTimeout *string `json:"resizeTimeout,omitempty"` 2687 // TargetDedicatedNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. 2688 TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"` 2689 // TargetLowPriorityNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. 2690 TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` 2691 // EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the pool automatically resizes according to the formula. The default value is false. 2692 EnableAutoScale *bool `json:"enableAutoScale,omitempty"` 2693 // AutoScaleFormula - This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale compute nodes in an Azure Batch pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). 2694 AutoScaleFormula *string `json:"autoScaleFormula,omitempty"` 2695 // AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 2696 AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"` 2697 // EnableInterNodeCommunication - Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false. 2698 EnableInterNodeCommunication *bool `json:"enableInterNodeCommunication,omitempty"` 2699 NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` 2700 // StartTask - The task runs when the node is added to the pool or when the node is restarted. 2701 StartTask *StartTask `json:"startTask,omitempty"` 2702 // CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 2703 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 2704 // ApplicationPackageReferences - Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. 2705 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 2706 // ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. 2707 ApplicationLicenses *[]string `json:"applicationLicenses,omitempty"` 2708 // MaxTasksPerNode - The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. 2709 MaxTasksPerNode *int32 `json:"maxTasksPerNode,omitempty"` 2710 // TaskSchedulingPolicy - If not specified, the default is spread. 2711 TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"` 2712 UserAccounts *[]UserAccount `json:"userAccounts,omitempty"` 2713 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 2714 Metadata *[]MetadataItem `json:"metadata,omitempty"` 2715} 2716 2717// PoolEnableAutoScaleParameter ... 2718type PoolEnableAutoScaleParameter struct { 2719 // AutoScaleFormula - The formula is checked for validity before it is applied to the pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). 2720 AutoScaleFormula *string `json:"autoScaleFormula,omitempty"` 2721 // AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. 2722 AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"` 2723} 2724 2725// PoolEndpointConfiguration ... 2726type PoolEndpointConfiguration struct { 2727 // InboundNATPools - The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400. 2728 InboundNATPools *[]InboundNATPool `json:"inboundNATPools,omitempty"` 2729} 2730 2731// PoolEvaluateAutoScaleParameter ... 2732type PoolEvaluateAutoScaleParameter struct { 2733 // AutoScaleFormula - The formula is validated and its results calculated, but it is not applied to the pool. To apply the formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). 2734 AutoScaleFormula *string `json:"autoScaleFormula,omitempty"` 2735} 2736 2737// PoolInformation ... 2738type PoolInformation struct { 2739 // PoolID - You must ensure that the pool referenced by this property exists. If the pool does not exist at the time the Batch service tries to schedule a job, no tasks for the job will run until you create a pool with that id. Note that the Batch service will not reject the job request; it will simply not run tasks until the pool exists. You must specify either the pool ID or the auto pool specification, but not both. 2740 PoolID *string `json:"poolId,omitempty"` 2741 // AutoPoolSpecification - If auto pool creation fails, the Batch service moves the job to a completed state, and the pool creation error is set in the job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto pool. Any user actions that affect the lifetime of the auto pool while the job is active will result in unexpected behavior. You must specify either the pool ID or the auto pool specification, but not both. 2742 AutoPoolSpecification *AutoPoolSpecification `json:"autoPoolSpecification,omitempty"` 2743} 2744 2745// PoolListUsageMetricsResult ... 2746type PoolListUsageMetricsResult struct { 2747 autorest.Response `json:"-"` 2748 Value *[]PoolUsageMetrics `json:"value,omitempty"` 2749 OdataNextLink *string `json:"odata.nextLink,omitempty"` 2750} 2751 2752// PoolListUsageMetricsResultIterator provides access to a complete listing of PoolUsageMetrics values. 2753type PoolListUsageMetricsResultIterator struct { 2754 i int 2755 page PoolListUsageMetricsResultPage 2756} 2757 2758// NextWithContext advances to the next value. If there was an error making 2759// the request the iterator does not advance and the error is returned. 2760func (iter *PoolListUsageMetricsResultIterator) NextWithContext(ctx context.Context) (err error) { 2761 if tracing.IsEnabled() { 2762 ctx = tracing.StartSpan(ctx, fqdn+"/PoolListUsageMetricsResultIterator.NextWithContext") 2763 defer func() { 2764 sc := -1 2765 if iter.Response().Response.Response != nil { 2766 sc = iter.Response().Response.Response.StatusCode 2767 } 2768 tracing.EndSpan(ctx, sc, err) 2769 }() 2770 } 2771 iter.i++ 2772 if iter.i < len(iter.page.Values()) { 2773 return nil 2774 } 2775 err = iter.page.NextWithContext(ctx) 2776 if err != nil { 2777 iter.i-- 2778 return err 2779 } 2780 iter.i = 0 2781 return nil 2782} 2783 2784// Next advances to the next value. If there was an error making 2785// the request the iterator does not advance and the error is returned. 2786// Deprecated: Use NextWithContext() instead. 2787func (iter *PoolListUsageMetricsResultIterator) Next() error { 2788 return iter.NextWithContext(context.Background()) 2789} 2790 2791// NotDone returns true if the enumeration should be started or is not yet complete. 2792func (iter PoolListUsageMetricsResultIterator) NotDone() bool { 2793 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2794} 2795 2796// Response returns the raw server response from the last page request. 2797func (iter PoolListUsageMetricsResultIterator) Response() PoolListUsageMetricsResult { 2798 return iter.page.Response() 2799} 2800 2801// Value returns the current value or a zero-initialized value if the 2802// iterator has advanced beyond the end of the collection. 2803func (iter PoolListUsageMetricsResultIterator) Value() PoolUsageMetrics { 2804 if !iter.page.NotDone() { 2805 return PoolUsageMetrics{} 2806 } 2807 return iter.page.Values()[iter.i] 2808} 2809 2810// Creates a new instance of the PoolListUsageMetricsResultIterator type. 2811func NewPoolListUsageMetricsResultIterator(page PoolListUsageMetricsResultPage) PoolListUsageMetricsResultIterator { 2812 return PoolListUsageMetricsResultIterator{page: page} 2813} 2814 2815// IsEmpty returns true if the ListResult contains no values. 2816func (plumr PoolListUsageMetricsResult) IsEmpty() bool { 2817 return plumr.Value == nil || len(*plumr.Value) == 0 2818} 2819 2820// hasNextLink returns true if the NextLink is not empty. 2821func (plumr PoolListUsageMetricsResult) hasNextLink() bool { 2822 return plumr.OdataNextLink != nil && len(*plumr.OdataNextLink) != 0 2823} 2824 2825// poolListUsageMetricsResultPreparer prepares a request to retrieve the next set of results. 2826// It returns nil if no more results exist. 2827func (plumr PoolListUsageMetricsResult) poolListUsageMetricsResultPreparer(ctx context.Context) (*http.Request, error) { 2828 if !plumr.hasNextLink() { 2829 return nil, nil 2830 } 2831 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2832 autorest.AsJSON(), 2833 autorest.AsGet(), 2834 autorest.WithBaseURL(to.String(plumr.OdataNextLink))) 2835} 2836 2837// PoolListUsageMetricsResultPage contains a page of PoolUsageMetrics values. 2838type PoolListUsageMetricsResultPage struct { 2839 fn func(context.Context, PoolListUsageMetricsResult) (PoolListUsageMetricsResult, error) 2840 plumr PoolListUsageMetricsResult 2841} 2842 2843// NextWithContext advances to the next page of values. If there was an error making 2844// the request the page does not advance and the error is returned. 2845func (page *PoolListUsageMetricsResultPage) NextWithContext(ctx context.Context) (err error) { 2846 if tracing.IsEnabled() { 2847 ctx = tracing.StartSpan(ctx, fqdn+"/PoolListUsageMetricsResultPage.NextWithContext") 2848 defer func() { 2849 sc := -1 2850 if page.Response().Response.Response != nil { 2851 sc = page.Response().Response.Response.StatusCode 2852 } 2853 tracing.EndSpan(ctx, sc, err) 2854 }() 2855 } 2856 for { 2857 next, err := page.fn(ctx, page.plumr) 2858 if err != nil { 2859 return err 2860 } 2861 page.plumr = next 2862 if !next.hasNextLink() || !next.IsEmpty() { 2863 break 2864 } 2865 } 2866 return nil 2867} 2868 2869// Next advances to the next page of values. If there was an error making 2870// the request the page does not advance and the error is returned. 2871// Deprecated: Use NextWithContext() instead. 2872func (page *PoolListUsageMetricsResultPage) Next() error { 2873 return page.NextWithContext(context.Background()) 2874} 2875 2876// NotDone returns true if the page enumeration should be started or is not yet complete. 2877func (page PoolListUsageMetricsResultPage) NotDone() bool { 2878 return !page.plumr.IsEmpty() 2879} 2880 2881// Response returns the raw server response from the last page request. 2882func (page PoolListUsageMetricsResultPage) Response() PoolListUsageMetricsResult { 2883 return page.plumr 2884} 2885 2886// Values returns the slice of values for the current page or nil if there are no values. 2887func (page PoolListUsageMetricsResultPage) Values() []PoolUsageMetrics { 2888 if page.plumr.IsEmpty() { 2889 return nil 2890 } 2891 return *page.plumr.Value 2892} 2893 2894// Creates a new instance of the PoolListUsageMetricsResultPage type. 2895func NewPoolListUsageMetricsResultPage(cur PoolListUsageMetricsResult, getNextPage func(context.Context, PoolListUsageMetricsResult) (PoolListUsageMetricsResult, error)) PoolListUsageMetricsResultPage { 2896 return PoolListUsageMetricsResultPage{ 2897 fn: getNextPage, 2898 plumr: cur, 2899 } 2900} 2901 2902// PoolNodeCounts ... 2903type PoolNodeCounts struct { 2904 PoolID *string `json:"poolId,omitempty"` 2905 Dedicated *NodeCounts `json:"dedicated,omitempty"` 2906 LowPriority *NodeCounts `json:"lowPriority,omitempty"` 2907} 2908 2909// PoolNodeCountsListResult ... 2910type PoolNodeCountsListResult struct { 2911 autorest.Response `json:"-"` 2912 // Value - A list of node counts by pool. 2913 Value *[]PoolNodeCounts `json:"value,omitempty"` 2914 OdataNextLink *string `json:"odata.nextLink,omitempty"` 2915} 2916 2917// PoolNodeCountsListResultIterator provides access to a complete listing of PoolNodeCounts values. 2918type PoolNodeCountsListResultIterator struct { 2919 i int 2920 page PoolNodeCountsListResultPage 2921} 2922 2923// NextWithContext advances to the next value. If there was an error making 2924// the request the iterator does not advance and the error is returned. 2925func (iter *PoolNodeCountsListResultIterator) NextWithContext(ctx context.Context) (err error) { 2926 if tracing.IsEnabled() { 2927 ctx = tracing.StartSpan(ctx, fqdn+"/PoolNodeCountsListResultIterator.NextWithContext") 2928 defer func() { 2929 sc := -1 2930 if iter.Response().Response.Response != nil { 2931 sc = iter.Response().Response.Response.StatusCode 2932 } 2933 tracing.EndSpan(ctx, sc, err) 2934 }() 2935 } 2936 iter.i++ 2937 if iter.i < len(iter.page.Values()) { 2938 return nil 2939 } 2940 err = iter.page.NextWithContext(ctx) 2941 if err != nil { 2942 iter.i-- 2943 return err 2944 } 2945 iter.i = 0 2946 return nil 2947} 2948 2949// Next advances to the next value. If there was an error making 2950// the request the iterator does not advance and the error is returned. 2951// Deprecated: Use NextWithContext() instead. 2952func (iter *PoolNodeCountsListResultIterator) Next() error { 2953 return iter.NextWithContext(context.Background()) 2954} 2955 2956// NotDone returns true if the enumeration should be started or is not yet complete. 2957func (iter PoolNodeCountsListResultIterator) NotDone() bool { 2958 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2959} 2960 2961// Response returns the raw server response from the last page request. 2962func (iter PoolNodeCountsListResultIterator) Response() PoolNodeCountsListResult { 2963 return iter.page.Response() 2964} 2965 2966// Value returns the current value or a zero-initialized value if the 2967// iterator has advanced beyond the end of the collection. 2968func (iter PoolNodeCountsListResultIterator) Value() PoolNodeCounts { 2969 if !iter.page.NotDone() { 2970 return PoolNodeCounts{} 2971 } 2972 return iter.page.Values()[iter.i] 2973} 2974 2975// Creates a new instance of the PoolNodeCountsListResultIterator type. 2976func NewPoolNodeCountsListResultIterator(page PoolNodeCountsListResultPage) PoolNodeCountsListResultIterator { 2977 return PoolNodeCountsListResultIterator{page: page} 2978} 2979 2980// IsEmpty returns true if the ListResult contains no values. 2981func (pnclr PoolNodeCountsListResult) IsEmpty() bool { 2982 return pnclr.Value == nil || len(*pnclr.Value) == 0 2983} 2984 2985// hasNextLink returns true if the NextLink is not empty. 2986func (pnclr PoolNodeCountsListResult) hasNextLink() bool { 2987 return pnclr.OdataNextLink != nil && len(*pnclr.OdataNextLink) != 0 2988} 2989 2990// poolNodeCountsListResultPreparer prepares a request to retrieve the next set of results. 2991// It returns nil if no more results exist. 2992func (pnclr PoolNodeCountsListResult) poolNodeCountsListResultPreparer(ctx context.Context) (*http.Request, error) { 2993 if !pnclr.hasNextLink() { 2994 return nil, nil 2995 } 2996 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2997 autorest.AsJSON(), 2998 autorest.AsGet(), 2999 autorest.WithBaseURL(to.String(pnclr.OdataNextLink))) 3000} 3001 3002// PoolNodeCountsListResultPage contains a page of PoolNodeCounts values. 3003type PoolNodeCountsListResultPage struct { 3004 fn func(context.Context, PoolNodeCountsListResult) (PoolNodeCountsListResult, error) 3005 pnclr PoolNodeCountsListResult 3006} 3007 3008// NextWithContext advances to the next page of values. If there was an error making 3009// the request the page does not advance and the error is returned. 3010func (page *PoolNodeCountsListResultPage) NextWithContext(ctx context.Context) (err error) { 3011 if tracing.IsEnabled() { 3012 ctx = tracing.StartSpan(ctx, fqdn+"/PoolNodeCountsListResultPage.NextWithContext") 3013 defer func() { 3014 sc := -1 3015 if page.Response().Response.Response != nil { 3016 sc = page.Response().Response.Response.StatusCode 3017 } 3018 tracing.EndSpan(ctx, sc, err) 3019 }() 3020 } 3021 for { 3022 next, err := page.fn(ctx, page.pnclr) 3023 if err != nil { 3024 return err 3025 } 3026 page.pnclr = next 3027 if !next.hasNextLink() || !next.IsEmpty() { 3028 break 3029 } 3030 } 3031 return nil 3032} 3033 3034// Next advances to the next page of values. If there was an error making 3035// the request the page does not advance and the error is returned. 3036// Deprecated: Use NextWithContext() instead. 3037func (page *PoolNodeCountsListResultPage) Next() error { 3038 return page.NextWithContext(context.Background()) 3039} 3040 3041// NotDone returns true if the page enumeration should be started or is not yet complete. 3042func (page PoolNodeCountsListResultPage) NotDone() bool { 3043 return !page.pnclr.IsEmpty() 3044} 3045 3046// Response returns the raw server response from the last page request. 3047func (page PoolNodeCountsListResultPage) Response() PoolNodeCountsListResult { 3048 return page.pnclr 3049} 3050 3051// Values returns the slice of values for the current page or nil if there are no values. 3052func (page PoolNodeCountsListResultPage) Values() []PoolNodeCounts { 3053 if page.pnclr.IsEmpty() { 3054 return nil 3055 } 3056 return *page.pnclr.Value 3057} 3058 3059// Creates a new instance of the PoolNodeCountsListResultPage type. 3060func NewPoolNodeCountsListResultPage(cur PoolNodeCountsListResult, getNextPage func(context.Context, PoolNodeCountsListResult) (PoolNodeCountsListResult, error)) PoolNodeCountsListResultPage { 3061 return PoolNodeCountsListResultPage{ 3062 fn: getNextPage, 3063 pnclr: cur, 3064 } 3065} 3066 3067// PoolPatchParameter ... 3068type PoolPatchParameter struct { 3069 // StartTask - If this element is present, it overwrites any existing start task. If omitted, any existing start task is left unchanged. 3070 StartTask *StartTask `json:"startTask,omitempty"` 3071 // CertificateReferences - If this element is present, it replaces any existing certificate references configured on the pool. If omitted, any existing certificate references are left unchanged. For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 3072 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 3073 // ApplicationPackageReferences - The list replaces any existing application package references on the pool. Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. If omitted, any existing application package references are left unchanged. 3074 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 3075 // Metadata - If this element is present, it replaces any existing metadata configured on the pool. If you specify an empty collection, any metadata is removed from the pool. If omitted, any existing metadata is left unchanged. 3076 Metadata *[]MetadataItem `json:"metadata,omitempty"` 3077} 3078 3079// PoolResizeParameter ... 3080type PoolResizeParameter struct { 3081 TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"` 3082 TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` 3083 // ResizeTimeout - The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3084 ResizeTimeout *string `json:"resizeTimeout,omitempty"` 3085 // NodeDeallocationOption - The default value is requeue. Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' 3086 NodeDeallocationOption ComputeNodeDeallocationOption `json:"nodeDeallocationOption,omitempty"` 3087} 3088 3089// PoolSpecification ... 3090type PoolSpecification struct { 3091 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 3092 DisplayName *string `json:"displayName,omitempty"` 3093 // VMSize - For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). 3094 VMSize *string `json:"vmSize,omitempty"` 3095 // CloudServiceConfiguration - This property must be specified if the pool needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'. 3096 CloudServiceConfiguration *CloudServiceConfiguration `json:"cloudServiceConfiguration,omitempty"` 3097 // VirtualMachineConfiguration - This property must be specified if the pool needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3098 VirtualMachineConfiguration *VirtualMachineConfiguration `json:"virtualMachineConfiguration,omitempty"` 3099 // MaxTasksPerNode - The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. 3100 MaxTasksPerNode *int32 `json:"maxTasksPerNode,omitempty"` 3101 // TaskSchedulingPolicy - If not specified, the default is spread. 3102 TaskSchedulingPolicy *TaskSchedulingPolicy `json:"taskSchedulingPolicy,omitempty"` 3103 // ResizeTimeout - This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3104 ResizeTimeout *string `json:"resizeTimeout,omitempty"` 3105 // TargetDedicatedNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. 3106 TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"` 3107 // TargetLowPriorityNodes - This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. 3108 TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` 3109 // EnableAutoScale - If false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The pool automatically resizes according to the formula. The default value is false. 3110 EnableAutoScale *bool `json:"enableAutoScale,omitempty"` 3111 // AutoScaleFormula - This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. 3112 AutoScaleFormula *string `json:"autoScaleFormula,omitempty"` 3113 // AutoScaleEvaluationInterval - The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3114 AutoScaleEvaluationInterval *string `json:"autoScaleEvaluationInterval,omitempty"` 3115 // EnableInterNodeCommunication - Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false. 3116 EnableInterNodeCommunication *bool `json:"enableInterNodeCommunication,omitempty"` 3117 NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` 3118 StartTask *StartTask `json:"startTask,omitempty"` 3119 // CertificateReferences - For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 3120 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 3121 // ApplicationPackageReferences - Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. 3122 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 3123 // ApplicationLicenses - The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. The permitted licenses available on the pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each application license added to the pool. 3124 ApplicationLicenses *[]string `json:"applicationLicenses,omitempty"` 3125 UserAccounts *[]UserAccount `json:"userAccounts,omitempty"` 3126 // Metadata - The Batch service does not assign any meaning to metadata; it is solely for the use of user code. 3127 Metadata *[]MetadataItem `json:"metadata,omitempty"` 3128} 3129 3130// PoolStatistics ... 3131type PoolStatistics struct { 3132 autorest.Response `json:"-"` 3133 URL *string `json:"url,omitempty"` 3134 StartTime *date.Time `json:"startTime,omitempty"` 3135 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 3136 UsageStats *UsageStatistics `json:"usageStats,omitempty"` 3137 ResourceStats *ResourceStatistics `json:"resourceStats,omitempty"` 3138} 3139 3140// PoolUpdatePropertiesParameter ... 3141type PoolUpdatePropertiesParameter struct { 3142 // StartTask - If this element is present, it overwrites any existing start task. If omitted, any existing start task is removed from the pool. 3143 StartTask *StartTask `json:"startTask,omitempty"` 3144 // CertificateReferences - This list replaces any existing certificate references configured on the pool. If you specify an empty collection, any existing certificate references are removed from the pool. For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. 3145 CertificateReferences *[]CertificateReference `json:"certificateReferences,omitempty"` 3146 // ApplicationPackageReferences - The list replaces any existing application package references on the pool. Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. If omitted, or if you specify an empty collection, any existing application packages references are removed from the pool. 3147 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 3148 // Metadata - This list replaces any existing metadata configured on the pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the pool. 3149 Metadata *[]MetadataItem `json:"metadata,omitempty"` 3150} 3151 3152// PoolUsageMetrics ... 3153type PoolUsageMetrics struct { 3154 PoolID *string `json:"poolId,omitempty"` 3155 StartTime *date.Time `json:"startTime,omitempty"` 3156 EndTime *date.Time `json:"endTime,omitempty"` 3157 // VMSize - For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). 3158 VMSize *string `json:"vmSize,omitempty"` 3159 TotalCoreHours *float64 `json:"totalCoreHours,omitempty"` 3160} 3161 3162// ReadCloser ... 3163type ReadCloser struct { 3164 autorest.Response `json:"-"` 3165 Value *io.ReadCloser `json:"value,omitempty"` 3166} 3167 3168// RecentJob ... 3169type RecentJob struct { 3170 ID *string `json:"id,omitempty"` 3171 URL *string `json:"url,omitempty"` 3172} 3173 3174// ResizeError ... 3175type ResizeError struct { 3176 Code *string `json:"code,omitempty"` 3177 Message *string `json:"message,omitempty"` 3178 Values *[]NameValuePair `json:"values,omitempty"` 3179} 3180 3181// ResourceFile ... 3182type ResourceFile struct { 3183 // AutoStorageContainerName - The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. 3184 AutoStorageContainerName *string `json:"autoStorageContainerName,omitempty"` 3185 // StorageContainerURL - The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when downloading blobs from the container. There are two ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, or set the ACL for the container to allow public access. 3186 StorageContainerURL *string `json:"storageContainerUrl,omitempty"` 3187 // HTTPURL - The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access. 3188 HTTPURL *string `json:"httpUrl,omitempty"` 3189 // BlobPrefix - The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. 3190 BlobPrefix *string `json:"blobPrefix,omitempty"` 3191 // FilePath - If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..'). 3192 FilePath *string `json:"filePath,omitempty"` 3193 // FileMode - This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file. 3194 FileMode *string `json:"fileMode,omitempty"` 3195} 3196 3197// ResourceStatistics ... 3198type ResourceStatistics struct { 3199 StartTime *date.Time `json:"startTime,omitempty"` 3200 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 3201 AvgCPUPercentage *float64 `json:"avgCPUPercentage,omitempty"` 3202 AvgMemoryGiB *float64 `json:"avgMemoryGiB,omitempty"` 3203 PeakMemoryGiB *float64 `json:"peakMemoryGiB,omitempty"` 3204 AvgDiskGiB *float64 `json:"avgDiskGiB,omitempty"` 3205 PeakDiskGiB *float64 `json:"peakDiskGiB,omitempty"` 3206 DiskReadIOps *int64 `json:"diskReadIOps,omitempty"` 3207 DiskWriteIOps *int64 `json:"diskWriteIOps,omitempty"` 3208 DiskReadGiB *float64 `json:"diskReadGiB,omitempty"` 3209 DiskWriteGiB *float64 `json:"diskWriteGiB,omitempty"` 3210 NetworkReadGiB *float64 `json:"networkReadGiB,omitempty"` 3211 NetworkWriteGiB *float64 `json:"networkWriteGiB,omitempty"` 3212} 3213 3214// Schedule ... 3215type Schedule struct { 3216 // DoNotRunUntil - If you do not specify a doNotRunUntil time, the schedule becomes ready to create jobs immediately. 3217 DoNotRunUntil *date.Time `json:"doNotRunUntil,omitempty"` 3218 // DoNotRunAfter - If you do not specify a doNotRunAfter time, and you are creating a recurring job schedule, the job schedule will remain active until you explicitly terminate it. 3219 DoNotRunAfter *date.Time `json:"doNotRunAfter,omitempty"` 3220 // StartWindow - If a job is not created within the startWindow interval, then the 'opportunity' is lost; no job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3221 StartWindow *string `json:"startWindow,omitempty"` 3222 // RecurrenceInterval - Because a job schedule can have at most one active job under it at any given time, if it is time to create a new job under a job schedule, but the previous job is still running, the Batch service will not create the new job until the previous job finishes. If the previous job does not finish within the startWindow period of the new recurrenceInterval, then no new job will be scheduled for that interval. For recurring jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when jobs are created, add tasks to the jobs and terminate the jobs ready for the next recurrence. The default is that the schedule does not recur: one job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 3223 RecurrenceInterval *string `json:"recurrenceInterval,omitempty"` 3224} 3225 3226// StartTask batch will retry tasks when a recovery operation is triggered on a compute node. Examples of 3227// recovery operations include (but are not limited to) when an unhealthy compute node is rebooted or a 3228// compute node disappeared due to host failure. Retries due to recovery operations are independent of and 3229// are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due 3230// to a recovery operation may occur. Because of this, all tasks should be idempotent. This means tasks 3231// need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The 3232// best practice for long running tasks is to use some form of checkpointing. In some cases the start task 3233// may be re-run even though the node was not rebooted. Special care should be taken to avoid start tasks 3234// which create breakaway process or install/launch services from the start task working directory, as this 3235// will block Batch from being able to re-run the start task. 3236type StartTask struct { 3237 // CommandLine - The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 3238 CommandLine *string `json:"commandLine,omitempty"` 3239 // ContainerSettings - When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 3240 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 3241 // ResourceFiles - Files listed under this element are located in the task's working directory. 3242 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 3243 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 3244 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task. 3245 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 3246 // MaxTaskRetryCount - The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. 3247 MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"` 3248 // WaitForSuccess - If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and failure info details. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false. 3249 WaitForSuccess *bool `json:"waitForSuccess,omitempty"` 3250} 3251 3252// StartTaskInformation ... 3253type StartTaskInformation struct { 3254 // State - Possible values include: 'StartTaskStateRunning', 'StartTaskStateCompleted' 3255 State StartTaskState `json:"state,omitempty"` 3256 // StartTime - This value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running). 3257 StartTime *date.Time `json:"startTime,omitempty"` 3258 // EndTime - This is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running. 3259 EndTime *date.Time `json:"endTime,omitempty"` 3260 // ExitCode - This property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. 3261 ExitCode *int32 `json:"exitCode,omitempty"` 3262 // ContainerInfo - This property is set only if the task runs in a container context. 3263 ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"` 3264 // FailureInfo - This property is set only if the task is in the completed state and encountered a failure. 3265 FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"` 3266 // RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints. 3267 RetryCount *int32 `json:"retryCount,omitempty"` 3268 // LastRetryTime - This element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. 3269 LastRetryTime *date.Time `json:"lastRetryTime,omitempty"` 3270 // Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure' 3271 Result TaskExecutionResult `json:"result,omitempty"` 3272} 3273 3274// SubtaskInformation ... 3275type SubtaskInformation struct { 3276 ID *int32 `json:"id,omitempty"` 3277 NodeInfo *ComputeNodeInformation `json:"nodeInfo,omitempty"` 3278 StartTime *date.Time `json:"startTime,omitempty"` 3279 // EndTime - This property is set only if the subtask is in the Completed state. 3280 EndTime *date.Time `json:"endTime,omitempty"` 3281 // ExitCode - This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. 3282 ExitCode *int32 `json:"exitCode,omitempty"` 3283 // ContainerInfo - This property is set only if the task runs in a container context. 3284 ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"` 3285 // FailureInfo - This property is set only if the task is in the completed state and encountered a failure. 3286 FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"` 3287 // State - Possible values include: 'SubtaskStatePreparing', 'SubtaskStateRunning', 'SubtaskStateCompleted' 3288 State SubtaskState `json:"state,omitempty"` 3289 StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"` 3290 // PreviousState - This property is not set if the subtask is in its initial running state. Possible values include: 'SubtaskStatePreparing', 'SubtaskStateRunning', 'SubtaskStateCompleted' 3291 PreviousState SubtaskState `json:"previousState,omitempty"` 3292 // PreviousStateTransitionTime - This property is not set if the subtask is in its initial running state. 3293 PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"` 3294 // Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure' 3295 Result TaskExecutionResult `json:"result,omitempty"` 3296} 3297 3298// TaskAddCollectionParameter ... 3299type TaskAddCollectionParameter struct { 3300 // Value - The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks. 3301 Value *[]TaskAddParameter `json:"value,omitempty"` 3302} 3303 3304// TaskAddCollectionResult ... 3305type TaskAddCollectionResult struct { 3306 autorest.Response `json:"-"` 3307 Value *[]TaskAddResult `json:"value,omitempty"` 3308} 3309 3310// TaskAddParameter batch will retry tasks when a recovery operation is triggered on a compute node. 3311// Examples of recovery operations include (but are not limited to) when an unhealthy compute node is 3312// rebooted or a compute node disappeared due to host failure. Retries due to recovery operations are 3313// independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an 3314// internal retry due to a recovery operation may occur. Because of this, all tasks should be idempotent. 3315// This means tasks need to tolerate being interrupted and restarted without causing any corruption or 3316// duplicate data. The best practice for long running tasks is to use some form of checkpointing. 3317type TaskAddParameter struct { 3318 // ID - The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a job that differ only by case). 3319 ID *string `json:"id,omitempty"` 3320 // DisplayName - The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. 3321 DisplayName *string `json:"displayName,omitempty"` 3322 // CommandLine - For multi-instance tasks, the command line is executed as the primary task, after the primary task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). 3323 CommandLine *string `json:"commandLine,omitempty"` 3324 // ContainerSettings - If the pool that will run this task has containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container. 3325 ContainerSettings *TaskContainerSettings `json:"containerSettings,omitempty"` 3326 // ExitConditions - How the Batch service should respond when the task completes. 3327 ExitConditions *ExitConditions `json:"exitConditions,omitempty"` 3328 // ResourceFiles - For multi-instance tasks, the resource files will only be downloaded to the compute node on which the primary task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. 3329 ResourceFiles *[]ResourceFile `json:"resourceFiles,omitempty"` 3330 // OutputFiles - For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is executed. 3331 OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` 3332 EnvironmentSettings *[]EnvironmentSetting `json:"environmentSettings,omitempty"` 3333 AffinityInfo *AffinityInformation `json:"affinityInfo,omitempty"` 3334 // Constraints - If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the job, the maxWallClockTime is infinite, and the retentionTime is 7 days. 3335 Constraints *TaskConstraints `json:"constraints,omitempty"` 3336 // UserIdentity - If omitted, the task runs as a non-administrative user unique to the task. 3337 UserIdentity *UserIdentity `json:"userIdentity,omitempty"` 3338 MultiInstanceSettings *MultiInstanceSettings `json:"multiInstanceSettings,omitempty"` 3339 // DependsOn - This task will not be scheduled until all tasks that it depends on have completed successfully. If any of those tasks fail and exhaust their retry counts, this task will never be scheduled. If the job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. 3340 DependsOn *TaskDependencies `json:"dependsOn,omitempty"` 3341 // ApplicationPackageReferences - Application packages are downloaded and deployed to a shared directory, not the task working directory. Therefore, if a referenced package is already on the compute node, and is up to date, then it is not re-downloaded; the existing copy on the compute node is used. If a referenced application package cannot be installed, for example because the package has been deleted or because download failed, the task fails. 3342 ApplicationPackageReferences *[]ApplicationPackageReference `json:"applicationPackageReferences,omitempty"` 3343 // AuthenticationTokenSettings - If this property is set, the Batch service provides the task with an authentication token which can be used to authenticate Batch service operations without requiring an account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job, or check the status of the job or of other tasks under the job. 3344 AuthenticationTokenSettings *AuthenticationTokenSettings `json:"authenticationTokenSettings,omitempty"` 3345} 3346 3347// TaskAddResult ... 3348type TaskAddResult struct { 3349 // Status - Possible values include: 'TaskAddStatusSuccess', 'TaskAddStatusClientError', 'TaskAddStatusServerError' 3350 Status TaskAddStatus `json:"status,omitempty"` 3351 TaskID *string `json:"taskId,omitempty"` 3352 // ETag - You can use this to detect whether the task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the job in the meantime. 3353 ETag *string `json:"eTag,omitempty"` 3354 LastModified *date.Time `json:"lastModified,omitempty"` 3355 Location *string `json:"location,omitempty"` 3356 Error *Error `json:"error,omitempty"` 3357} 3358 3359// TaskConstraints ... 3360type TaskConstraints struct { 3361 // MaxWallClockTime - If this is not specified, there is no time limit on how long the task may run. 3362 MaxWallClockTime *string `json:"maxWallClockTime,omitempty"` 3363 // RetentionTime - The default is 7 days, i.e. the task directory will be retained for 7 days unless the compute node is removed or the job is deleted. 3364 RetentionTime *string `json:"retentionTime,omitempty"` 3365 // MaxTaskRetryCount - Note that this value specifically controls the number of retries for the task executable due to a nonzero exit code. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task after the first attempt. If the maximum retry count is -1, the Batch service retries the task without limit. 3366 MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"` 3367} 3368 3369// TaskContainerExecutionInformation ... 3370type TaskContainerExecutionInformation struct { 3371 ContainerID *string `json:"containerId,omitempty"` 3372 // State - This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". 3373 State *string `json:"state,omitempty"` 3374 // Error - This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". 3375 Error *string `json:"error,omitempty"` 3376} 3377 3378// TaskContainerSettings ... 3379type TaskContainerSettings struct { 3380 // ContainerRunOptions - These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. 3381 ContainerRunOptions *string `json:"containerRunOptions,omitempty"` 3382 // ImageName - This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default. 3383 ImageName *string `json:"imageName,omitempty"` 3384 // Registry - This setting can be omitted if was already provided at pool creation. 3385 Registry *ContainerRegistry `json:"registry,omitempty"` 3386} 3387 3388// TaskCounts ... 3389type TaskCounts struct { 3390 autorest.Response `json:"-"` 3391 Active *int32 `json:"active,omitempty"` 3392 Running *int32 `json:"running,omitempty"` 3393 Completed *int32 `json:"completed,omitempty"` 3394 Succeeded *int32 `json:"succeeded,omitempty"` 3395 Failed *int32 `json:"failed,omitempty"` 3396} 3397 3398// TaskDependencies ... 3399type TaskDependencies struct { 3400 // TaskIds - The taskIds collection is limited to 64000 characters total (i.e. the combined length of all task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using task ID ranges instead. 3401 TaskIds *[]string `json:"taskIds,omitempty"` 3402 TaskIDRanges *[]TaskIDRange `json:"taskIdRanges,omitempty"` 3403} 3404 3405// TaskExecutionInformation ... 3406type TaskExecutionInformation struct { 3407 // StartTime - 'Running' corresponds to the running state, so if the task specifies resource files or application packages, then the start time reflects the time at which the task started downloading or deploying these. If the task has been restarted or retried, this is the most recent time at which the task started running. This property is present only for tasks that are in the running or completed state. 3408 StartTime *date.Time `json:"startTime,omitempty"` 3409 // EndTime - This property is set only if the task is in the Completed state. 3410 EndTime *date.Time `json:"endTime,omitempty"` 3411 // ExitCode - This property is set only if the task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. 3412 ExitCode *int32 `json:"exitCode,omitempty"` 3413 // ContainerInfo - This property is set only if the task runs in a container context. 3414 ContainerInfo *TaskContainerExecutionInformation `json:"containerInfo,omitempty"` 3415 // FailureInfo - This property is set only if the task is in the completed state and encountered a failure. 3416 FailureInfo *TaskFailureInformation `json:"failureInfo,omitempty"` 3417 // RetryCount - Task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints. 3418 RetryCount *int32 `json:"retryCount,omitempty"` 3419 // LastRetryTime - This element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. 3420 LastRetryTime *date.Time `json:"lastRetryTime,omitempty"` 3421 // RequeueCount - When the user removes nodes from a pool (by resizing/shrinking the pool) or when the job is being disabled, the user can specify that running tasks on the nodes be requeued for execution. This count tracks how many times the task has been requeued for these reasons. 3422 RequeueCount *int32 `json:"requeueCount,omitempty"` 3423 // LastRequeueTime - This property is set only if the requeueCount is nonzero. 3424 LastRequeueTime *date.Time `json:"lastRequeueTime,omitempty"` 3425 // Result - If the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'Success', 'Failure' 3426 Result TaskExecutionResult `json:"result,omitempty"` 3427} 3428 3429// TaskFailureInformation ... 3430type TaskFailureInformation struct { 3431 // Category - Possible values include: 'UserError', 'ServerError' 3432 Category ErrorCategory `json:"category,omitempty"` 3433 Code *string `json:"code,omitempty"` 3434 Message *string `json:"message,omitempty"` 3435 Details *[]NameValuePair `json:"details,omitempty"` 3436} 3437 3438// TaskIDRange the start and end of the range are inclusive. For example, if a range has start 9 and end 3439// 12, then it represents tasks '9', '10', '11' and '12'. 3440type TaskIDRange struct { 3441 Start *int32 `json:"start,omitempty"` 3442 End *int32 `json:"end,omitempty"` 3443} 3444 3445// TaskInformation ... 3446type TaskInformation struct { 3447 TaskURL *string `json:"taskUrl,omitempty"` 3448 JobID *string `json:"jobId,omitempty"` 3449 TaskID *string `json:"taskId,omitempty"` 3450 SubtaskID *int32 `json:"subtaskId,omitempty"` 3451 // TaskState - Possible values include: 'TaskStateActive', 'TaskStatePreparing', 'TaskStateRunning', 'TaskStateCompleted' 3452 TaskState TaskState `json:"taskState,omitempty"` 3453 ExecutionInfo *TaskExecutionInformation `json:"executionInfo,omitempty"` 3454} 3455 3456// TaskSchedulingPolicy ... 3457type TaskSchedulingPolicy struct { 3458 // NodeFillType - Possible values include: 'Spread', 'Pack' 3459 NodeFillType ComputeNodeFillType `json:"nodeFillType,omitempty"` 3460} 3461 3462// TaskStatistics ... 3463type TaskStatistics struct { 3464 URL *string `json:"url,omitempty"` 3465 StartTime *date.Time `json:"startTime,omitempty"` 3466 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 3467 UserCPUTime *string `json:"userCPUTime,omitempty"` 3468 KernelCPUTime *string `json:"kernelCPUTime,omitempty"` 3469 // WallClockTime - The wall clock time is the elapsed time from when the task started running on a compute node to when it finished (or to the last time the statistics were updated, if the task had not finished by then). If the task was retried, this includes the wall clock time of all the task retries. 3470 WallClockTime *string `json:"wallClockTime,omitempty"` 3471 ReadIOps *int64 `json:"readIOps,omitempty"` 3472 WriteIOps *int64 `json:"writeIOps,omitempty"` 3473 ReadIOGiB *float64 `json:"readIOGiB,omitempty"` 3474 WriteIOGiB *float64 `json:"writeIOGiB,omitempty"` 3475 WaitTime *string `json:"waitTime,omitempty"` 3476} 3477 3478// TaskUpdateParameter ... 3479type TaskUpdateParameter struct { 3480 // Constraints - If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks. 3481 Constraints *TaskConstraints `json:"constraints,omitempty"` 3482} 3483 3484// UploadBatchServiceLogsConfiguration ... 3485type UploadBatchServiceLogsConfiguration struct { 3486 // ContainerURL - The URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. 3487 ContainerURL *string `json:"containerUrl,omitempty"` 3488 // StartTime - Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. 3489 StartTime *date.Time `json:"startTime,omitempty"` 3490 // EndTime - Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. 3491 EndTime *date.Time `json:"endTime,omitempty"` 3492} 3493 3494// UploadBatchServiceLogsResult ... 3495type UploadBatchServiceLogsResult struct { 3496 autorest.Response `json:"-"` 3497 // VirtualDirectoryName - The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. 3498 VirtualDirectoryName *string `json:"virtualDirectoryName,omitempty"` 3499 NumberOfFilesUploaded *int32 `json:"numberOfFilesUploaded,omitempty"` 3500} 3501 3502// UsageStatistics ... 3503type UsageStatistics struct { 3504 StartTime *date.Time `json:"startTime,omitempty"` 3505 LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` 3506 DedicatedCoreTime *string `json:"dedicatedCoreTime,omitempty"` 3507} 3508 3509// UserAccount ... 3510type UserAccount struct { 3511 Name *string `json:"name,omitempty"` 3512 Password *string `json:"password,omitempty"` 3513 // ElevationLevel - The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' 3514 ElevationLevel ElevationLevel `json:"elevationLevel,omitempty"` 3515 // LinuxUserConfiguration - This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options. 3516 LinuxUserConfiguration *LinuxUserConfiguration `json:"linuxUserConfiguration,omitempty"` 3517 // WindowsUserConfiguration - This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options. 3518 WindowsUserConfiguration *WindowsUserConfiguration `json:"windowsUserConfiguration,omitempty"` 3519} 3520 3521// UserIdentity specify either the userName or autoUser property, but not both. 3522type UserIdentity struct { 3523 // UserName - The userName and autoUser properties are mutually exclusive; you must specify one but not both. 3524 UserName *string `json:"username,omitempty"` 3525 // AutoUser - The userName and autoUser properties are mutually exclusive; you must specify one but not both. 3526 AutoUser *AutoUserSpecification `json:"autoUser,omitempty"` 3527} 3528 3529// VirtualMachineConfiguration ... 3530type VirtualMachineConfiguration struct { 3531 ImageReference *ImageReference `json:"imageReference,omitempty"` 3532 // NodeAgentSKUID - The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation. 3533 NodeAgentSKUID *string `json:"nodeAgentSKUId,omitempty"` 3534 // WindowsConfiguration - This property must not be specified if the imageReference property specifies a Linux OS image. 3535 WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` 3536 // DataDisks - This property must be specified if the compute nodes in the pool need to have empty data disks attached to them. This cannot be updated. Each node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the node is removed from the pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. 3537 DataDisks *[]DataDisk `json:"dataDisks,omitempty"` 3538 // LicenseType - This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: 3539 // Windows_Server - The on-premises license is for Windows Server. 3540 // Windows_Client - The on-premises license is for Windows Client. 3541 LicenseType *string `json:"licenseType,omitempty"` 3542 // ContainerConfiguration - If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may specify it. 3543 ContainerConfiguration *ContainerConfiguration `json:"containerConfiguration,omitempty"` 3544} 3545 3546// WindowsConfiguration ... 3547type WindowsConfiguration struct { 3548 // EnableAutomaticUpdates - If omitted, the default value is true. 3549 EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` 3550} 3551 3552// WindowsUserConfiguration ... 3553type WindowsUserConfiguration struct { 3554 // LoginMode - The default value for VirtualMachineConfiguration pools is batch and for CloudServiceConfiguration pools is interactive. Possible values include: 'Batch', 'Interactive' 3555 LoginMode LoginMode `json:"loginMode,omitempty"` 3556} 3557